mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-01 17:56:45 +08:00
Fonts: AddFontDefault() adds to GlyphOffset.y instead of overriding it.
This commit is contained in:
+1
-1
@@ -3102,7 +3102,7 @@ ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
|
|||||||
if (font_cfg.Name[0] == '\0')
|
if (font_cfg.Name[0] == '\0')
|
||||||
ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "ProggyClean.ttf");
|
ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "ProggyClean.ttf");
|
||||||
font_cfg.EllipsisChar = (ImWchar)0x0085;
|
font_cfg.EllipsisChar = (ImWchar)0x0085;
|
||||||
font_cfg.GlyphOffset.y = 1.0f * IM_TRUNC(font_cfg.SizePixels / 13.0f); // Add +1 offset per 13 units
|
font_cfg.GlyphOffset.y += 1.0f * IM_TRUNC(font_cfg.SizePixels / 13.0f); // Add +1 offset per 13 units
|
||||||
|
|
||||||
int ttf_compressed_size = 0;
|
int ttf_compressed_size = 0;
|
||||||
const char* ttf_compressed = GetDefaultCompressedFontDataTTF(&ttf_compressed_size);
|
const char* ttf_compressed = GetDefaultCompressedFontDataTTF(&ttf_compressed_size);
|
||||||
|
|||||||
Reference in New Issue
Block a user