diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2022-02-05 05:32:32 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2022-02-05 05:32:32 +0300 |
commit | 835dd950467fe5215911a81485393fb6ce3a03cd (patch) | |
tree | 94d2a6eaeb4f8cbb755ef31b92b417117d461889 /source/blender/editors | |
parent | b1cee3619062124497c73a24c3d87853f544c5f1 (diff) |
BLF: Cleanup blf_glyph_cache_find & blf_font_size
Removes unnecessary calls to blf_glyph_cache_find, simplifies
blf_font_size, and reduces calls to it. blf_glyph_cache_new
and blf_glyph_cache_find made static.
See D13374 for more details.
Differential Revision: https://developer.blender.org/D13374
Reviewed by Campbell Barton
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_style.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 1fe538eca5d..bf3fa6e62d4 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -453,15 +453,6 @@ void uiStyleInit(void) printf("%s: error, no fonts available\n", __func__); } } - else { - /* ? just for speed to initialize? - * Yes, this build the glyph cache and create - * the texture. - */ - BLF_size(font->blf_id, 11.0f * U.pixelsize, U.dpi); - BLF_size(font->blf_id, 12.0f * U.pixelsize, U.dpi); - BLF_size(font->blf_id, 14.0f * U.pixelsize, U.dpi); - } } if (style == NULL) { @@ -485,8 +476,6 @@ void uiStyleInit(void) blf_mono_font = BLF_load_mono_default(unique); } - BLF_size(blf_mono_font, 12.0f * U.pixelsize, 72); - /* Set default flags based on UI preferences (not render fonts) */ { const int flag_disable = (BLF_MONOCHROME | BLF_HINTING_NONE | BLF_HINTING_SLIGHT | @@ -529,8 +518,6 @@ void uiStyleInit(void) const bool unique = true; blf_mono_font_render = BLF_load_mono_default(unique); } - - BLF_size(blf_mono_font_render, 12.0f * U.pixelsize, 72); } void UI_fontstyle_set(const uiFontStyle *fs) |