|
Blender V4.3
|
#include "BLI_sys_types.h"Go to the source code of this file.
Classes | |
| struct | CharTrans |
| struct | EditFontSelBox |
| struct | EditFont |
Macros | |
| #define | FO_CURS_IS_MOTION(mode) (ELEM(mode, FO_CURSUP, FO_CURSDOWN, FO_PAGEUP, FO_PAGEDOWN)) |
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_SELCHANGE = 10 } |
Functions | |
| bool | BKE_vfont_is_builtin (const VFont *vfont) |
| void | BKE_vfont_builtin_register (const void *mem, int size) |
| void | BKE_vfont_free_data (VFont *vfont) |
| VFont * | BKE_vfont_builtin_get () |
| 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) |
| bool | BKE_vfont_to_curve_ex (Object *ob, Curve *cu, eEditFontMode mode, ListBase *r_nubase, const char32_t **r_text, int *r_text_len, bool *r_text_free, CharTrans **r_chartransdata) |
| bool | BKE_vfont_to_curve_nubase (Object *ob, eEditFontMode mode, ListBase *r_nubase) |
| int | BKE_vfont_cursor_to_text_index (Object *ob, const float cursor_location[2]) |
| bool | BKE_vfont_to_curve (Object *ob, eEditFontMode mode) |
| void | BKE_vfont_build_char (Curve *cu, ListBase *nubase, unsigned int character, const CharInfo *info, float ofsx, float ofsy, float rot, int charidx, float fsize) |
| int | BKE_vfont_select_get (Object *ob, int *r_start, int *r_end) |
| void | BKE_vfont_select_clamp (Object *ob) |
| 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) |
| #define FO_CURS_IS_MOTION | ( | mode | ) | (ELEM(mode, FO_CURSUP, FO_CURSDOWN, FO_PAGEUP, FO_PAGEDOWN)) |
Definition at line 80 of file BKE_vfont.hh.
Referenced by move_cursor().
| enum eEditFontMode |
| Enumerator | |
|---|---|
| FO_EDIT | |
| FO_CURS | |
| FO_CURSUP | |
| FO_CURSDOWN | |
| FO_DUPLI | |
| FO_PAGEUP | |
| FO_PAGEDOWN | |
| FO_SELCHANGE | |
Definition at line 68 of file BKE_vfont.hh.
| void BKE_vfont_build_char | ( | Curve * | cu, |
| ListBase * | nubase, | ||
| unsigned int | character, | ||
| const CharInfo * | info, | ||
| float | ofsx, | ||
| float | ofsy, | ||
| float | rot, | ||
| int | charidx, | ||
| float | fsize ) |
Definition at line 507 of file vfont.cc.
References Nurb::bezt, BLI_addtail(), Nurb::bp, Nurb::charidx, cosf, CU_CHINFO_SMALLCAPS_CHECK, CU_SMOOTH, find_vfont_char(), ListBase::first, CharInfo::flag, Nurb::flag, Nurb::knotsu, Nurb::knotsv, CharInfo::mat_nr, Nurb::mat_nr, MEM_freeN(), MEM_malloc_arrayN, MEM_mallocN, Nurb::next, VChar::nurbsbase, Nurb::pntsu, Curve::resolu, Nurb::resolu, rot, Curve::shear, sinf, Curve::smallcaps_scale, BezTriple::vec, vfont_get_data(), and which_vfont().
Referenced by blender::nodes::node_geo_string_to_curves_cc::create_curve_instances(), and vfont_to_curve().
| VFont * BKE_vfont_builtin_get | ( | ) |
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 422 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 237 of file vfont.cc.
References builtin_font_data, builtin_font_size, and size().
Referenced by main(), and BlendfileLoadingBaseTest::SetUpTestCase().
| void BKE_vfont_clipboard_free | ( | ) |
Definition at line 2063 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 2101 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 2071 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().
Definition at line 2007 of file vfont.cc.
References VFontCursor_Params::cursor_location, Object::data, ELEM, FO_CURS, FONT_TO_CURVE_SCALE_ITERATIONS, VFontToCurveIter::iteraction, 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_free_data | ( | VFont * | vfont | ) |
Definition at line 200 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 232 of file vfont.cc.
References VFont::filepath, FO_BUILTIN_NAME, and STREQ.
Referenced by BKE_packedfile_pack_all(), BKE_vfont_builtin_get(), BKE_vfontdata_char_from_freetypefont(), open_invoke(), vfont_foreach_path(), and vfont_get_data().
Definition at line 325 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, get_builtin_packedfile(), ID_VF, VFontData::name, VFont::packedfile, pf, STREQ, STRNCPY, and VFont::temp_pf.
Referenced by BKE_vfont_builtin_get(), BKE_vfont_load_exists_ex(), and font_open_exec().
Definition at line 403 of file vfont.cc.
References BKE_vfont_load_exists_ex().
Definition at line 376 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 | ( | Object * | ob | ) |
Definition at line 670 of file vfont.cc.
References BLI_assert, CLAMP_MAX, Object::data, Curve::editfont, EditFont::len, OB_FONT, EditFont::pos, EditFont::selend, EditFont::selstart, and Object::type.
Referenced by delete_exec(), and ED_curve_editfont_make().
Definition at line 630 of file vfont.cc.
References BLI_assert, Object::data, Curve::editfont, EditFont::len, OB_FONT, EditFont::pos, EditFont::selend, EditFont::selstart, and Object::type.
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(), set_case(), set_style(), toggle_style_exec(), and vfont_to_curve().
| bool BKE_vfont_to_curve | ( | Object * | ob, |
| eEditFontMode | mode ) |
Definition at line 2044 of file vfont.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, |
| Curve * | cu, | ||
| eEditFontMode | mode, | ||
| ListBase * | r_nubase, | ||
| const char32_t ** | r_text, | ||
| int * | r_text_len, | ||
| bool * | r_text_free, | ||
| CharTrans ** | r_chartransdata ) |
Definition at line 1983 of file vfont.cc.
References ELEM, FONT_TO_CURVE_SCALE_ITERATIONS, VFontToCurveIter::iteraction, 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::nodes::node_geo_string_to_curves_cc::get_text_layout(), make_duplis_font(), and blender::ed::object::object_convert_exec().
| bool BKE_vfont_to_curve_nubase | ( | Object * | ob, |
| eEditFontMode | mode, | ||
| ListBase * | r_nubase ) |
Definition at line 2036 of file vfont.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().