mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Add ImFontConfig::GlyphExtraAdvanceX as a replacement for GlyphExtraSpacing.x (#242)
Partly restore 1a31e31.
This commit is contained in:
parent
2d20e13746
commit
cfed18afc7
4 changed files with 8 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue