|
Blender
V2.93
|
Go to the source code of this file.
Functions | |
| void | blf_batch_draw_begin (struct FontBLF *font) |
| void | blf_batch_draw (void) |
| unsigned int | blf_next_p2 (unsigned int x) |
| unsigned int | blf_hash (unsigned int val) |
| char * | blf_dir_search (const char *file) |
| char * | blf_dir_metrics_search (const char *filename) |
| int | blf_font_init (void) |
| void | blf_font_exit (void) |
| bool | blf_font_id_is_valid (int fontid) |
| void | blf_draw_buffer__start (struct FontBLF *font) |
| void | blf_draw_buffer__end (void) |
| struct FontBLF * | blf_font_new (const char *name, const char *filename) |
| struct FontBLF * | blf_font_new_from_mem (const char *name, const unsigned char *mem, int mem_size) |
| void | blf_font_attach_from_mem (struct FontBLF *font, const unsigned char *mem, int mem_size) |
| void | blf_font_size (struct FontBLF *font, unsigned int size, unsigned int dpi) |
| void | blf_font_draw (struct FontBLF *font, const char *str, size_t len, struct ResultBLF *r_info) |
| void | blf_font_draw__wrap (struct FontBLF *font, const char *str, size_t len, struct ResultBLF *r_info) |
| void | blf_font_draw_ascii (struct FontBLF *font, const char *str, size_t len, struct ResultBLF *r_info) |
| int | blf_font_draw_mono (struct FontBLF *font, const char *str, size_t len, int cwidth) |
| void | blf_font_draw_buffer (struct FontBLF *font, const char *str, size_t len, struct ResultBLF *r_info) |
| void | blf_font_draw_buffer__wrap (struct FontBLF *font, const char *str, size_t len, struct ResultBLF *r_info) |
| size_t | blf_font_width_to_strlen (struct FontBLF *font, const char *str, size_t len, float width, float *r_width) |
| size_t | blf_font_width_to_rstrlen (struct FontBLF *font, const char *str, size_t len, float width, float *r_width) |
| void | blf_font_boundbox (struct FontBLF *font, const char *str, size_t len, struct rctf *r_box, struct ResultBLF *r_info) |
| void | blf_font_boundbox__wrap (struct FontBLF *font, const char *str, size_t len, struct rctf *r_box, struct ResultBLF *r_info) |
| void | blf_font_width_and_height (struct FontBLF *font, const char *str, size_t len, float *r_width, float *r_height, struct ResultBLF *r_info) |
| float | blf_font_width (struct FontBLF *font, const char *str, size_t len, struct ResultBLF *r_info) |
| float | blf_font_height (struct FontBLF *font, const char *str, size_t len, struct ResultBLF *r_info) |
| float | blf_font_fixed_width (struct FontBLF *font) |
| int | blf_font_height_max (struct FontBLF *font) |
| int | blf_font_width_max (struct FontBLF *font) |
| float | blf_font_descender (struct FontBLF *font) |
| float | blf_font_ascender (struct FontBLF *font) |
| void | blf_font_boundbox_foreach_glyph (struct FontBLF *font, const char *str, size_t len, bool(*user_fn)(const char *str, const size_t str_step_ofs, const struct rcti *glyph_step_bounds, const int glyph_advance_x, const struct rctf *glyph_bounds, const int glyph_bearing[2], void *user_data), void *user_data, struct ResultBLF *r_info) |
| int | blf_font_count_missing_chars (struct FontBLF *font, const char *str, const size_t len, int *r_tot_chars) |
| void | blf_font_free (struct FontBLF *font) |
| struct KerningCacheBLF * | blf_kerning_cache_find (struct FontBLF *font) |
| struct KerningCacheBLF * | blf_kerning_cache_new (struct FontBLF *font, struct GlyphCacheBLF *gc) |
| void | blf_kerning_cache_clear (struct FontBLF *font) |
| struct GlyphCacheBLF * | blf_glyph_cache_find (struct FontBLF *font, unsigned int size, unsigned int dpi) |
| struct GlyphCacheBLF * | blf_glyph_cache_new (struct FontBLF *font) |
| struct GlyphCacheBLF * | blf_glyph_cache_acquire (struct FontBLF *font) |
| void | blf_glyph_cache_release (struct FontBLF *font) |
| void | blf_glyph_cache_clear (struct FontBLF *font) |
| void | blf_glyph_cache_free (struct GlyphCacheBLF *gc) |
| struct GlyphBLF * | blf_glyph_search (struct GlyphCacheBLF *gc, unsigned int c) |
| struct GlyphBLF * | blf_glyph_add (struct FontBLF *font, struct GlyphCacheBLF *gc, unsigned int index, unsigned int c) |
| void | blf_glyph_free (struct GlyphBLF *g) |
| void | blf_glyph_render (struct FontBLF *font, struct GlyphCacheBLF *gc, struct GlyphBLF *g, float x, float y) |
| void blf_batch_draw | ( | void | ) |
Definition at line 217 of file blf_font.c.
References BatchBLF::batch, blf_batch_cache_texture_load(), BatchBLF::col_loc, g_batch, BatchBLF::glyph_len, BatchBLF::glyph_size_loc, BatchBLF::glyph_size_step, GPU_batch_draw(), GPU_batch_program_set_builtin(), GPU_batch_texture_bind, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_SHADER_TEXT, GPU_texture_unbind(), GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_data_len_set(), GPU_vertbuf_use(), BatchBLF::offset_loc, BatchBLF::pos_loc, UI_widgetbase_draw_cache_flush(), and BatchBLF::verts.
Referenced by blf_batch_draw_begin(), BLF_batch_draw_end(), blf_batch_draw_end(), BLF_batch_draw_flush(), blf_glyph_render(), and blf_texture_draw().
| void blf_batch_draw_begin | ( | struct FontBLF * | font | ) |
Definition at line 117 of file blf_font.c.
References BatchBLF::active, BatchBLF::batch, BLF_ASPECT, blf_batch_draw(), blf_batch_draw_init(), BLF_MATRIX, BLF_ROTATION, BatchBLF::enabled, FontBLF::flags, floorf, BatchBLF::font, g_batch, GPU_matrix_model_view_get, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_set, BatchBLF::mat, NULL, BatchBLF::ofs, FontBLF::pos, BatchBLF::simple_shader, and zero_v2().
Referenced by blf_font_draw_ascii_ex(), blf_font_draw_ex(), and blf_font_draw_mono().
| char* blf_dir_metrics_search | ( | const char * | filename | ) |
Some font have additional file with metrics information, in general, the extension of the file is: .afm or .pfm
Definition at line 158 of file blf_dir.c.
References BLI_exists(), BLI_strdup(), BLI_strnlen(), MEM_freeN, and NULL.
Referenced by blf_font_new().
| char* blf_dir_search | ( | const char * | file | ) |
Definition at line 128 of file blf_dir.c.
References BKE_main_blendfile_path(), BLI_exists(), BLI_join_dirfile(), BLI_path_abs(), BLI_strdup(), BLI_strncpy(), file, FILE_MAX, ListBase::first, G_MAIN, global_font_dir, DirBLF::next, NULL, and DirBLF::path.
Referenced by BLF_load_unique().
| void blf_draw_buffer__end | ( | void | ) |
Definition at line 894 of file blf.c.
Referenced by BLF_draw_buffer_ex(), and BLF_thumb_preview().
| void blf_draw_buffer__start | ( | struct FontBLF * | font | ) |
Definition at line 880 of file blf.c.
References FontBLF::buf_info, FontBufInfoBLF::col_char, FontBufInfoBLF::col_float, FontBufInfoBLF::col_init, copy_v4_v4(), FontBufInfoBLF::display, IMB_colormanagement_display_to_scene_linear_v3(), rgba_float_to_uchar(), and srgb_to_linearrgb_v4().
Referenced by BLF_draw_buffer_ex(), and BLF_thumb_preview().
Definition at line 1459 of file blf_font.c.
References GlyphCacheBLF::ascender, blf_font_ensure_ascii_table(), blf_glyph_cache_acquire(), and blf_glyph_cache_release().
Referenced by BLF_ascender().
| void blf_font_attach_from_mem | ( | struct FontBLF * | font, |
| const unsigned char * | mem, | ||
| int | mem_size | ||
| ) |
Definition at line 1387 of file blf_font.c.
References FontBLF::face.
Referenced by BLF_metrics_attach().
| void blf_font_boundbox | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| struct rctf * | r_box, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 900 of file blf_font.c.
References blf_font_boundbox_ex(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), len, and str.
Referenced by BLF_boundbox_ex(), blf_font_height(), blf_font_width(), and blf_font_width_and_height().
| void blf_font_boundbox__wrap | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| struct rctf * | r_box, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 1052 of file blf_font.c.
References blf_font_boundbox_wrap_cb(), blf_font_wrap_apply(), len, str, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BLF_boundbox_ex(), blf_font_height(), blf_font_width(), and blf_font_width_and_height().
| void blf_font_boundbox_foreach_glyph | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| bool(*)(const char *str, const size_t str_step_ofs, const struct rcti *glyph_step_bounds, const int glyph_advance_x, const struct rctf *glyph_bounds, const int glyph_bearing[2], void *user_data) | user_fn, | ||
| void * | user_data, | ||
| struct ResultBLF * | r_info | ||
| ) |
| int blf_font_count_missing_chars | ( | struct FontBLF * | font, |
| const char * | str, | ||
| const size_t | len, | ||
| int * | r_tot_chars | ||
| ) |
Definition at line 1254 of file blf_font.c.
References BLI_str_utf8_as_unicode_step(), BLI_UTF8_ERR, Freestyle::c, len, and str.
Referenced by BLF_thumb_preview().
Definition at line 1447 of file blf_font.c.
References blf_font_ensure_ascii_table(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), and GlyphCacheBLF::descender.
Referenced by BLF_descender().
| void blf_font_draw | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 461 of file blf_font.c.
References blf_font_draw_ex(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), len, and str.
Referenced by BLF_draw_ex().
| void blf_font_draw__wrap | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 1037 of file blf_font.c.
References blf_font_draw__wrap_cb(), blf_font_wrap_apply(), len, NULL, and str.
Referenced by BLF_draw_ascii_ex(), and BLF_draw_ex().
| void blf_font_draw_ascii | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 512 of file blf_font.c.
References blf_font_draw_ascii_ex(), len, and str.
Referenced by BLF_draw_ascii_ex().
| void blf_font_draw_buffer | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 705 of file blf_font.c.
References blf_font_draw_buffer_ex(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), len, and str.
Referenced by BLF_draw_buffer_ex(), and BLF_thumb_preview().
| void blf_font_draw_buffer__wrap | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 1073 of file blf_font.c.
References blf_font_draw_buffer__wrap_cb(), blf_font_wrap_apply(), len, NULL, and str.
Referenced by BLF_draw_buffer_ex().
| int blf_font_draw_mono | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| int | cwidth | ||
| ) |
Definition at line 518 of file blf_font.c.
References blf_batch_draw_begin(), blf_batch_draw_end(), blf_font_ensure_ascii_table(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), blf_glyph_render(), BLF_UTF8_NEXT_FAST, BLI_UTF8_ERR, BLI_wcwidth(), Freestyle::c, col, len, NULL, str, and UNLIKELY.
Referenced by BLF_draw_mono().
| void blf_font_exit | ( | void | ) |
Definition at line 269 of file blf_font.c.
References blf_batch_draw_exit(), blf_glyph_cache_mutex, BLI_spin_end(), ft_lib, and ft_lib_mutex.
Referenced by BLF_exit().
Definition at line 1154 of file blf_font.c.
References GlyphBLF::advance, blf_font_ensure_ascii_table(), blf_glyph_add(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), blf_glyph_search(), Freestyle::c, and FontBLF::face.
Referenced by BLF_fixed_width().
| void blf_font_free | ( | struct FontBLF * | font | ) |
Definition at line 1279 of file blf_font.c.
References blf_glyph_cache_free(), blf_glyph_cache_mutex, blf_kerning_cache_clear(), BLI_pophead(), BLI_spin_lock(), BLI_spin_unlock(), FontBLF::cache, FontBLF::face, FontBLF::filename, MEM_freeN, and FontBLF::name.
Referenced by BLF_exit(), BLF_thumb_preview(), BLF_unload(), and BLF_unload_id().
| float blf_font_height | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 1133 of file blf_font.c.
References FontBLF::aspect, BLF_ASPECT, blf_font_boundbox(), blf_font_boundbox__wrap(), BLF_WORD_WRAP, BLI_rctf_size_y(), FontBLF::flags, len, and str.
Referenced by BLF_height_ex().
| int blf_font_height_max | ( | struct FontBLF * | font | ) |
Definition at line 1423 of file blf_font.c.
References blf_font_ensure_ascii_table(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), and GlyphCacheBLF::glyph_height_max.
Referenced by BLF_height_max().
| bool blf_font_id_is_valid | ( | int | fontid | ) |
Definition at line 116 of file blf.c.
References blf_get(), and NULL.
Referenced by BLF_default_set().
| int blf_font_init | ( | void | ) |
Definition at line 261 of file blf_font.c.
References blf_glyph_cache_mutex, BLI_spin_init(), ft_lib, ft_lib_mutex, and g_batch.
Referenced by BLF_init().
| struct FontBLF* blf_font_new | ( | const char * | name, |
| const char * | filename | ||
| ) |
Definition at line 1351 of file blf_font.c.
References blf_dir_metrics_search(), blf_font_fill(), BLI_strdup(), err, FontBLF::face, FontBLF::filename, ft_lib, MEM_callocN, MEM_freeN, FontBLF::name, and NULL.
Referenced by BLF_load_unique(), and BLF_thumb_preview().
| struct FontBLF* blf_font_new_from_mem | ( | const char * | name, |
| const unsigned char * | mem, | ||
| int | mem_size | ||
| ) |
Definition at line 1397 of file blf_font.c.
References blf_font_fill(), BLI_strdup(), err, FontBLF::face, FontBLF::filename, ft_lib, MEM_callocN, MEM_freeN, FontBLF::name, and NULL.
Referenced by BLF_load_mem_unique().
| void blf_font_size | ( | struct FontBLF * | font, |
| unsigned int | size, | ||
| unsigned int | dpi | ||
| ) |
Definition at line 277 of file blf_font.c.
References blf_glyph_cache_acquire(), blf_glyph_cache_find(), blf_glyph_cache_new(), blf_glyph_cache_release(), FontBLF::dpi, err, FontBLF::face, size(), and FontBLF::size.
Referenced by BLF_size(), and BLF_thumb_preview().
| float blf_font_width | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 1112 of file blf_font.c.
References FontBLF::aspect, BLF_ASPECT, blf_font_boundbox(), blf_font_boundbox__wrap(), BLF_WORD_WRAP, BLI_rctf_size_x(), FontBLF::flags, len, and str.
Referenced by BLF_width_ex().
| void blf_font_width_and_height | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| float * | r_width, | ||
| float * | r_height, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 1083 of file blf_font.c.
References FontBLF::aspect, BLF_ASPECT, blf_font_boundbox(), blf_font_boundbox__wrap(), BLF_WORD_WRAP, BLI_rctf_size_x(), BLI_rctf_size_y(), FontBLF::flags, len, and str.
Referenced by BLF_width_and_height().
| int blf_font_width_max | ( | struct FontBLF * | font | ) |
Definition at line 1435 of file blf_font.c.
References blf_font_ensure_ascii_table(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), and GlyphCacheBLF::glyph_width_max.
Referenced by BLF_width_max().
| size_t blf_font_width_to_rstrlen | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| float | width, | ||
| float * | r_width | ||
| ) |
Definition at line 773 of file blf_font.c.
References blf_font_ensure_ascii_kerning(), blf_font_ensure_ascii_table(), blf_font_width_to_strlen_glyph_process(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), BLF_KERNING_VARS, BLF_UTF8_NEXT_FAST, BLI_assert, BLI_str_find_prev_char_utf8(), BLI_strnlen(), BLI_UTF8_ERR, Freestyle::c, float(), len, NULL, str, and width.
Referenced by BLF_width_to_rstrlen().
| size_t blf_font_width_to_strlen | ( | struct FontBLF * | font, |
| const char * | str, | ||
| size_t | len, | ||
| float | width, | ||
| float * | r_width | ||
| ) |
Definition at line 737 of file blf_font.c.
References blf_font_ensure_ascii_kerning(), blf_font_ensure_ascii_table(), blf_font_width_to_strlen_glyph_process(), blf_glyph_cache_acquire(), blf_glyph_cache_release(), BLF_KERNING_VARS, BLF_UTF8_NEXT_FAST, BLI_UTF8_ERR, Freestyle::c, float(), len, NULL, str, and width.
Referenced by BLF_width_to_strlen().
| struct GlyphBLF* blf_glyph_add | ( | struct FontBLF * | font, |
| struct GlyphCacheBLF * | gc, | ||
| unsigned int | index, | ||
| unsigned int | c | ||
| ) |
Definition at line 238 of file blf_glyph.c.
References GlyphBLF::advance, GlyphBLF::advance_i, GlyphBLF::bitmap, BLF_BOLD, blf_glyph_search(), blf_hash(), BLF_HINTING_FULL, BLF_HINTING_NONE, BLF_HINTING_SLIGHT, BLF_ITALIC, BLF_MONOCHROME, BLI_addhead(), BLI_spin_lock(), BLI_spin_unlock(), GlyphBLF::box, GlyphCacheBLF::bucket, GlyphBLF::c, Freestyle::c, GlyphBLF::dims, err, FontBLF::face, FontBLF::flags, float(), FontBLF::ft_lib, FontBLF::ft_lib_mutex, GlyphBLF::idx, MEM_callocN, MEM_mallocN, NULL, GlyphBLF::pitch, GlyphBLF::pos, transform(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by blf_font_ensure_ascii_table(), blf_font_fixed_width(), and blf_kerning_cache_new().
| struct GlyphCacheBLF* blf_glyph_cache_acquire | ( | struct FontBLF * | font | ) |
Definition at line 174 of file blf_glyph.c.
References blf_glyph_cache_find(), blf_glyph_cache_new(), BLI_spin_lock(), FontBLF::dpi, FontBLF::glyph_cache_mutex, and FontBLF::size.
Referenced by blf_font_ascender(), blf_font_boundbox(), blf_font_boundbox_foreach_glyph(), blf_font_descender(), blf_font_draw(), blf_font_draw_ascii_ex(), blf_font_draw_buffer(), blf_font_draw_mono(), blf_font_fixed_width(), blf_font_height_max(), blf_font_size(), blf_font_width_max(), blf_font_width_to_rstrlen(), blf_font_width_to_strlen(), and blf_font_wrap_apply().
| void blf_glyph_cache_clear | ( | struct FontBLF * | font | ) |
Definition at line 192 of file blf_glyph.c.
References blf_glyph_cache_free(), BLI_pophead(), BLI_spin_lock(), BLI_spin_unlock(), FontBLF::cache, and FontBLF::glyph_cache_mutex.
Referenced by BLF_cache_clear().
| struct GlyphCacheBLF* blf_glyph_cache_find | ( | struct FontBLF * | font, |
| unsigned int | size, | ||
| unsigned int | dpi | ||
| ) |
Definition at line 116 of file blf_glyph.c.
References BLF_BOLD, BLF_ITALIC, GlyphCacheBLF::bold, FontBLF::cache, GlyphCacheBLF::dpi, ListBase::first, FontBLF::flags, GlyphCacheBLF::italic, GlyphCacheBLF::next, NULL, size(), and GlyphCacheBLF::size.
Referenced by blf_font_size(), blf_glyph_cache_acquire(), and BLF_thumb_preview().
| void blf_glyph_cache_free | ( | struct GlyphCacheBLF * | gc | ) |
Definition at line 205 of file blf_glyph.c.
References ARRAY_SIZE, GlyphCacheBLF::bitmap_result, blf_glyph_free(), BLI_pophead(), GlyphCacheBLF::bucket, GPU_texture_free(), MEM_freeN, and GlyphCacheBLF::texture.
Referenced by blf_font_free(), and blf_glyph_cache_clear().
| struct GlyphCacheBLF* blf_glyph_cache_new | ( | struct FontBLF * | font | ) |
Definition at line 132 of file blf_glyph.c.
References GlyphCacheBLF::ascender, BLF_BOLD, BLF_ITALIC, BLI_addhead(), GlyphCacheBLF::bold, GlyphCacheBLF::bucket, FontBLF::cache, CLAMP_MIN, GlyphCacheBLF::descender, GlyphCacheBLF::dpi, FontBLF::dpi, FontBLF::face, FontBLF::flags, float(), GlyphCacheBLF::glyph_ascii_table, GlyphCacheBLF::glyph_height_max, GlyphCacheBLF::glyph_width_max, GlyphCacheBLF::glyphs_len_free, GlyphCacheBLF::glyphs_len_max, GlyphCacheBLF::italic, MEM_callocN, GlyphCacheBLF::next, NULL, GlyphCacheBLF::prev, GlyphCacheBLF::size, and FontBLF::size.
Referenced by blf_font_size(), and blf_glyph_cache_acquire().
| void blf_glyph_cache_release | ( | struct FontBLF * | font | ) |
Definition at line 187 of file blf_glyph.c.
References BLI_spin_unlock(), and FontBLF::glyph_cache_mutex.
Referenced by blf_font_ascender(), blf_font_boundbox(), blf_font_boundbox_foreach_glyph(), blf_font_descender(), blf_font_draw(), blf_font_draw_ascii_ex(), blf_font_draw_buffer(), blf_font_draw_mono(), blf_font_fixed_width(), blf_font_height_max(), blf_font_size(), blf_font_width_max(), blf_font_width_to_rstrlen(), blf_font_width_to_strlen(), and blf_font_wrap_apply().
| void blf_glyph_free | ( | struct GlyphBLF * | g | ) |
Definition at line 392 of file blf_glyph.c.
References GlyphBLF::bitmap, and MEM_freeN.
Referenced by blf_glyph_cache_free().
| void blf_glyph_render | ( | struct FontBLF * | font, |
| struct GlyphCacheBLF * | gc, | ||
| struct GlyphBLF * | g, | ||
| float | x, | ||
| float | y | ||
| ) |
Definition at line 482 of file blf_glyph.c.
References GlyphBLF::bitmap, GlyphCacheBLF::bitmap_len, GlyphCacheBLF::bitmap_len_alloc, GlyphCacheBLF::bitmap_len_landed, GlyphCacheBLF::bitmap_result, blf_batch_draw(), BLF_CLIPPING, blf_glyph_calc_rect(), blf_glyph_calc_rect_shadow(), blf_glyph_calc_rect_test(), BLF_SHADOW, blf_texture3_draw(), blf_texture5_draw(), blf_texture_draw(), BLI_rctf_inside_rctf(), BLI_rctf_translate(), FontBLF::clip_rec, FontBLF::color, GlyphBLF::dims, FontBLF::flags, g_batch, BatchBLF::glyph_cache, GlyphBLF::glyph_cache, GlyphCacheBLF::glyphs_len_free, GPU_max_texture_size(), GPU_R8, GPU_texture_create_2d(), GPU_texture_free(), MEM_reallocN, NULL, GlyphBLF::offset, FontBLF::pos, FontBLF::shadow, FontBLF::shadow_color, FontBLF::tex_size_max, GlyphCacheBLF::texture, w(), x, rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by blf_font_draw_ascii_ex(), blf_font_draw_ex(), and blf_font_draw_mono().
| struct GlyphBLF* blf_glyph_search | ( | struct GlyphCacheBLF * | gc, |
| unsigned int | c | ||
| ) |
Definition at line 222 of file blf_glyph.c.
References blf_hash(), GlyphCacheBLF::bucket, GlyphBLF::c, Freestyle::c, ListBase::first, GlyphBLF::next, and NULL.
Referenced by blf_font_ensure_ascii_table(), blf_font_fixed_width(), blf_glyph_add(), and blf_kerning_cache_new().
| unsigned int blf_hash | ( | unsigned int | val | ) |
Definition at line 46 of file blf_util.c.
Referenced by blf_glyph_add(), and blf_glyph_search().
| void blf_kerning_cache_clear | ( | struct FontBLF * | font | ) |
Definition at line 110 of file blf_glyph.c.
References BLI_freelistN(), FontBLF::kerning_cache, FontBLF::kerning_caches, and NULL.
Referenced by BLF_cache_clear(), and blf_font_free().
| struct KerningCacheBLF* blf_kerning_cache_find | ( | struct FontBLF * | font | ) |
Definition at line 58 of file blf_glyph.c.
References ListBase::first, FontBLF::kerning_caches, FontBLF::kerning_mode, KerningCacheBLF::mode, KerningCacheBLF::next, and NULL.
Referenced by blf_font_ensure_ascii_kerning().
| struct KerningCacheBLF* blf_kerning_cache_new | ( | struct FontBLF * | font, |
| struct GlyphCacheBLF * | gc | ||
| ) |
Definition at line 73 of file blf_glyph.c.
References blf_glyph_add(), blf_glyph_search(), BLI_addhead(), FontBLF::face, GlyphBLF::idx, FontBLF::kerning_caches, FontBLF::kerning_mode, MEM_callocN, KerningCacheBLF::mode, KerningCacheBLF::next, NULL, KerningCacheBLF::prev, and KerningCacheBLF::table.
Referenced by blf_font_ensure_ascii_kerning().
| unsigned int blf_next_p2 | ( | unsigned int | x | ) |
Definition at line 34 of file blf_util.c.
References x.