Removed ImFont::DisplayOffset in favor of ImFontConfig::GlyphOffset. (#1619)

+ Fonts: AddFontDefault() adjust its vertical offset based on floor(size/13) instead of always +1.
This commit is contained in:
ocornut
2020-09-17 16:43:23 +02:00
parent fbf70070bb
commit c206a19373
8 changed files with 22 additions and 23 deletions

View File

@ -2406,11 +2406,10 @@ struct ImFont
float FallbackAdvanceX; // 4 // out // = FallbackGlyph->AdvanceX
float FontSize; // 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 ~28/40 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.
const ImFontGlyph* FallbackGlyph; // 4-8 // out // = FindGlyph(FontFallbackChar)
ImVec2 DisplayOffset; // 8 // in // = (0,0) // Offset font rendering by xx pixels
// Members: Cold ~32/40 bytes
ImFontAtlas* ContainerAtlas; // 4-8 // out // // What we has been loaded into