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