mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-30 18:34:34 +01:00
ImFontAtlas::AddFontDefault: Made it possible to override glyph ranges. (#1965)
This commit is contained in:
parent
faa7dad537
commit
b5b972d0ef
@ -1545,7 +1545,8 @@ ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
|
|||||||
if (font_cfg.SizePixels <= 0.0f) font_cfg.SizePixels = 13.0f;
|
if (font_cfg.SizePixels <= 0.0f) font_cfg.SizePixels = 13.0f;
|
||||||
|
|
||||||
const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85();
|
const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85();
|
||||||
ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, GetGlyphRangesDefault());
|
const ImWchar* glyph_ranges = font_cfg.GlyphRanges != NULL ? font_cfg.GlyphRanges : GetGlyphRangesDefault();
|
||||||
|
ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, glyph_ranges);
|
||||||
font->DisplayOffset.y = 1.0f;
|
font->DisplayOffset.y = 1.0f;
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user