mirror of
https://github.com/xemu-project/imgui.git
synced 2024-11-27 04:00:22 +00:00
ImFontAtlas::AddFontDefault: Made it possible to override size (even if it isn't really recommended)
This commit is contained in:
parent
91d841dd5f
commit
1065a7b95b
@ -1253,9 +1253,10 @@ ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
|
||||
font_cfg.PixelSnapH = true;
|
||||
}
|
||||
if (font_cfg.Name[0] == '\0') strcpy(font_cfg.Name, "ProggyClean.ttf, 13px");
|
||||
if (font_cfg.SizePixels <= 0.0f) font_cfg.SizePixels = 13.0f;
|
||||
|
||||
const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85();
|
||||
ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, 13.0f, &font_cfg, GetGlyphRangesDefault());
|
||||
ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, GetGlyphRangesDefault());
|
||||
return font;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user