ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)

This commit is contained in:
omar
2018-06-08 12:46:36 +02:00
parent 8e48ab6b19
commit f5bf9f509c
5 changed files with 31 additions and 12 deletions

View File

@ -57,6 +57,7 @@ In this document:
ImFontConfig config;
config.MergeMode = true;
config.GlyphMinAdvanceX = 13.0f; // Use if you want to make the icon monospaced
static const ImWchar icon_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
io.Fonts->AddFontFromFileTTF("fonts/fontawesome-webfont.ttf", 13.0f, &config, icon_ranges);