diff options
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/intern/blf_lang.c | 7 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_translation.c | 12 |
2 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index ec9501c06a6..d5245073e59 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -103,10 +103,13 @@ void BLF_lang_init(void) BLI_strncpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT, sizeof(global_encoding_name)); - if (messagepath) + if (messagepath) { BLI_strncpy(global_messagepath, messagepath, sizeof(global_messagepath)); - else + } + else { + printf("%s: 'locale' data path for translations not found, continuing\n", __func__); global_messagepath[0]= '\0'; + } } diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c index 8c0a26df4c2..90d9c4a5981 100644 --- a/source/blender/blenfont/intern/blf_translation.c +++ b/source/blender/blenfont/intern/blf_translation.c @@ -38,6 +38,7 @@ #include "MEM_guardedalloc.h" +#include "BLI_utildefines.h" #include "BLI_path_util.h" #include "BLI_string.h" #include "BLI_path_util.h" @@ -54,11 +55,16 @@ unsigned char *BLF_get_unifont(int *unifont_size_r) { if(unifont_ttf==NULL) { char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts"); - char unifont_path[1024]; + if (fontpath) { + char unifont_path[1024]; - BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename); + BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename); - unifont_ttf= (unsigned char*)BLI_ungzip_to_mem(unifont_path, &unifont_size); + unifont_ttf= (unsigned char*)BLI_ungzip_to_mem(unifont_path, &unifont_size); + } + else { + printf("%s: 'fonts' data path not found for international font, continuing\n", __func__); + } } *unifont_size_r= unifont_size; |