Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/font.c
| Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | void BKE_vfont_free(struct VFont *vf) | ||||
| BKE_vfont_free_data(vf); | BKE_vfont_free_data(vf); | ||||
| if (vf->packedfile) { | if (vf->packedfile) { | ||||
| freePackedFile(vf->packedfile); | freePackedFile(vf->packedfile); | ||||
| vf->packedfile = NULL; | vf->packedfile = NULL; | ||||
| } | } | ||||
| } | } | ||||
| void BKE_vfont_copy_data(Main *UNUSED(bmain), VFont *vfont_dst, const VFont *UNUSED(vfont_src), const int flag) | |||||
| { | |||||
| /* We never handle usercount here for own data. */ | |||||
| const int flag_subdata = flag | LIB_ID_COPY_NO_USER_REFCOUNT; | |||||
| /* Just to be sure, should not have any value actually after reading time. */ | |||||
| vfont_dst->temp_pf = NULL; | |||||
| if (vfont_dst->packedfile) { | |||||
| vfont_dst->packedfile = dupPackedFile(vfont_dst->packedfile); | |||||
| } | |||||
| if (vfont_dst->data) { | |||||
| vfont_dst->data = BLI_vfontdata_copy(vfont_dst->data, flag_subdata); | |||||
| } | |||||
| } | |||||
| static void *builtin_font_data = NULL; | static void *builtin_font_data = NULL; | ||||
| static int builtin_font_size = 0; | static int builtin_font_size = 0; | ||||
| bool BKE_vfont_is_builtin(struct VFont *vfont) | bool BKE_vfont_is_builtin(struct VFont *vfont) | ||||
| { | { | ||||
| return STREQ(vfont->name, FO_BUILTIN_NAME); | return STREQ(vfont->name, FO_BUILTIN_NAME); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,287 Lines • Show Last 20 Lines | |||||