28#define BLF_MAX_FONT 64
33#define BLF_SUBPIXEL_POSITION
38#define BLF_SUBPIXEL_AA
41#define BLF_CACHE_MAX_FACES 4
43#define BLF_CACHE_MAX_SIZES 8
45#define BLF_CACHE_BYTES 400000
51#define BLF_ICON_OFFSET 0x100000L
109 const float color[4] =
nullptr,
110 float outline_alpha = 1.0f,
111 bool multicolor =
false,
120 bool multicolor =
false,
125 int max_pixel_width);
131 FontBLF *font,
const char *
str,
size_t str_len,
int cwidth,
int tab_columns);
135 FontBLF *font,
const char *
str,
size_t str_len,
int width,
int *r_width);
137 FontBLF *font,
const char *
str,
size_t str_len,
int width,
int *r_width);
162 bool (*user_fn)(
const char *
str,
size_t str_step_ofs,
const rcti *
bounds,
void *user_data),
173 rcti *r_glyph_bounds);
176 FontBLF *font,
const char *
str,
size_t str_len,
size_t sel_start,
size_t sel_length);
179 FontBLF *font,
const char *
str,
size_t str_len,
size_t str_offset,
int cursor_width);
192#ifdef BLF_SUBPIXEL_AA
206 unsigned int unicode,
216extern FT_Error FT_New_Face__win32_compat(FT_Library library,
217 const char *pathname,
size_t blf_str_offset_from_cursor_position(FontBLF *font, const char *str, size_t str_len, int location_x)
void blf_font_draw_buffer(FontBLF *font, const char *str, size_t str_len, ResultBLF *r_info)
void blf_str_offset_to_glyph_bounds(FontBLF *font, const char *str, size_t str_offset, rcti *r_glyph_bounds)
GlyphBLF * blf_glyph_ensure(FontBLF *font, GlyphCacheBLF *gc, uint charcode, uint8_t subpixel=0)
int blf_font_ascender(FontBLF *font)
void blf_font_draw__wrap(FontBLF *font, const char *str, size_t str_len, ResultBLF *r_info)
void blf_draw_buffer__start(FontBLF *font)
bool blf_ensure_face(FontBLF *font)
blender::Vector< blender::StringRef > blf_font_string_wrap(FontBLF *font, blender::StringRef str, int max_pixel_width)
void blf_glyph_cache_clear(FontBLF *font)
void blf_ensure_size(FontBLF *font)
GlyphCacheBLF * blf_glyph_cache_acquire(FontBLF *font)
int blf_font_draw_mono(FontBLF *font, const char *str, size_t str_len, int cwidth, int tab_columns)
blender::Array< uchar > blf_svg_icon_bitmap(FontBLF *font, uint icon_id, float size, int *r_width, int *r_height, bool multicolor=false, blender::FunctionRef< void(std::string &)> edit_source_cb=nullptr)
void blf_draw_svg_icon(FontBLF *font, uint icon_id, float x, float y, float size, const float color[4]=nullptr, float outline_alpha=1.0f, bool multicolor=false, blender::FunctionRef< void(std::string &)> edit_source_cb=nullptr)
void blf_font_draw(FontBLF *font, const char *str, size_t str_len, ResultBLF *r_info)
float blf_font_width(FontBLF *font, const char *str, size_t str_len, ResultBLF *r_info)
void blf_font_free(FontBLF *font)
void blf_font_boundbox__wrap(FontBLF *font, const char *str, size_t str_len, rcti *r_box, ResultBLF *r_info)
bool blf_font_id_is_valid(int fontid)
void blf_glyph_draw(FontBLF *font, GlyphCacheBLF *gc, GlyphBLF *g, int x, int y)
bool blf_font_size(FontBLF *font, float size)
float blf_font_fixed_width(FontBLF *font)
int blf_str_offset_to_cursor(FontBLF *font, const char *str, size_t str_len, size_t str_offset, int cursor_width)
FontBLF * blf_font_new_from_mem(const char *mem_name, const unsigned char *mem, size_t mem_size)
void blf_font_attach_from_mem(FontBLF *font, const unsigned char *mem, size_t mem_size)
void blf_font_width_and_height(FontBLF *font, const char *str, size_t str_len, float *r_width, float *r_height, ResultBLF *r_info)
float blf_character_to_curves(FontBLF *font, unsigned int unicode, ListBase *nurbsbase, const float scale)
void blf_font_boundbox(FontBLF *font, const char *str, size_t str_len, rcti *r_box, ResultBLF *r_info)
int blf_font_width_max(FontBLF *font)
void blf_font_draw_buffer__wrap(FontBLF *font, const char *str, size_t str_len, ResultBLF *r_info)
FontBLF * global_font[BLF_MAX_FONT]
void blf_batch_draw_begin(FontBLF *font)
GlyphBLF * blf_glyph_ensure_subpixel(FontBLF *font, GlyphCacheBLF *gc, GlyphBLF *g, int32_t pen_x)
uint blf_get_char_index(FontBLF *font, uint charcode)
char * blf_display_name(FontBLF *font)
size_t blf_font_width_to_rstrlen(FontBLF *font, const char *str, size_t str_len, int width, int *r_width)
float blf_font_height(FontBLF *font, const char *str, size_t str_len, ResultBLF *r_info)
void blf_glyph_cache_release(FontBLF *font)
char * blf_dir_metrics_search(const char *filepath)
int blf_font_descender(FontBLF *font)
void blf_draw_buffer__end()
void blf_font_boundbox_foreach_glyph(FontBLF *font, const char *str, size_t str_len, bool(*user_fn)(const char *str, size_t str_step_ofs, const rcti *bounds, void *user_data), void *user_data)
FontBLF * blf_font_new_from_filepath(const char *filepath)
int blf_font_height_max(FontBLF *font)
blender::Vector< blender::Bounds< int > > blf_str_selection_boxes(FontBLF *font, const char *str, size_t str_len, size_t sel_start, size_t sel_length)
size_t blf_font_width_to_strlen(FontBLF *font, const char *str, size_t str_len, int width, int *r_width)
GlyphBLF * blf_glyph_ensure_icon(GlyphCacheBLF *gc, uint icon_id, bool color=false, blender::FunctionRef< void(std::string &)> edit_source_cb=nullptr)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)