ImFontConfig

imguicpp.ImFontConfig (extern class)

Instance Members

// TTF/OTF data


fontDataSize: Int

// TTF/OTF data size


fontDataOwnedByAtlas: Bool

true // TTF/OTF data ownership taken by the owner ImFontAtlas (will delete memory itself). SINCE 1.92, THE DATA NEEDS TO PERSIST FOR WHOLE DURATION OF ATLAS.


mergeMode: Bool

false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.


pixelSnapH: Bool

false // Align every glyph AdvanceX to pixel boundaries. Prevents fractional font size from working correctly! Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, OversampleH/V will default to 1.


oversampleH: cpp.Int8

0 (2) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1 or 2 depending on size. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.


oversampleV: cpp.Int8

0 (1) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1. This is not really useful as we don't use sub-pixel positions on the Y axis.


ellipsisChar: cpp.UInt16

0 // Explicitly specify Unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.


sizePixels: cpp.Float32

// Output size in pixels for rasterizer (more or less maps to the resulting font height).


glyphRanges: cpp.Star

NULL // LEGACY THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).


glyphExcludeRanges: cpp.Star

NULL // Pointer to a small user-provided list of Unicode ranges (2 value per range, values are inclusive, zero-terminated list). This is very close to GlyphRanges[] but designed to exclude ranges from a font source, when merging fonts with overlapping glyphs. Use "Input Glyphs Overlap Detection Tool" to find about your overlapping ranges.


glyphOffset: ImVec2

0, 0 // Offset (in pixels) all glyphs from this font input. Absolute value for default size, other sizes will scale this value.


glyphMinAdvanceX: cpp.Float32

0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font. Absolute value for default size, other sizes will scale this value.


glyphMaxAdvanceX: cpp.Float32

FLT_MAX // Maximum AdvanceX for glyphs


glyphExtraAdvanceX: cpp.Float32

0 // Extra spacing (in pixels) between glyphs. Please contact us if you are using this. // FIXME-NEWATLAS: Intentionally unscaled


fontNo: UInt

0 // Index of font within TTF/OTF file


fontLoaderFlags: UInt

0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if unsure.


rasterizerMultiply: cpp.Float32

1.0f // Linearly brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. This is a silly thing we may remove in the future.


rasterizerDensity: cpp.Float32

1.0f // [LEGACY: this only makes sense when ImGuiBackendFlags_RendererHasTextures is not supported] DPI scale multiplier for rasterization. Not altering other font metrics: makes it easy to swap between e.g. a 100% and a 400% fonts for a zooming display, or handle Retina screen. IMPORTANT: If you change this it is expected that you increase/decrease font scale roughly to the inverse of this, otherwise quality may look lowered.


extraSizeScale: cpp.Float32

1.0f // Extra rasterizer scale over SizePixels.

Metadata

Name Parameters
:structAccess -
:include "linc_imgui.h"