From cf0820d6285c3a9379dd529ee50dcf39e2efa21c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 26 Nov 2010 16:33:42 +0000 Subject: change monospace font to be an extern, not good final design but better then loading the same font 3 times. need to load twice still because render may use the font in a thread. --- source/blender/editors/space_text/text_draw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_text/text_draw.c') diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 2b27186041f..3b0d8bb7a29 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -56,13 +56,11 @@ #include "text_intern.h" /******************** text font drawing ******************/ -static int mono= -1; // XXX needs proper storage and change all the BLF_* here +// XXX, fixme +#define mono blf_mono_font static void text_font_begin(SpaceText *st) { - if(mono == -1) - mono= BLF_load_mem("monospace", (unsigned char*)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size); - BLF_aspect(mono, 1.0); BLF_size(mono, st->lheight, 72); } -- cgit v1.2.3