67 VFont *vfont = id_cast<VFont *>(
id);
86 std::optional<Library *> ,
91 VFont *vfont_dst = id_cast<VFont *>(id_dst);
103 if (vfont_dst->
data) {
111 VFont *vfont = id_cast<VFont *>(
id);
122 VFont *vfont = id_cast<VFont *>(
id);
139 VFont *vf = id_cast<VFont *>(
id);
140 const bool is_undo = writer->
is_undo();
161 VFont *vf = id_cast<VFont *>(
id);
168 .id_code = VFont::id_type,
170 .dependencies_id_types = 0,
172 .struct_size =
sizeof(
VFont),
174 .name_plural =
N_(
"fonts"),
177 .asset_type_info =
nullptr,
182 .make_local =
nullptr,
183 .foreach_id =
nullptr,
184 .foreach_cache =
nullptr,
186 .foreach_working_space_color =
nullptr,
187 .foreach_asset_weak_reference =
nullptr,
188 .owner_pointer_get =
nullptr,
192 .blend_read_after_liblink =
nullptr,
194 .blend_read_undo_preserve =
nullptr,
196 .lib_override_apply_post =
nullptr,
216 if (vfont->
temp_pf ==
nullptr) {
223 if (vfont->
temp_pf ==
nullptr) {
250 if (che ==
nullptr) {
254 while (che->nurbsbase.first()) {
255 Nurb *nu = che->nurbsbase.first();
257 MEM_delete(nu->
bezt);
268 MEM_delete(vfont->
data);
269 vfont->
data =
nullptr;
307 VFont *vfont =
nullptr;
330 vfont =
static_cast<VFont *
>(
359 STRNCPY(filepath_abs, filepath);
427 int start, end, direction;
453 if (start == end + 1) {
504 if (text ==
nullptr) {
508 info = MEM_new_array<CharInfo>(
len, __func__);
509 if (info ==
nullptr) {
514 memcpy(text, text_buf,
len *
sizeof(*text));
A structure to represent vector fonts, and to load them from PostScript fonts.
#define BLT_I18NCONTEXT_ID_VFONT
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
#define ID_BLEND_PATH(_bmain, _id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
#define pf(_x, _i)
Prefetch 64.
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
std::string filename(const std::string_view &str, size_t pos)
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BKE_packedfile_blend_write(BlendWriter *writer, const PackedFile *pf)
static void vfont_free_data(ID *id)
static void vfont_blend_read_data(BlendDataReader *reader, ID *id)
char * STRNCPY(char(&dst)[N], const char *src)
VFont * BKE_vfont_load_exists_ex(Main *bmain, const char *filepath, bool *r_exists)
PackedFile * BKE_packedfile_duplicate(const PackedFile *pf_src)
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
bool BKE_vfont_is_builtin(const VFont *vfont)
void BKE_vfont_packfile_ensure(Main *bmain, VFont *vfont, ReportList *reports)
void BKE_vfont_clipboard_set(const char32_t *text_buf, const CharInfo *info_buf, size_t len)
void BKE_packedfile_free(PackedFile *pf)
PackedFile * BKE_packedfile_new(ReportList *reports, const char *filepath_rel, const char *basepath)
void BKE_id_blend_write(BlendWriter *writer, ID *id)
static struct blender::@161346021153211343265151217245342146117057105015 g_vfont_clipboard
@ LIB_ID_CREATE_NO_USER_REFCOUNT
void BKE_vfont_select_clamp(Curve *cu)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
static void vfont_blend_write(BlendWriter *writer, ID *id, const void *id_address)
static PackedFile * packedfile_new_from_builtin()
VFontData * BKE_vfontdata_from_freetypefont(PackedFile *pf)
const void * builtin_font_data
static void vfont_init_data(ID *id)
void BKE_vfont_clipboard_get(char32_t **r_text_buf, CharInfo **r_info_buf, size_t *r_len_utf8, size_t *r_len_utf32)
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BKE_vfont_data_ensure(VFont *vfont)
int BKE_vfont_select_get(const Curve *cu, int *r_start, int *r_end)
VFont * BKE_vfont_load_exists(Main *bmain, const char *filepath)
static void vfont_copy_data(Main *, std::optional< Library * >, ID *id_dst, const ID *, const int flag)
@ BKE_BPATH_FOREACH_PATH_SKIP_PACKED
void void void BLI_path_split_file_part(const char *filepath, char *file, size_t file_maxncpy) ATTR_NONNULL(1
bool BKE_bpath_foreach_path_fixed_process(BPathForeachPathData *bpath_data, char *path, size_t path_maxncpy)
void BKE_vfont_builtin_register(const void *mem, int size)
void BKE_vfont_clipboard_free()
VFontData * BKE_vfontdata_copy(const VFontData *vfont_src, int flag)
VFont * BKE_vfont_builtin_ensure()
VFont * BKE_vfont_load(Main *bmain, const char *filepath)
void BKE_vfont_data_free(VFont *vfont)
void BKE_packedfile_blend_read(BlendDataReader *reader, PackedFile **pf_p, StringRefNull filepath)
static void vfont_foreach_path(ID *id, BPathForeachPathData *bpath_data)
size_t BLI_str_utf32_as_utf8_len(const char32_t *src) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
PackedFile * BKE_packedfile_new_from_memory(const void *mem, int memlen, const ImplicitSharingInfo *sharing_info=nullptr)
void * BKE_libblock_alloc(Main *bmain, short type, const char *name, int flag) ATTR_WARN_UNUSED_RESULT
@ IDTYPE_FLAGS_NO_ANIMDATA
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
void write_id_struct(const void *id_address, const T *id, BlendStructWriterTypedFn< T > fn=nullptr)
struct EditFont * editfont
Map< uint, struct VChar * > * characters
struct PackedFile * packedfile
struct PackedFile * temp_pf