Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-12-01 08:57:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-12-01 08:58:47 +0300
commit6783c673e6457399ef2cb0c5ee65fcfe8a1d07f0 (patch)
tree9ad10d786f13c82d8bedad9d90f90238765a0f49 /source/blender/editors/interface/interface_style.c
parent0b1b7746745a75ca04f698cc1c2a9636c1f65576 (diff)
UI: mono-space font user preference
Diffstat (limited to 'source/blender/editors/interface/interface_style.c')
-rw-r--r--source/blender/editors/interface/interface_style.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 25a187c43ad..6ce29242cbb 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -410,6 +410,11 @@ void uiStyleInit(void)
BLF_unload_id(font->blf_id);
}
+ if (blf_mono_font != -1) {
+ BLF_unload_id(blf_mono_font);
+ blf_mono_font = -1;
+ }
+
font = U.uifonts.first;
/* default builtin */
@@ -498,14 +503,17 @@ void uiStyleInit(void)
}
/* reload */
- BLF_unload("monospace");
- blf_mono_font = -1;
blf_mono_font_render = -1;
#endif
/* XXX, this should be moved into a style, but for now best only load the monospaced font once. */
- if (blf_mono_font == -1)
+ BLI_assert(blf_mono_font == -1);
+ if (U.font_path_ui_mono[0]) {
+ blf_mono_font = BLF_load_unique(U.font_path_ui_mono);
+ }
+ if (blf_mono_font == -1) {
blf_mono_font = BLF_load_mem_unique("monospace", monofont_ttf, monofont_size);
+ }
BLF_size(blf_mono_font, 12 * U.pixelsize, 72);