// ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
// ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
structImFont
structImFont
{
{
// Members: Hot ~24/32 bytes (for CalcTextSize)
// Members: Hot ~20/24 bytes (for CalcTextSize)
ImVector<float>IndexAdvanceX;// 12/16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this this info, and are often bottleneck in large UI).
ImVector<float>IndexAdvanceX;// 12-16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this this info, and are often bottleneck in large UI).
floatFontSize;// 4 // in // <user set> // Height of characters, set during loading (don't change after loading)
floatFallbackAdvanceX;// 4 // out // = FallbackGlyph->AdvanceX
floatFallbackAdvanceX;// 4 // out // = FallbackGlyph->AdvanceX
ImWcharFallbackChar;// 2 // in // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
floatFontSize;// 4 // in // // Height of characters/line, set during loading (don't change after loading)
// Members: Hot ~36/48 bytes (for CalcTextSize + render loop)
// Members: Hot ~36/48 bytes (for CalcTextSize + render loop)
ImVector<ImWchar>IndexLookup;// 12-16 // out // // Sparse. Index glyphs by Unicode code-point.
ImVector<ImWchar>IndexLookup;// 12-16 // out // // Sparse. Index glyphs by Unicode code-point.
ImVector<ImFontGlyph>Glyphs;// 12-16 // out // // All glyphs.
ImVector<ImFontGlyph>Glyphs;// 12-16 // out // // All glyphs.
ImVec2DisplayOffset;// 8 // in // = (0,0) // Offset font rendering by xx pixels
constImFontGlyph*FallbackGlyph;// 4-8 // out // = FindGlyph(FontFallbackChar)
constImFontGlyph*FallbackGlyph;// 4-8 // out // = FindGlyph(FontFallbackChar)
ImVec2DisplayOffset;// 8 // in // = (0,0) // Offset font rendering by xx pixels
// Members: Cold ~28/40 bytes
// Members: Cold ~32/40 bytes
ImFontAtlas*ContainerAtlas;// 4-8 // out // // What we has been loaded into
ImFontAtlas*ContainerAtlas;// 4-8 // out // // What we has been loaded into
constImFontConfig*ConfigData;// 4-8 // in // // Pointer within ContainerAtlas->ConfigData
constImFontConfig*ConfigData;// 4-8 // in // // Pointer within ContainerAtlas->ConfigData
shortConfigDataCount;// 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
shortConfigDataCount;// 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
boolDirtyLookupTables;// 1 // out //
ImWcharFallbackChar;// 2 // in // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
floatScale;// 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
floatScale;// 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
floatAscent,Descent;// 8 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
floatAscent,Descent;// 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
intMetricsTotalSurface;// 4 // out // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
intMetricsTotalSurface;// 4 // out // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)