30#define BLF_MAX_FONT 64
35#define BLF_SUBPIXEL_POSITION
40#define BLF_SUBPIXEL_AA
43#define BLF_CACHE_MAX_FACES 8
45#define BLF_CACHE_MAX_SIZES 16
47#define BLF_CACHE_BYTES 0x100000
53#define BLF_ICON_OFFSET 0x100000L
112 const float color[4] =
nullptr,
113 float outline_alpha = 1.0f,
114 bool multicolor =
false,
123 bool multicolor =
false,
135 FontBLF *font,
const char *
str,
size_t str_len,
int cwidth,
int tab_columns);
139 FontBLF *font,
const char *
str,
size_t str_len,
int width,
int *r_width);
141 FontBLF *font,
const char *
str,
size_t str_len,
int width,
int *r_width);
168 bool (*user_fn)(
const char *
str,
size_t str_step_ofs,
const rcti *
bounds,
void *user_data),
179 rcti *r_glyph_bounds);
182 FontBLF *font,
const char *
str,
size_t str_len,
size_t sel_start,
size_t sel_length);
185 FontBLF *font,
const char *
str,
size_t str_len,
size_t str_offset,
int cursor_width);
198#ifdef BLF_SUBPIXEL_AA
213 unsigned int unicode,
225extern FT_Error FT_New_Face__win32_compat(FT_Library library,
226 const char *pathname,
FontBLF * global_font[BLF_MAX_FONT]
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)
blender::Vector< blender::StringRef > blf_font_string_wrap(FontBLF *font, blender::StringRef str, int max_pixel_width, BLFWrapMode mode)
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)
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)
bool blf_font_bounds_max(FontBLF *font, rctf *r_bounds)
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)
bool blf_character_to_curves(FontBLF *font, unsigned int unicode, ListBase *nurbsbase, const float scale, bool use_fallback, float *r_advance)
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)
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)
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)
void blf_batch_draw_begin(FontBLF *font)
GlyphBLF * blf_glyph_ensure_subpixel(FontBLF *font, GlyphCacheBLF *gc, GlyphBLF *g, int32_t pen_x)
int blf_font_glyph_advance(FontBLF *font, const char *str)
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 DBVT_INLINE btScalar size(const btDbvtVolume &a)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)