|
Blender V5.0
|
Go to the source code of this file.
Classes | |
| struct | CharTrans |
| struct | EditFontSelBox |
| struct | EditFont |
Macros | |
| #define | FO_CURS_IS_MOTION(mode) |
Enumerations | |
| enum | eEditFontMode { FO_EDIT = 0 , FO_CURS = 1 , FO_CURSUP = 2 , FO_CURSDOWN = 3 , FO_DUPLI = 4 , FO_PAGEUP = 8 , FO_PAGEDOWN = 9 , FO_LINE_BEGIN = 10 , FO_LINE_END = 11 , FO_SELCHANGE = 12 } |
Functions | |
VFont API | |
See vfont.c. | |
| bool | BKE_vfont_is_builtin (const VFont *vfont) |
| void | BKE_vfont_builtin_register (const void *mem, int size) |
| VFont * | BKE_vfont_builtin_ensure () |
| void | BKE_vfont_data_ensure (VFont *vfont) |
| void | BKE_vfont_data_free (VFont *vfont) |
| VFont * | BKE_vfont_load (Main *bmain, const char *filepath) |
| VFont * | BKE_vfont_load_exists_ex (Main *bmain, const char *filepath, bool *r_exists) |
| VFont * | BKE_vfont_load_exists (Main *bmain, const char *filepath) |
| int | BKE_vfont_select_get (const Curve *cu, int *r_start, int *r_end) |
| void | BKE_vfont_select_clamp (Curve *cu) |
| void | BKE_vfont_clipboard_free () |
| void | BKE_vfont_clipboard_set (const char32_t *text_buf, const CharInfo *info_buf, size_t len) |
| void | BKE_vfont_clipboard_get (char32_t **r_text_buf, CharInfo **r_info_buf, size_t *r_len_utf8, size_t *r_len_utf32) |
VFont Curve & Text Layout API | |
See vfont_curve.c. | |
| int | BKE_vfont_cursor_to_text_index (Object *ob, const blender::float2 &cursor_location) |
| bool | BKE_vfont_to_curve (Object *ob, eEditFontMode mode) |
| void | BKE_vfont_char_build (const Curve &cu, ListBase *nubase, unsigned int charcode, const CharInfo *info, bool is_smallcaps, const blender::float2 &offset, float rotate, int charidx, float fsize) |
| bool | BKE_vfont_to_curve_ex (Object *ob, const Curve &cu, eEditFontMode mode, ListBase *r_nubase, const char32_t **r_text, int *r_text_len, bool *r_text_free, CharTrans **r_chartransdata, float *r_font_size_eval) |
| bool | BKE_vfont_to_curve_nubase (Object *ob, eEditFontMode mode, ListBase *r_nubase) |
| #define FO_CURS_IS_MOTION | ( | mode | ) |
BKE_vfont_to_curve will move the cursor in these cases.
Definition at line 91 of file BKE_vfont.hh.
Referenced by move_cursor(), and vfont_to_curve().
| enum eEditFontMode |
| Enumerator | |
|---|---|
| FO_EDIT | |
| FO_CURS | |
| FO_CURSUP | |
| FO_CURSDOWN | |
| FO_DUPLI | |
| FO_PAGEUP | |
| FO_PAGEDOWN | |
| FO_LINE_BEGIN | |
| FO_LINE_END | |
| FO_SELCHANGE | |
Definition at line 77 of file BKE_vfont.hh.
| VFont * BKE_vfont_builtin_ensure | ( | ) |
Return the built-in VFont, without adding a user (the user-count may be zero). The caller is responsible for adding a user.
Definition at line 386 of file vfont.cc.
References BKE_vfont_is_builtin(), BKE_vfont_load(), BLI_assert, FO_BUILTIN_NAME, G_MAIN, VFont::id, id_us_min(), LISTBASE_FOREACH, and ID::us.
Referenced by BKE_curve_init(), font_unlink_exec(), blender::nodes::node_geo_string_to_curves_cc::node_init(), and txt_add_object().
| void BKE_vfont_builtin_register | ( | const void * | mem, |
| int | size ) |
Definition at line 282 of file vfont.cc.
References builtin_font_data, builtin_font_size, and size().
Referenced by main(), and BlendfileLoadingBaseTest::SetUpTestCase().
| void BKE_vfont_char_build | ( | const Curve & | cu, |
| ListBase * | nubase, | ||
| unsigned int | charcode, | ||
| const CharInfo * | info, | ||
| bool | is_smallcaps, | ||
| const blender::float2 & | offset, | ||
| float | rotate, | ||
| int | charidx, | ||
| float | fsize ) |
Definition at line 489 of file vfont_curve.cc.
References rotate(), vfont_char_build_impl(), vfont_char_find(), vfont_data_ensure_with_lock(), and vfont_from_charinfo().
Referenced by blender::nodes::node_geo_string_to_curves_cc::create_curve_instances().
| void BKE_vfont_clipboard_free | ( | ) |
Definition at line 471 of file vfont.cc.
References g_vfont_clipboard, and MEM_SAFE_FREE.
Referenced by BKE_vfont_clipboard_set(), paste_text_exec(), and WM_exit_ex().
| void BKE_vfont_clipboard_get | ( | char32_t ** | r_text_buf, |
| CharInfo ** | r_info_buf, | ||
| size_t * | r_len_utf8, | ||
| size_t * | r_len_utf32 ) |
Definition at line 509 of file vfont.cc.
References g_vfont_clipboard.
Referenced by copy_selection(), paste_selection(), and paste_text_exec().
| void BKE_vfont_clipboard_set | ( | const char32_t * | text_buf, |
| const CharInfo * | info_buf, | ||
| size_t | len ) |
Definition at line 479 of file vfont.cc.
References BKE_vfont_clipboard_free(), BLI_str_utf32_as_utf8_len(), g_vfont_clipboard, len, MEM_freeN(), and MEM_malloc_arrayN().
Referenced by copy_selection().
| int BKE_vfont_cursor_to_text_index | ( | Object * | ob, |
| const blender::float2 & | cursor_location ) |
Definition at line 1876 of file vfont_curve.cc.
References VFontCursor_Params::cursor_location, data, Object::data, ELEM, FO_CURS, FONT_TO_CURVE_SCALE_ITERATIONS, Curve::nurb, VFontCursor_Params::r_string_offset, Curve::totbox, vfont_to_curve(), VFONT_TO_CURVE_BISECT, VFONT_TO_CURVE_INIT, and VFONT_TO_CURVE_SCALE_ONCE.
Referenced by font_cursor_text_index_from_event().
| void BKE_vfont_data_ensure | ( | VFont * | vfont | ) |
Definition at line 202 of file vfont.cc.
References BKE_packedfile_duplicate(), BKE_packedfile_free(), BKE_packedfile_new(), BKE_vfont_is_builtin(), BKE_vfontdata_from_freetypefont(), CLOG_WARN, VFont::data, VFont::filepath, VFont::id, ID_BLEND_PATH_FROM_GLOBAL, LOG, VFont::packedfile, packedfile_new_from_builtin(), pf, and VFont::temp_pf.
Referenced by vfont_data_ensure_with_lock().
| void BKE_vfont_data_free | ( | VFont * | vfont | ) |
Definition at line 242 of file vfont.cc.
References Nurb::bezt, BKE_packedfile_free(), BLI_freelinkN(), BLI_ghash_free(), BLI_ghashIterator_getValue(), VFontData::characters, VFont::data, ListBase::first, GHASH_ITER, MEM_freeN(), VChar::nurbsbase, and VFont::temp_pf.
Referenced by vfont_free_data().
| bool BKE_vfont_is_builtin | ( | const VFont * | vfont | ) |
Definition at line 277 of file vfont.cc.
References VFont::filepath, FO_BUILTIN_NAME, and STREQ.
Referenced by BKE_packedfile_pack_all(), BKE_vfont_builtin_ensure(), BKE_vfont_data_ensure(), BKE_vfontdata_char_from_freetypefont(), open_invoke(), ui_tooltip_from_vfont(), and vfont_foreach_path().
Definition at line 303 of file vfont.cc.
References BKE_libblock_alloc(), BKE_main_blendfile_path(), BKE_packedfile_free(), BKE_packedfile_new(), BKE_vfontdata_from_freetypefont(), BLI_path_split_file_part(), VFont::data, FILE_MAXFILE, VFont::filepath, FO_BUILTIN_NAME, G, G_FILE_AUTOPACK, ID_VF, VFontData::name, VFont::packedfile, packedfile_new_from_builtin(), pf, STREQ, STRNCPY(), and VFont::temp_pf.
Referenced by BKE_vfont_builtin_ensure(), BKE_vfont_load_exists_ex(), and font_open_exec().
Definition at line 381 of file vfont.cc.
References BKE_vfont_load_exists_ex().
Definition at line 354 of file vfont.cc.
References BKE_main_blendfile_path(), BKE_vfont_load(), BLI_path_abs(), BLI_path_cmp, FILE_MAX, Main::fonts, ID_BLEND_PATH, id_us_plus(), LISTBASE_FOREACH, and STRNCPY().
Referenced by BKE_vfont_load_exists().
| void BKE_vfont_select_clamp | ( | Curve * | cu | ) |
Definition at line 447 of file vfont.cc.
References BLI_assert, CLAMP_MAX, Curve::editfont, EditFont::len, OB_FONT, Curve::ob_type, EditFont::pos, EditFont::selend, and EditFont::selstart.
Referenced by delete_exec(), and ED_curve_editfont_make().
| int BKE_vfont_select_get | ( | const Curve * | cu, |
| int * | r_start, | ||
| int * | r_end ) |
Definition at line 408 of file vfont.cc.
References BLI_assert, Curve::editfont, EditFont::len, OB_FONT, Curve::ob_type, EditFont::pos, EditFont::selend, and EditFont::selstart.
Referenced by change_spacing_exec(), copy_selection(), cut_text_exec(), delete_exec(), font_paste_wchar(), font_select_to_buffer(), kill_selection(), material_slot_assign_exec(), move_cursor_drop_select(), set_case(), set_style(), toggle_style_exec(), and vfont_to_curve().
| bool BKE_vfont_to_curve | ( | Object * | ob, |
| eEditFontMode | mode ) |
Definition at line 1921 of file vfont_curve.cc.
References BKE_vfont_to_curve_ex(), Object::data, and Curve::nurb.
Referenced by move_cursor(), and text_update_edited().
| bool BKE_vfont_to_curve_ex | ( | Object * | ob, |
| const Curve & | cu, | ||
| eEditFontMode | mode, | ||
| ListBase * | r_nubase, | ||
| const char32_t ** | r_text, | ||
| int * | r_text_len, | ||
| bool * | r_text_free, | ||
| CharTrans ** | r_chartransdata, | ||
| float * | r_font_size_eval ) |
Definition at line 1842 of file vfont_curve.cc.
References data, ELEM, FONT_TO_CURVE_SCALE_ITERATIONS, Curve::totbox, vfont_to_curve(), VFONT_TO_CURVE_BISECT, VFONT_TO_CURVE_INIT, and VFONT_TO_CURVE_SCALE_ONCE.
Referenced by BKE_curve_minmax(), BKE_vfont_to_curve(), BKE_vfont_to_curve_nubase(), blender::ed::object::convert_font_to_curve_legacy_generic(), blender::nodes::node_geo_string_to_curves_cc::get_text_layout(), and make_duplis_font().
| bool BKE_vfont_to_curve_nubase | ( | Object * | ob, |
| eEditFontMode | mode, | ||
| ListBase * | r_nubase ) |
Definition at line 1913 of file vfont_curve.cc.
References BKE_vfont_to_curve_ex(), BLI_assert, Object::data, OB_FONT, and Object::type.
Referenced by curve_from_font_object(), and evaluate_curve_type_object().