diff options
Diffstat (limited to 'source/blender/editors/interface/interface_style.c')
-rw-r--r-- | source/blender/editors/interface/interface_style.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index eabc5150424..9a09ae67601 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -521,6 +521,28 @@ void uiStyleInit(void) BLF_size(blf_mono_font, 12 * U.pixelsize, 72); + /* Set default flags based on UI preferences (not render fonts) */ + { + int flag_enable = 0, flag_disable = 0; + if ((U.text_render & USER_TEXT_DISABLE_HINTING) == 0) { + flag_enable |= BLF_HINTING; + } + else { + flag_disable |= BLF_HINTING; + } + + for (font = U.uifonts.first; font; font = font->next) { + if (font->blf_id != -1) { + BLF_enable(font->blf_id, flag_enable); + BLF_disable(font->blf_id, flag_disable); + } + } + if (blf_mono_font != -1) { + BLF_enable(blf_mono_font, flag_enable); + BLF_disable(blf_mono_font, flag_disable); + } + } + /** * Second for rendering else we get threading problems, * |