|
Blender
V2.93
|
#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ft2build.h>#include "MEM_guardedalloc.h"#include "BLI_math.h"#include "BLI_threads.h"#include "BLF_api.h"#include "IMB_colormanagement.h"#include "GPU_matrix.h"#include "GPU_shader.h"#include "blf_internal.h"#include "blf_internal_types.h"Go to the source code of this file.
Macros | |
| #define | BLF_MAX_FONT 16 |
| #define | BLF_RESULT_CHECK_INIT(r_info) |
Functions | |
| static FontBLF * | blf_get (int fontid) |
| int | BLF_init (void) |
| void | BLF_exit (void) |
| void | BLF_cache_clear (void) |
| bool | blf_font_id_is_valid (int fontid) |
| static int | blf_search (const char *name) |
| static int | blf_search_available (void) |
| bool | BLF_has_glyph (int fontid, unsigned int unicode) |
| int | BLF_load (const char *name) |
| int | BLF_load_unique (const char *name) |
| void | BLF_metrics_attach (int fontid, unsigned char *mem, int mem_size) |
| int | BLF_load_mem (const char *name, const unsigned char *mem, int mem_size) |
| int | BLF_load_mem_unique (const char *name, const unsigned char *mem, int mem_size) |
| void | BLF_unload (const char *name) |
| void | BLF_unload_id (int fontid) |
| void | BLF_enable (int fontid, int option) |
| void | BLF_disable (int fontid, int option) |
| void | BLF_aspect (int fontid, float x, float y, float z) |
| void | BLF_matrix (int fontid, const float m[16]) |
| void | BLF_position (int fontid, float x, float y, float z) |
| void | BLF_size (int fontid, int size, int dpi) |
| void | BLF_color4ubv (int fontid, const unsigned char rgba[4]) |
| void | BLF_color3ubv_alpha (int fontid, const unsigned char rgb[3], unsigned char alpha) |
| void | BLF_color3ubv (int fontid, const unsigned char rgb[3]) |
| void | BLF_color4ub (int fontid, unsigned char r, unsigned char g, unsigned char b, unsigned char alpha) |
| void | BLF_color3ub (int fontid, unsigned char r, unsigned char g, unsigned char b) |
| void | BLF_color4fv (int fontid, const float rgba[4]) |
| void | BLF_color4f (int fontid, float r, float g, float b, float a) |
| void | BLF_color3fv_alpha (int fontid, const float rgb[3], float alpha) |
| void | BLF_color3f (int fontid, float r, float g, float b) |
| void | BLF_batch_draw_begin (void) |
| void | BLF_batch_draw_flush (void) |
| void | BLF_batch_draw_end (void) |
| static void | blf_draw_gl__start (FontBLF *font) |
| static void | blf_draw_gl__end (FontBLF *font) |
| void | BLF_draw_ex (int fontid, const char *str, size_t len, struct ResultBLF *r_info) |
| void | BLF_draw (int fontid, const char *str, size_t len) |
| void | BLF_draw_ascii_ex (int fontid, const char *str, size_t len, struct ResultBLF *r_info) |
| void | BLF_draw_ascii (int fontid, const char *str, size_t len) |
| int | BLF_draw_mono (int fontid, const char *str, size_t len, int cwidth) |
| void | BLF_boundbox_foreach_glyph_ex (int fontid, const char *str, size_t len, BLF_GlyphBoundsFn user_fn, void *user_data, struct ResultBLF *r_info) |
| void | BLF_boundbox_foreach_glyph (int fontid, const char *str, size_t len, BLF_GlyphBoundsFn user_fn, void *user_data) |
| size_t | BLF_width_to_strlen (int fontid, const char *str, size_t len, float width, float *r_width) |
| size_t | BLF_width_to_rstrlen (int fontid, const char *str, size_t len, float width, float *r_width) |
| void | BLF_boundbox_ex (int fontid, const char *str, size_t len, rctf *r_box, struct ResultBLF *r_info) |
| void | BLF_boundbox (int fontid, const char *str, size_t len, rctf *r_box) |
| void | BLF_width_and_height (int fontid, const char *str, size_t len, float *r_width, float *r_height) |
| float | BLF_width_ex (int fontid, const char *str, size_t len, struct ResultBLF *r_info) |
| float | BLF_width (int fontid, const char *str, size_t len) |
| float | BLF_fixed_width (int fontid) |
| float | BLF_height_ex (int fontid, const char *str, size_t len, struct ResultBLF *r_info) |
| float | BLF_height (int fontid, const char *str, size_t len) |
| int | BLF_height_max (int fontid) |
| float | BLF_width_max (int fontid) |
| float | BLF_descender (int fontid) |
| float | BLF_ascender (int fontid) |
| void | BLF_rotation (int fontid, float angle) |
| void | BLF_clipping (int fontid, float xmin, float ymin, float xmax, float ymax) |
| void | BLF_wordwrap (int fontid, int wrap_width) |
| void | BLF_shadow (int fontid, int level, const float rgba[4]) |
| void | BLF_shadow_offset (int fontid, int x, int y) |
| void | BLF_buffer (int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch, struct ColorManagedDisplay *display) |
| void | BLF_buffer_col (int fontid, const float rgba[4]) |
| void | blf_draw_buffer__start (FontBLF *font) |
| void | blf_draw_buffer__end (void) |
| void | BLF_draw_buffer_ex (int fontid, const char *str, size_t len, struct ResultBLF *r_info) |
| void | BLF_draw_buffer (int fontid, const char *str, size_t len) |
Variables | |
| static FontBLF * | global_font [BLF_MAX_FONT] = {NULL} |
| int | blf_mono_font = -1 |
| int | blf_mono_font_render = -1 |
Main BlenFont (BLF) API, public functions for font handling.
Wraps OpenGL and FreeType.
Definition in file blf.c.
| #define BLF_RESULT_CHECK_INIT | ( | r_info | ) |
| float BLF_ascender | ( | int | fontid | ) |
Definition at line 790 of file blf.c.
References blf_font_ascender(), and blf_get().
Referenced by node_draw_frame_label(), UI_fontstyle_draw_ex(), and UI_fontstyle_draw_rotated().
Definition at line 292 of file blf.c.
References FontBLF::aspect, blf_get(), x, y, and z.
Referenced by node_draw_frame_label(), playanim_toscreen(), and py_blf_aspect().
| void BLF_batch_draw_begin | ( | void | ) |
Definition at line 470 of file blf.c.
References BLI_assert, BatchBLF::enabled, and g_batch.
Referenced by draw_horizontal_scale_indicators(), draw_vertical_scale_indicators(), DRW_stats_draw(), file_draw_list(), UI_block_draw(), and view3d_draw_region_info().
| void BLF_batch_draw_end | ( | void | ) |
Definition at line 483 of file blf.c.
References blf_batch_draw(), BLI_assert, BatchBLF::enabled, and g_batch.
Referenced by draw_horizontal_scale_indicators(), draw_vertical_scale_indicators(), DRW_stats_draw(), file_draw_list(), UI_block_draw(), and view3d_draw_region_info().
| void BLF_batch_draw_flush | ( | void | ) |
Definition at line 476 of file blf.c.
References blf_batch_draw(), BatchBLF::enabled, and g_batch.
Referenced by icon_draw_rect_input_symbol(), and icon_draw_rect_input_text().
| void BLF_boundbox | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| rctf * | r_box | ||
| ) |
Definition at line 693 of file blf.c.
References BLF_boundbox_ex(), len, NULL, and str.
Referenced by file_draw_string_multiline().
| void BLF_boundbox_ex | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| rctf * | r_box, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 676 of file blf.c.
References blf_font_boundbox(), blf_font_boundbox__wrap(), blf_get(), BLF_RESULT_CHECK_INIT, BLF_WORD_WRAP, FontBLF::flags, len, and str.
Referenced by BLF_boundbox(), do_text_effect(), and metadata_box_height_get().
| void BLF_boundbox_foreach_glyph | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| BLF_GlyphBoundsFn | user_fn, | ||
| void * | user_data | ||
| ) |
Definition at line 630 of file blf.c.
References BLF_boundbox_foreach_glyph_ex(), len, NULL, str, and user_data.
Referenced by ui_textedit_set_cursor_pos(), and widget_draw_text().
| void BLF_boundbox_foreach_glyph_ex | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| BLF_GlyphBoundsFn | user_fn, | ||
| void * | user_data, | ||
| struct ResultBLF * | r_info | ||
| ) |
Run user_fn for each character, with the bound-box that would be used for drawing.
| user_fn | Callback that runs on each glyph, returning false early exits. |
| user_data | User argument passed to user_fn. |
Definition at line 608 of file blf.c.
References blf_font_boundbox_foreach_glyph(), blf_get(), BLF_RESULT_CHECK_INIT, BLF_WORD_WRAP, BLI_assert, FontBLF::flags, len, str, and user_data.
Referenced by BLF_boundbox_foreach_glyph().
| void BLF_buffer | ( | int | fontid, |
| float * | fbuf, | ||
| unsigned char * | cbuf, | ||
| int | w, | ||
| int | h, | ||
| int | nch, | ||
| struct ColorManagedDisplay * | display | ||
| ) |
Definition at line 851 of file blf.c.
References blf_get(), FontBLF::buf_info, FontBufInfoBLF::cbuf, FontBufInfoBLF::ch, FontBufInfoBLF::dims, FontBufInfoBLF::display, FontBufInfoBLF::fbuf, and w().
Referenced by BKE_image_stamp_buf(), checker_board_text(), and do_text_effect().
| void BLF_buffer_col | ( | int | fontid, |
| const float | rgba[4] | ||
| ) |
Definition at line 871 of file blf.c.
References blf_get(), FontBLF::buf_info, FontBufInfoBLF::col_init, and copy_v4_v4().
Referenced by BKE_image_stamp_buf(), checker_board_text(), and do_text_effect().
| void BLF_cache_clear | ( | void | ) |
Definition at line 105 of file blf.c.
References blf_glyph_cache_clear(), blf_kerning_cache_clear(), BLF_MAX_FONT, and global_font.
Referenced by ghost_event_proc(), reloadtranslation_exec(), and UI_view2d_zoom_cache_reset().
Definition at line 810 of file blf.c.
References blf_get(), FontBLF::clip_rec, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ED_region_image_metadata_draw(), ED_region_info_draw_multiline(), node_draw_frame_label(), py_blf_clipping(), UI_fontstyle_draw_ex(), UI_fontstyle_draw_rotated(), and UI_view2d_text_cache_draw().
Definition at line 464 of file blf.c.
References BLF_color4fv(), and r.
Referenced by voxel_size_edit_draw().
Definition at line 456 of file blf.c.
References alpha, BLF_color4fv(), and copy_v3_v3().
| void BLF_color3ub | ( | int | fontid, |
| unsigned char | r, | ||
| unsigned char | g, | ||
| unsigned char | b | ||
| ) |
Definition at line 429 of file blf.c.
References blf_get(), FontBLF::color, and r.
Referenced by ED_image_draw_info().
| void BLF_color3ubv | ( | int | fontid, |
| const unsigned char | rgb[3] | ||
| ) |
Definition at line 411 of file blf.c.
References BLF_color3ubv_alpha().
Referenced by drawAutoKeyWarning(), ED_image_draw_info(), gizmo_ruler_draw(), node_draw_frame_label(), UI_panel_category_draw_all(), and UI_view2d_text_cache_draw().
| void BLF_color3ubv_alpha | ( | int | fontid, |
| const unsigned char | rgb[3], | ||
| unsigned char | alpha | ||
| ) |
Definition at line 399 of file blf.c.
References alpha, blf_get(), and FontBLF::color.
Referenced by BLF_color3ubv().
Definition at line 450 of file blf.c.
References Freestyle::a, BLF_color4fv(), and r.
Referenced by playanim_toscreen().
| void BLF_color4fv | ( | int | fontid, |
| const float | rgba[4] | ||
| ) |
Definition at line 441 of file blf.c.
References blf_get(), FontBLF::color, and rgba_float_to_uchar().
Referenced by BLF_color3f(), BLF_color3fv_alpha(), BLF_color4f(), gizmo_axis_draw(), icon_draw_rect_input_symbol(), icon_draw_rect_input_text(), py_blf_color(), radial_control_paint_cursor(), and UI_fontstyle_draw_simple_backdrop().
| void BLF_color4ub | ( | int | fontid, |
| unsigned char | r, | ||
| unsigned char | g, | ||
| unsigned char | b, | ||
| unsigned char | alpha | ||
| ) |
Definition at line 416 of file blf.c.
References alpha, blf_get(), FontBLF::color, and r.
Referenced by draw_udim_label().
| void BLF_color4ubv | ( | int | fontid, |
| const unsigned char | rgba[4] | ||
| ) |
Definition at line 387 of file blf.c.
References blf_get(), and FontBLF::color.
Referenced by draw_marker_texts(), draw_view_axis(), drw_text_cache_draw_ex(), textview_draw_string(), UI_fontstyle_draw_ex(), UI_fontstyle_draw_rotated(), UI_fontstyle_draw_simple(), UI_FontThemeColor(), and widget_draw_text().
| float BLF_descender | ( | int | fontid | ) |
Definition at line 779 of file blf.c.
References blf_font_descender(), and blf_get().
Referenced by BKE_image_stamp_buf(), do_text_effect(), metadata_draw_imbuf(), textview_draw(), UI_fontstyle_draw_ex(), UI_fontstyle_draw_rotated(), and UI_fontstyle_draw_simple_backdrop().
| void BLF_disable | ( | int | fontid, |
| int | option | ||
| ) |
Definition at line 283 of file blf.c.
References blf_get(), and FontBLF::flags.
Referenced by BKE_image_stamp_buf(), do_text_effect(), draw_grid_unit_name(), draw_selected_name(), draw_vertical_scale_indicators(), draw_viewport_name(), DRW_draw_region_engine_info(), DRW_stats_draw(), ED_info_draw_stats(), ED_region_image_metadata_draw(), ED_region_info_draw_multiline(), ED_scene_draw_fps(), file_draw_string_multiline(), file_string_width(), gizmo_axis_draw(), gizmo_ruler_draw(), metadata_box_height_get(), metadata_draw_imbuf(), node_draw_frame_label(), py_blf_disable(), ui_draw_menu_item(), UI_fontstyle_draw_ex(), UI_fontstyle_draw_rotated(), UI_fontstyle_draw_simple(), UI_fontstyle_draw_simple_backdrop(), UI_fontstyle_string_width(), UI_panel_category_draw_all(), ui_text_clip_cursor(), UI_text_clip_middle_ex(), ui_text_clip_right_label(), ui_textedit_set_cursor_pos(), ui_tooltip_create_with_data(), ui_tooltip_region_draw_cb(), UI_view2d_text_cache_draw(), uiStyleInit(), widget_draw_text(), and widget_draw_text_icon().
| void BLF_draw | ( | int | fontid, |
| const char * | str, | ||
| size_t | len | ||
| ) |
Definition at line 542 of file blf.c.
References BLF_draw_ex(), GPU_bgl_end(), len, NULL, and str.
Referenced by BLF_draw_default(), clip_draw_dopesheet_channels(), draw_marker_texts(), drw_text_cache_draw_ex(), ED_region_cache_draw_curfra_label(), ED_region_info_draw_multiline(), gizmo_ruler_draw(), icon_draw_rect_input_symbol(), icon_draw_rect_input_text(), loggerwindow_do_draw(), metadata_custom_draw_fields(), metadata_draw_imbuf(), node_draw_frame_label(), playanim_toscreen(), py_blf_draw(), radial_control_paint_cursor(), region_draw_status_text(), text_font_draw_character(), UI_fontstyle_draw_rotated(), UI_fontstyle_draw_simple(), UI_fontstyle_draw_simple_backdrop(), UI_panel_category_draw_all(), voxel_size_edit_draw(), and widget_draw_text().
| void BLF_draw_ascii | ( | int | fontid, |
| const char * | str, | ||
| size_t | len | ||
| ) |
Definition at line 573 of file blf.c.
References BLF_draw_ascii_ex(), len, NULL, and str.
Referenced by BLF_draw_default_ascii(), draw_udim_label(), drw_text_cache_draw_ex(), ED_image_draw_info(), and gizmo_axis_draw().
| void BLF_draw_ascii_ex | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 554 of file blf.c.
References blf_draw_gl__end(), blf_draw_gl__start(), blf_font_draw__wrap(), blf_font_draw_ascii(), blf_get(), BLF_RESULT_CHECK_INIT, BLF_WORD_WRAP, FontBLF::flags, len, and str.
Referenced by BLF_draw_ascii().
| void BLF_draw_buffer | ( | int | fontid, |
| const char * | str, | ||
| size_t | len | ||
| ) |
Definition at line 913 of file blf.c.
References BLF_draw_buffer_ex(), len, NULL, and str.
Referenced by BKE_image_stamp_buf(), checker_board_text(), and do_text_effect().
| 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 | ( | 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().
| void BLF_draw_buffer_ex | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 898 of file blf.c.
References blf_draw_buffer__end(), blf_draw_buffer__start(), blf_font_draw_buffer(), blf_font_draw_buffer__wrap(), blf_get(), BLF_WORD_WRAP, FontBLF::buf_info, FontBufInfoBLF::cbuf, FontBufInfoBLF::fbuf, FontBLF::flags, len, and str.
Referenced by BLF_draw_buffer().
| void BLF_draw_ex | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| struct ResultBLF * | r_info | ||
| ) |
Definition at line 525 of file blf.c.
References blf_draw_gl__end(), blf_draw_gl__start(), blf_font_draw(), blf_font_draw__wrap(), blf_get(), BLF_RESULT_CHECK_INIT, BLF_WORD_WRAP, FontBLF::flags, len, and str.
Referenced by BLF_draw(), metadata_draw_imbuf(), node_draw_frame_label(), and UI_fontstyle_draw_ex().
|
static |
Definition at line 518 of file blf.c.
References BLF_ASPECT, BLF_MATRIX, BLF_ROTATION, FontBLF::flags, and GPU_matrix_pop().
Referenced by BLF_draw_ascii_ex(), BLF_draw_ex(), and BLF_draw_mono().
|
static |
Definition at line 490 of file blf.c.
References FontBLF::angle, FontBLF::aspect, BLF_ASPECT, BLF_MATRIX, BLF_ROTATION, FontBLF::flags, GPU_matrix_mul, GPU_matrix_push(), GPU_matrix_rotate_2d(), GPU_matrix_scale_3fv(), GPU_matrix_translate_3fv(), FontBLF::m, FontBLF::pos, and RAD2DEG.
Referenced by BLF_draw_ascii_ex(), BLF_draw_ex(), and BLF_draw_mono().
| int BLF_draw_mono | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| int | cwidth | ||
| ) |
Definition at line 582 of file blf.c.
References blf_draw_gl__end(), blf_draw_gl__start(), blf_font_draw_mono(), blf_get(), len, and str.
Referenced by text_font_draw(), text_font_draw_character_utf8(), and textview_draw_string().
| void BLF_enable | ( | int | fontid, |
| int | option | ||
| ) |
Definition at line 274 of file blf.c.
References blf_get(), and FontBLF::flags.
Referenced by BKE_image_stamp_buf(), do_text_effect(), draw_grid_unit_name(), draw_selected_name(), draw_vertical_scale_indicators(), draw_viewport_name(), DRW_draw_region_engine_info(), DRW_stats_draw(), ED_info_draw_stats(), ED_region_image_metadata_draw(), ED_region_info_draw_multiline(), ED_scene_draw_fps(), file_draw_string_multiline(), file_string_width(), gizmo_axis_draw(), gizmo_ruler_draw(), metadata_box_height_get(), metadata_draw_imbuf(), node_draw_frame_label(), playanim_toscreen(), py_blf_enable(), ui_draw_menu_item(), UI_fontstyle_draw_ex(), UI_fontstyle_draw_rotated(), UI_fontstyle_draw_simple(), UI_fontstyle_draw_simple_backdrop(), UI_fontstyle_string_width(), UI_panel_category_draw_all(), ui_text_clip_cursor(), UI_text_clip_middle_ex(), ui_text_clip_right_label(), ui_textedit_set_cursor_pos(), ui_tooltip_create_with_data(), UI_view2d_text_cache_draw(), uiStyleInit(), and widget_draw_text().
| void BLF_exit | ( | void | ) |
Definition at line 92 of file blf.c.
References blf_font_exit(), blf_font_free(), BLF_MAX_FONT, global_font, and NULL.
Referenced by multitestapp_free(), WM_exit_ex(), and wm_main_playanim_intern().
| float BLF_fixed_width | ( | int | fontid | ) |
Definition at line 728 of file blf.c.
References blf_font_fixed_width(), and blf_get().
Referenced by textview_draw().
| 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().
|
static |
Definition at line 73 of file blf.c.
References BLF_MAX_FONT, global_font, and NULL.
Referenced by BLF_ascender(), BLF_aspect(), BLF_boundbox_ex(), BLF_boundbox_foreach_glyph_ex(), BLF_buffer(), BLF_buffer_col(), BLF_clipping(), BLF_color3ub(), BLF_color3ubv_alpha(), BLF_color4fv(), BLF_color4ub(), BLF_color4ubv(), BLF_descender(), BLF_disable(), BLF_draw_ascii_ex(), BLF_draw_buffer_ex(), BLF_draw_ex(), BLF_draw_mono(), BLF_enable(), BLF_fixed_width(), blf_font_id_is_valid(), BLF_has_glyph(), BLF_height_ex(), BLF_height_max(), BLF_matrix(), BLF_metrics_attach(), BLF_position(), BLF_rotation(), BLF_shadow(), BLF_shadow_offset(), BLF_size(), BLF_unload_id(), BLF_width_and_height(), BLF_width_ex(), BLF_width_max(), BLF_width_to_rstrlen(), BLF_width_to_strlen(), and BLF_wordwrap().
| bool BLF_has_glyph | ( | int | fontid, |
| unsigned int | unicode | ||
| ) |
Definition at line 144 of file blf.c.
References blf_get(), and FontBLF::face.
Referenced by key_event_glyph_or_text().
| float BLF_height | ( | int | fontid, |
| const char * | str, | ||
| size_t | len | ||
| ) |
Definition at line 752 of file blf.c.
References BLF_height_ex(), len, NULL, and str.
Referenced by clip_draw_dopesheet_channels(), file_font_pointsize(), loggerwindow_new(), and UI_view2d_text_cache_draw().
Definition at line 739 of file blf.c.
References blf_font_height(), blf_get(), BLF_RESULT_CHECK_INIT, len, and str.
Referenced by BLF_height().
| int BLF_height_max | ( | int | fontid | ) |
Definition at line 757 of file blf.c.
References blf_font_height_max(), and blf_get().
Referenced by BKE_image_stamp_buf(), do_text_effect(), draw_marker_texts(), metadata_box_height_get(), metadata_draw_imbuf(), node_draw_frame_label(), UI_fontstyle_draw_ex(), UI_fontstyle_draw_simple_backdrop(), UI_fontstyle_height_max(), and ui_tooltip_create_with_data().
| int BLF_init | ( | void | ) |
Definition at line 81 of file blf.c.
References BLF_default_dpi(), blf_font_init(), BLF_MAX_FONT, global_font, and NULL.
Referenced by main(), WM_init(), and wm_main_playanim_intern().
| int BLF_load | ( | const char * | name | ) |
Definition at line 153 of file blf.c.
References BLF_load_unique(), blf_search(), global_font, and FontBLF::reference_count.
Referenced by blf_load_font_default(), do_text_effect(), py_blf_load(), SEQ_effect_text_font_load(), and uiStyleInit().
| int BLF_load_mem | ( | const char * | name, |
| const unsigned char * | mem, | ||
| int | mem_size | ||
| ) |
Definition at line 205 of file blf.c.
References BLF_load_mem_unique(), and blf_search().
| int BLF_load_mem_unique | ( | const char * | name, |
| const unsigned char * | mem, | ||
| int | mem_size | ||
| ) |
Definition at line 215 of file blf.c.
References blf_font_new_from_mem(), blf_search_available(), global_font, and FontBLF::reference_count.
Referenced by BLF_load_mem().
| int BLF_load_unique | ( | const char * | name | ) |
Definition at line 166 of file blf.c.
References blf_dir_search(), blf_font_new(), blf_search_available(), global_font, MEM_freeN, and FontBLF::reference_count.
Referenced by BLF_load(), blf_load_font_default(), and uiStyleInit().
| void BLF_matrix | ( | int | fontid, |
| const float | m[16] | ||
| ) |
Definition at line 303 of file blf.c.
References blf_get(), and FontBLF::m.
| void BLF_metrics_attach | ( | int | fontid, |
| unsigned char * | mem, | ||
| int | mem_size | ||
| ) |
Definition at line 196 of file blf.c.
References blf_font_attach_from_mem(), and blf_get().
Definition at line 312 of file blf.c.
References FontBLF::aspect, BLF_ASPECT, blf_get(), FontBLF::flags, floorf, FontBLF::pos, x, y, and z.
Referenced by BKE_image_stamp_buf(), BLF_draw_default(), BLF_draw_default_ascii(), checker_board_text(), clip_draw_dopesheet_channels(), do_text_effect(), draw_marker_texts(), draw_udim_label(), drw_text_cache_draw_ex(), ED_image_draw_info(), ED_region_cache_draw_curfra_label(), ED_region_info_draw_multiline(), gizmo_axis_draw(), gizmo_ruler_draw(), icon_draw_rect_input_symbol(), icon_draw_rect_input_text(), loggerwindow_do_draw(), metadata_custom_draw_fields(), metadata_draw_imbuf(), node_draw_frame_label(), playanim_toscreen(), py_blf_position(), radial_control_paint_cursor(), region_draw_status_text(), text_font_draw(), text_font_draw_character(), text_font_draw_character_utf8(), textview_draw_string(), UI_fontstyle_draw_ex(), UI_fontstyle_draw_rotated(), UI_fontstyle_draw_simple(), UI_fontstyle_draw_simple_backdrop(), UI_panel_category_draw_all(), voxel_size_edit_draw(), and widget_draw_text().
| void BLF_rotation | ( | int | fontid, |
| float | angle | ||
| ) |
Definition at line 801 of file blf.c.
References angle(), FontBLF::angle, and blf_get().
Referenced by draw_vertical_scale_indicators(), gizmo_ruler_draw(), py_blf_rotation(), UI_fontstyle_draw_rotated(), and UI_panel_category_draw_all().
|
static |
Definition at line 121 of file blf.c.
References BLF_MAX_FONT, global_font, FontBLF::name, and STREQ.
Referenced by BLF_load(), and BLF_load_mem().
|
static |
Definition at line 133 of file blf.c.
References BLF_MAX_FONT, and global_font.
Referenced by BLF_load_mem_unique(), and BLF_load_unique().
| void BLF_shadow | ( | int | fontid, |
| int | level, | ||
| const float | rgba[4] | ||
| ) |
Definition at line 831 of file blf.c.
References blf_get(), rgba_float_to_uchar(), FontBLF::shadow, and FontBLF::shadow_color.
Referenced by draw_grid_unit_name(), draw_selected_name(), draw_viewport_name(), DRW_draw_region_engine_info(), DRW_stats_draw(), ED_info_draw_stats(), ED_scene_draw_fps(), py_blf_shadow(), UI_fontstyle_draw_ex(), and UI_fontstyle_draw_rotated().
| void BLF_shadow_offset | ( | int | fontid, |
| int | x, | ||
| int | y | ||
| ) |
Definition at line 841 of file blf.c.
References blf_get(), FontBLF::shadow_x, FontBLF::shadow_y, x, and y.
Referenced by draw_grid_unit_name(), draw_selected_name(), draw_viewport_name(), DRW_draw_region_engine_info(), DRW_stats_draw(), ED_info_draw_stats(), ED_scene_draw_fps(), py_blf_shadow_offset(), UI_fontstyle_draw_ex(), and UI_fontstyle_draw_rotated().
| void BLF_size | ( | int | fontid, |
| int | size, | ||
| int | dpi | ||
| ) |
Definition at line 367 of file blf.c.
References blf_font_size(), blf_get(), and size().
Referenced by BKE_image_stamp_buf(), BLF_draw_default(), BLF_draw_default_ascii(), BLF_set_default(), checker_board_text(), clip_draw_dopesheet_channels(), do_text_effect(), draw_marker_texts(), drw_text_cache_draw_ex(), ED_image_draw_info(), ED_region_cache_draw_curfra_label(), ED_region_image_metadata_draw(), get_column_width(), get_index_column_width(), gizmo_axis_draw(), gizmo_ruler_draw(), icon_draw_rect_input_symbol(), icon_draw_rect_input_text(), loggerwindow_new(), node_draw_frame_label(), py_blf_size(), radial_control_paint_cursor(), text_font_begin(), textview_font_begin(), UI_fontstyle_set(), UI_panel_category_draw_all(), ui_tooltip_create_with_data(), ui_tooltip_region_draw_cb(), uiStyleInit(), voxel_size_edit_draw(), and wm_main_playanim_intern().
| void BLF_unload | ( | const char * | name | ) |
Definition at line 243 of file blf.c.
References blf_font_free(), BLF_MAX_FONT, BLI_assert, global_font, FontBLF::name, NULL, FontBLF::reference_count, and STREQ.
Referenced by py_blf_unload().
| void BLF_unload_id | ( | int | fontid | ) |
Definition at line 260 of file blf.c.
References blf_font_free(), blf_get(), BLI_assert, global_font, NULL, and FontBLF::reference_count.
Referenced by BKE_blender_userdef_data_free(), SEQ_effect_text_font_unload(), and uiStyleInit().
| float BLF_width | ( | int | fontid, |
| const char * | str, | ||
| size_t | len | ||
| ) |
Definition at line 723 of file blf.c.
References BLF_width_ex(), len, NULL, and str.
Referenced by draw_horizontal_scale_indicators(), draw_seq_handle(), draw_udim_label(), draw_vertical_scale_indicators(), ED_image_draw_info(), ED_info_draw_stats(), ED_region_info_draw_multiline(), file_string_width(), get_column_width(), get_index_column_width(), metadata_draw_imbuf(), node_draw_frame_label(), region_draw_status_text(), ui_block_bounds_calc_text(), ui_draw_menu_item(), UI_fontstyle_draw_ex(), UI_fontstyle_draw_rotated(), UI_fontstyle_draw_simple_backdrop(), UI_fontstyle_string_width(), UI_panel_category_draw_all(), ui_text_clip_cursor(), UI_text_clip_middle_ex(), ui_text_clip_right_label(), ui_textedit_set_cursor_pos(), ui_tooltip_create_with_data(), uiTemplateReportsBanner(), and widget_draw_text().
| void BLF_width_and_height | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| float * | r_width, | ||
| float * | r_height | ||
| ) |
Definition at line 698 of file blf.c.
References blf_font_width_and_height(), blf_get(), len, NULL, and str.
Referenced by drawAutoKeyWarning(), ED_region_cache_draw_curfra_label(), gizmo_axis_draw(), gizmo_ruler_draw(), icon_draw_rect_input_text(), py_blf_dimensions(), radial_control_paint_cursor(), ui_draw_preview_item(), and voxel_size_edit_draw().
Definition at line 710 of file blf.c.
References blf_font_width(), blf_get(), BLF_RESULT_CHECK_INIT, len, and str.
Referenced by BLF_width(), and ui_tooltip_create_with_data().
| float BLF_width_max | ( | int | fontid | ) |
Definition at line 768 of file blf.c.
References blf_font_width_max(), and blf_get().
Referenced by BKE_image_stamp_buf(), and do_text_effect().
| size_t BLF_width_to_rstrlen | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| float | width, | ||
| float * | r_width | ||
| ) |
Definition at line 656 of file blf.c.
References FontBLF::aspect, BLF_ASPECT, blf_font_width_to_rstrlen(), blf_get(), FontBLF::flags, len, ret, str, and width.
Referenced by UI_text_clip_middle_ex().
| size_t BLF_width_to_strlen | ( | int | fontid, |
| const char * | str, | ||
| size_t | len, | ||
| float | width, | ||
| float * | r_width | ||
| ) |
Definition at line 636 of file blf.c.
References FontBLF::aspect, BLF_ASPECT, blf_font_width_to_strlen(), blf_get(), FontBLF::flags, len, ret, str, and width.
Referenced by UI_panel_category_draw_all(), UI_text_clip_middle_ex(), ui_text_clip_right_ex(), and ui_text_clip_right_label().
| void BLF_wordwrap | ( | int | fontid, |
| int | wrap_width | ||
| ) |
Definition at line 822 of file blf.c.
References blf_get(), FontBLF::wrap_width, and wrap_width().
Referenced by BKE_image_stamp_buf(), do_text_effect(), file_draw_string_multiline(), metadata_box_height_get(), metadata_draw_imbuf(), node_draw_frame_label(), py_blf_word_wrap(), ui_tooltip_create_with_data(), and ui_tooltip_region_draw_cb().
| int blf_mono_font = -1 |
Definition at line 70 of file blf.c.
Referenced by draw_udim_label(), ED_image_draw_info(), ED_region_image_metadata_draw(), gizmo_ruler_draw(), icon_draw_rect_input_symbol(), text_draw_context_init(), textview_draw(), ui_tooltip_create_with_data(), ui_tooltip_region_draw_cb(), and uiStyleInit().
| int blf_mono_font_render = -1 |
Definition at line 71 of file blf.c.
Referenced by BKE_image_stamp_buf(), checker_board_text(), do_text_effect(), and uiStyleInit().
|
static |
Definition at line 67 of file blf.c.
Referenced by BLF_cache_clear(), BLF_exit(), blf_get(), BLF_init(), BLF_load(), BLF_load_mem_unique(), BLF_load_unique(), blf_search(), blf_search_available(), BLF_unload(), and BLF_unload_id().