diff options
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 5771eb053f7..958acf0589b 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -78,7 +78,7 @@ static void vfont_init_data(ID *id) if (vfd) { vfont->data = vfd; - BLI_strncpy(vfont->name, FO_BUILTIN_NAME, sizeof(vfont->name)); + BLI_strncpy(vfont->filepath, FO_BUILTIN_NAME, sizeof(vfont->filepath)); } /* Free the packed file */ @@ -177,7 +177,7 @@ static int builtin_font_size = 0; bool BKE_vfont_is_builtin(struct VFont *vfont) { - return STREQ(vfont->name, FO_BUILTIN_NAME); + return STREQ(vfont->filepath, FO_BUILTIN_NAME); } void BKE_vfont_builtin_register(void *mem, int size) @@ -237,20 +237,20 @@ static VFontData *vfont_get_data(VFont *vfont) } } else { - pf = BKE_packedfile_new(NULL, vfont->name, ID_BLEND_PATH_FROM_GLOBAL(&vfont->id)); + pf = BKE_packedfile_new(NULL, vfont->filepath, ID_BLEND_PATH_FROM_GLOBAL(&vfont->id)); if (vfont->temp_pf == NULL) { vfont->temp_pf = BKE_packedfile_new( - NULL, vfont->name, ID_BLEND_PATH_FROM_GLOBAL(&vfont->id)); + NULL, vfont->filepath, ID_BLEND_PATH_FROM_GLOBAL(&vfont->id)); } } if (!pf) { - CLOG_WARN(&LOG, "Font file doesn't exist: %s", vfont->name); + CLOG_WARN(&LOG, "Font file doesn't exist: %s", vfont->filepath); /* DON'T DO THIS * missing file shouldn't modify path! - campbell */ #if 0 - strcpy(vfont->name, FO_BUILTIN_NAME); + strcpy(vfont->filepath, FO_BUILTIN_NAME); #endif pf = get_builtin_packedfile(); } @@ -301,7 +301,7 @@ VFont *BKE_vfont_load(Main *bmain, const char *filepath) if (vfd->name[0] != '\0') { BLI_strncpy(vfont->id.name + 2, vfd->name, sizeof(vfont->id.name) - 2); } - BLI_strncpy(vfont->name, filepath, sizeof(vfont->name)); + BLI_strncpy(vfont->filepath, filepath, sizeof(vfont->filepath)); /* if autopack is on store the packedfile in de font structure */ if (!is_builtin && (G.fileflags & G_FILE_AUTOPACK)) { @@ -333,7 +333,7 @@ VFont *BKE_vfont_load_exists_ex(struct Main *bmain, const char *filepath, bool * /* first search an identical filepath */ for (vfont = bmain->fonts.first; vfont; vfont = vfont->id.next) { - BLI_strncpy(strtest, vfont->name, sizeof(vfont->name)); + BLI_strncpy(strtest, vfont->filepath, sizeof(vfont->filepath)); BLI_path_abs(strtest, ID_BLEND_PATH(bmain, &vfont->id)); if (BLI_path_cmp(strtest, str) == 0) { @@ -797,7 +797,7 @@ static bool vfont_to_curve(Object *ob, } else { char32_t *mem_tmp; - slen = cu->len_wchar; + slen = cu->len_char32; /* Create unicode string */ mem_tmp = MEM_malloc_arrayN((slen + 1), sizeof(*mem_tmp), "convertedmem"); |