diff options
author | Rob Haarsma <phaseIV@zonnet.nl> | 2003-05-12 18:23:03 +0400 |
---|---|---|
committer | Rob Haarsma <phaseIV@zonnet.nl> | 2003-05-12 18:23:03 +0400 |
commit | 331eb81e09d78e51b4b3b4af687a4eb0ac6b5d81 (patch) | |
tree | 4965186b3b6830425905274dcd5332fa760b5fbf /source/blender/src/language.c | |
parent | efa0b4ef436a9e0e5392ef2fd08e1f85526816ae (diff) |
modified so .Blanguages and .bfont get loaded from .blender dir.
the path to the selected ui font gets stored in the U.fontdir userprefs.
fixed a fullscreen thingie for windows.
Diffstat (limited to 'source/blender/src/language.c')
-rw-r--r-- | source/blender/src/language.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/src/language.c b/source/blender/src/language.c index da8e333798b..bb1ca0b8705 100644 --- a/source/blender/src/language.c +++ b/source/blender/src/language.c @@ -140,6 +140,8 @@ void set_interface_font(char *str) { lang_setlanguage(); BLI_split_dirfile(str, di, U.fontname); + if(strlen(di) < FILE_MAXDIR) strcpy(U.fontdir, di); + G.ui_international = TRUE; } else { sprintf(U.fontname, "Invalid font."); @@ -168,7 +170,7 @@ void start_interface_font(void) { U.language= 0; U.fontsize= 11; U.encoding= 0; - sprintf(U.fontname, ".bfont.ttf\0"); + sprintf(U.fontname, ".blender/.bfont.ttf\0"); result = FTF_SetFont(U.fontname, U.fontsize); } @@ -180,6 +182,8 @@ void start_interface_font(void) { } else { printf("no font found for international support\n"); G.ui_international = FALSE; + U.transopts &= ~TR_ALL; + U.fontsize = 0; } allqueue(REDRAWALL, 0); @@ -253,12 +257,18 @@ int read_languagefile(void) { lines= BLI_read_file_as_lines(name); if(lines == NULL) { - /* If not found in home, try current dir */ - strcpy(name, ".Blanguages"); + /* If not found in home, try .blender dir */ + strcpy(name, ".blender\\.Blanguages"); lines= BLI_read_file_as_lines(name); + if(lines == NULL) { - error("File \".Blanguages\" not found"); - return 0; + /* If not found in .blender, try current dir */ + strcpy(name, ".Blanguages"); + lines= BLI_read_file_as_lines(name); + if(lines == NULL) { + error("File \".Blanguages\" not found"); + return 0; + } } } |