From 72fc2b6afe404fdd47d39a94b989f1730ba0f093 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 28 Jun 2016 16:18:17 +1000 Subject: Fix T48753: VSE must restart for international fonts --- source/blender/editors/interface/interface_style.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 423c48e5f55..8b41302b5bb 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -417,6 +417,11 @@ void uiStyleInit(void) blf_mono_font = -1; } + if (blf_mono_font_render != -1) { + BLF_unload_id(blf_mono_font_render); + blf_mono_font_render = -1; + } + font = U.uifonts.first; /* default builtin */ @@ -516,7 +521,12 @@ void uiStyleInit(void) BLF_size(blf_mono_font, 12 * U.pixelsize, 72); - /* second for rendering else we get threading problems */ + /** + * Second for rendering else we get threading problems, + * + * \note This isn't good that the render font depends on the preferences, + * keep for now though, since without this there is no way to display many unicode chars. + */ if (blf_mono_font_render == -1) blf_mono_font_render = BLF_load_mem_unique("monospace", monofont_ttf, monofont_size); -- cgit v1.2.3