diff options
author | Diego Borghetti <bdiego@gmail.com> | 2009-04-24 01:57:41 +0400 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2009-04-24 01:57:41 +0400 |
commit | efd1a69d6c12d97594c93857365547a56e6792e9 (patch) | |
tree | bf509b370b103c2b6db14a318f79dcf361030da5 /source/blender/blenfont/intern/blf.c | |
parent | 1b95d684afd7153a16ebb6d9af16b60b56fc1159 (diff) |
Move texture draw to blf_util.c, now both font used it.
A little cleanup on the internal font, it's possible load the old
bmfont with: BLF_load_mem(name, NULL, 0) where name can be: helv,
helvb or scr.
Note that the internal font also support both draw, texture and bitmap,
by default always used texture.
Remove some old lang function that I left there and don't exist any more
because the locale are now in the RNA.
Small changes to Style's, so if we build without freetype2 by default
go back to the internal font, this is a little ugly (and have the old
problem of scale) but now blender always show text (need work a little
more there).
Diffstat (limited to 'source/blender/blenfont/intern/blf.c')
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index e5c1e675294..e43d7905cf9 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -185,7 +185,7 @@ int BLF_load_mem(char *name, unsigned char *mem, int mem_size) if (!font) { #ifdef WITH_FREETYPE2 if (!mem || !mem_size) { - printf("Can't load font, %s from memory!!\n", name); + printf("Can't load font: %s from memory!!\n", name); return(-1); } @@ -193,7 +193,7 @@ int BLF_load_mem(char *name, unsigned char *mem, int mem_size) #endif /* WITH_FREETYPE2 */ if (!font) { - printf("Can't load font, %s from memory!!\n", name); + printf("Can't load font: %s from memory!!\n", name); return(-1); } } @@ -215,6 +215,16 @@ int BLF_get(void) return(global_font_cur); } +int BLF_type_get(void) +{ + FontBLF *font; + + font= global_font[global_font_cur]; + if (font) + return(font->type); + return(-1); +} + void BLF_enable(int option) { FontBLF *font; |