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:
authorRob Haarsma <phaseIV@zonnet.nl>2005-01-19 16:53:43 +0300
committerRob Haarsma <phaseIV@zonnet.nl>2005-01-19 16:53:43 +0300
commit9fddd2bdec4f879a44304118e2f44929c2755483 (patch)
treec21b1edc62e879a28d8d5ded054a00a899e4dbc3 /source/blender/src/language.c
parent731c69d6ed04628d93ae313397cb5c8f85078ea0 (diff)
Added experimental option to use GL textured interface fonts.
Set preferred method in userprefs->language & font. Kinda requested by Kaito, i'm sure he regrets after seeing my code changes. This commit includes a patch provided by Jacques Baurain, which seemed nescessary to handle font sizing properly. Thank you !
Diffstat (limited to 'source/blender/src/language.c')
-rw-r--r--source/blender/src/language.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/source/blender/src/language.c b/source/blender/src/language.c
index 55e0b864abc..8f9c476a142 100644
--- a/source/blender/src/language.c
+++ b/source/blender/src/language.c
@@ -28,6 +28,10 @@
*/
+#ifdef WIN32
+#include "BLI_winstuff.h"
+#endif
+
#include <string.h>
#include <stdlib.h>
@@ -40,6 +44,7 @@
#include "BLI_blenlib.h"
#include "BLI_linklist.h" /* linknode */
+#include "BIF_gl.h"
#include "BIF_language.h"
#include "BIF_space.h" /* allqueue() */
#include "BIF_toolbox.h" /* error() */
@@ -66,20 +71,51 @@ struct _LANGMenuEntry {
static LANGMenuEntry *langmenu= 0;
static int tot_lang = 0;
+float lang_texsize = 1.0;
+
#endif // INTERNATIONAL
+void BIF_RasterPos(float x, float y)
+{
+#ifdef INTERNATIONAL
+ FTF_SetPosition(x, y);
+#endif // INTERNATIONAL
+}
+
+void refresh_interface_font(void)
+{
+#ifdef INTERNATIONAL
+ if(U.transopts & USER_DOTRANSLATE)
+ start_interface_font();
+ else
+ G.ui_international = FALSE;
+#else // INTERNATIONAL
+ G.ui_international = FALSE;
+#endif
+}
int BIF_DrawString(BMF_Font* font, char *str, int translate)
{
#ifdef INTERNATIONAL
- if(G.ui_international == TRUE)
+ if(G.ui_international == TRUE) {
if(translate)
return FTF_DrawString(str, FTF_USE_GETTEXT | FTF_INPUT_UTF8);
else
return FTF_DrawString(str, FTF_NO_TRANSCONV | FTF_INPUT_UTF8);
- else
+ } else {
return BMF_DrawString(font, str);
+/*
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_BLEND);
+ BMF_GetFontTexture(font);??
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ BMF_DrawStringTexture(font, str, pen_x, pen_y, 0.0);
+ glDisable(GL_TEXTURE_2D);
+ glDisable(GL_BLEND);
+ return 0;
+*/
+ }
#else
return BMF_DrawString(font, str);
#endif