diff options
author | Mika Saari <mika.saari@wipsl.com> | 2005-10-28 19:36:09 +0400 |
---|---|---|
committer | Mika Saari <mika.saari@wipsl.com> | 2005-10-28 19:36:09 +0400 |
commit | 7ddf38a8b95920bc6908b6d77a8f0018ff8e646c (patch) | |
tree | 554bf75ebd20b86af73473d4af20236b81ce55c1 /source/blender/src/interface_draw.c | |
parent | 7cfa2ac608de4485f987deac0a180bf80d9b37c3 (diff) |
Fixing Bug: 3273, Removing my goto calls from font.c.
Diffstat (limited to 'source/blender/src/interface_draw.c')
-rw-r--r-- | source/blender/src/interface_draw.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c index 81e191ee17c..966d402a009 100644 --- a/source/blender/src/interface_draw.c +++ b/source/blender/src/interface_draw.c @@ -66,6 +66,7 @@ #include "BKE_utildefines.h" #include "BKE_font.h" #include "BKE_global.h" +#include "datatoc.h" /* std font */ #include "BIF_gl.h" #include "BIF_graphics.h" @@ -1717,6 +1718,7 @@ static void ui_draw_but_CHARTAB(uiBut *but) wchar_t wstr[2]; unsigned char ustr[16]; PackedFile *pf; + int result = 0; /* Calculate the size of the button */ width = abs(but->x2 - but->x1); @@ -1824,6 +1826,21 @@ static void ui_draw_but_CHARTAB(uiBut *but) ex = but->x1 + butw; } glShadeModel(GL_FLAT); + + /* Return Font Settings to original */ + if(U.fontsize && U.fontname[0]) + { + result = FTF_SetFont(U.fontname, 0, U.fontsize); + } + else if (U.fontsize) + { + result = FTF_SetFont(datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize); + } + + if (result == 0) + { + result = FTF_SetFont(datatoc_bfont_ttf, datatoc_bfont_ttf_size, 11); + } } #endif // INTERNATIONAL |