[Bf-blender-cvs] [72fc2b6] master: Fix T48753: VSE must restart for international fonts

Campbell Barton noreply at git.blender.org
Tue Jun 28 08:25:41 CEST 2016


Commit: 72fc2b6afe404fdd47d39a94b989f1730ba0f093
Author: Campbell Barton
Date:   Tue Jun 28 16:18:17 2016 +1000
Branches: master
https://developer.blender.org/rB72fc2b6afe404fdd47d39a94b989f1730ba0f093

Fix T48753: VSE must restart for international fonts

===================================================================

M	source/blender/editors/interface/interface_style.c

===================================================================

diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 423c48e..8b41302 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);




More information about the Bf-blender-cvs mailing list