Add ImFontConfig::GlyphExtraAdvanceX as a replacement for GlyphExtraSpacing.x (#242)

Partly restore 1a31e31.
This commit is contained in:
ocornut
2025-02-06 12:34:37 +01:00
parent 2d20e13746
commit cfed18afc7
4 changed files with 8 additions and 5 deletions

View File

@@ -3858,6 +3858,9 @@ void ImFont::AddGlyph(const ImFontConfig* cfg, ImWchar codepoint, float x0, floa
// Snap to pixel
if (cfg->PixelSnapH)
advance_x = IM_ROUND(advance_x);
// Bake extra spacing
advance_x += cfg->GlyphExtraAdvanceX;
}
int glyph_idx = Glyphs.Size;