26#define BLF_DATAFILES_FONTS_DIR "fonts"
29#define BLF_DEFAULT_PROPORTIONAL_FONT "Inter.woff2"
32#define BLF_DEFAULT_MONOSPACED_FONT "DejaVuSansMono.woff2"
116#define BLF_VFONT_METRICS_SCALE_DEFAULT float(1.0 / 1000.0)
117#define BLF_VFONT_METRICS_EM_RATIO_DEFAULT 1.0f
118#define BLF_VFONT_METRICS_ASCEND_RATIO_DEFAULT 0.8f
125 unsigned int unicode,
126 ListBaseT<Nurb> *nurbsbase,
167 int fontid,
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char alpha);
168void BLF_color3ub(
int fontid,
unsigned char r,
unsigned char g,
unsigned char b);
169void BLF_color4f(
int fontid,
float r,
float g,
float b,
float a);
190void BLF_draw(
int fontid,
const char *
str,
size_t str_len, ResultBLF *r_info =
nullptr)
192int BLF_draw_mono(
int fontid, const
char *
str,
size_t str_len,
int char_width,
int tab_columns)
199 const
float color[4] =
nullptr,
200 float outline_alpha = 1.0f,
201 bool multicolor =
false,
202 FunctionRef<
void(std::
string &)> edit_source_cb =
nullptr);
208 bool multicolor =
false,
209 FunctionRef<
void(std::
string &)> edit_source_cb =
nullptr);
214 void *user_dataconst);
234 FunctionRef<
void(
int index,
size_t byte_offset,
int byte_len,
int advance_x)> callback);
257 int fontid, const
char *
str,
size_t str_len,
size_t str_offset,
int cursor_width);
264 int fontid, const
char *
str,
size_t str_len,
size_t sel_start,
size_t sel_length);
327 int fontid, const
char *
str,
size_t str_len,
float *r_width,
float *r_height)
ATTR_NONNULL();
345void BLF_clipping(
int fontid,
int xmin,
int ymin,
int xmax,
int ymax);
350 const
int max_pixel_width,
426bool BLF_thumb_preview(const
char *filepath,
unsigned char *buf,
int w,
int h,
int channels)
456#define BLF_DRAW_STR_DUMMY_MAX 1024
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
These structs are the foundation for all linked lists in the library system.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
float3x3 scale(float3x3 mat, float2 scale)
void BLF_boundbox(int fontid, const char *str, size_t str_len, rcti *r_box, ResultBLF *r_info=nullptr) ATTR_NONNULL(2)
bool BLF_is_loaded_id(int fontid) ATTR_WARN_UNUSED_RESULT
int BLF_glyph_advance(int fontid, const char *str)
void BLF_color3ubv_alpha(int fontid, const unsigned char rgb[3], unsigned char alpha)
int BLF_load_default(bool unique)
void BLF_shadow_offset(int fontid, int x, int y)
void BLF_aspect(int fontid, float x, float y, float z)
void BLF_position(int fontid, float x, float y, float z)
float BLF_width(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
void BLF_batch_draw_flush()
bool BLF_thumb_preview(const char *filepath, unsigned char *buf, int w, int h, int channels) ATTR_NONNULL()
int BLF_width_max(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_shadow(int fontid, FontShadowType type, const float rgba[4]=nullptr)
void BLF_draw_svg_icon(uint icon_id, float x, float y, float size, const float color[4]=nullptr, float outline_alpha=1.0f, bool multicolor=false, FunctionRef< void(std::string &)> edit_source_cb=nullptr)
void BLF_color3ub(int fontid, unsigned char r, unsigned char g, unsigned char b)
void BLF_wordwrap(int fontid, int wrap_width, BLFWrapMode mode=BLFWrapMode::Minimal)
void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int channel_count, const ColorSpace *colorspace)
int BLF_load_mem(const char *name, const unsigned char *mem, int mem_size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
bool BLF_get_vfont_metrics(int fontid, float *ascend_ratio, float *em_ratio, float *scale)
size_t BLF_width_to_strlen(int fontid, const char *str, size_t str_len, float width, float *r_width) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
void BLF_default_set(int fontid)
void BLF_batch_draw_begin()
int BLF_load_mono_default(bool unique)
bool BLF_is_loaded_mem(const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int bool BLF_is_loaded(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLF_cache_flush_set_fn(void(*cache_flush_fn)())
void BLF_character_weight(int fontid, int weight)
void BLF_addref_id(int fontid)
bool BLF_bounds_max(int fontid, rctf *r_bounds) ATTR_NONNULL(2)
void BLF_load_font_stack()
void BLF_disable(int fontid, FontFlags flag)
void BLF_color4f(int fontid, float r, float g, float b, float a)
void BLF_metrics_attach(int fontid, const unsigned char *mem, int mem_size) ATTR_NONNULL(2)
void BLF_size(int fontid, float size)
int BLF_load(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool BLF_str_offset_to_glyph_bounds(int fontid, const char *str, size_t str_offset, rcti *r_glyph_bounds) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2
void BLF_color3ubv(int fontid, const unsigned char rgb[3])
float BLF_height(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
void BLF_buffer_state_pop(BLFBufferState *buffer_state)
int BLF_default_weight(int fontid) ATTR_WARN_UNUSED_RESULT
bool(*)(const char *str, size_t str_step_ofs, const rcti *bounds, void *user_dataconst) BLF_GlyphBoundsFn
size_t BLF_width_to_rstrlen(int fontid, const char *str, size_t str_len, float width, float *r_width) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
void BLF_clipping(int fontid, int xmin, int ymin, int xmax, int ymax)
Vector< StringRef > BLF_string_wrap(int fontid, StringRef str, const int max_pixel_width, BLFWrapMode mode=BLFWrapMode::Minimal)
float BLF_fixed_width(int fontid) ATTR_WARN_UNUSED_RESULT
int void BLF_unload(const char *filepath) ATTR_NONNULL(1)
bool BLF_has_variable_weight(int fontid) ATTR_WARN_UNUSED_RESULT
bool BLF_has_glyph(int fontid, unsigned int unicode) ATTR_WARN_UNUSED_RESULT
void BLF_batch_draw_end()
void BLF_draw(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_NONNULL(2)
int BLF_ascender(int fontid) ATTR_WARN_UNUSED_RESULT
int BLF_load_mem_unique(const char *name, const unsigned char *mem, int mem_size) ATTR_NONNULL(1
void BLF_color4ubv(int fontid, const unsigned char rgba[4])
BLFBufferState * BLF_buffer_state_push(int fontid)
void BLF_state_print(int fontid)
void BLF_buffer_col(int fontid, const float srgb_color[4]) ATTR_NONNULL(2)
void BLF_draw_default(float x, float y, float z, const char *str, size_t str_len) ATTR_NONNULL()
void BLF_color4ub(int fontid, unsigned char r, unsigned char g, unsigned char b, unsigned char alpha)
int BLF_draw_mono(int fontid, const char *str, size_t str_len, int char_width, int tab_columns) ATTR_NONNULL(2)
bool BLF_character_to_curves(int fontid, unsigned int unicode, ListBaseT< Nurb > *nurbsbase, const float scale, bool use_fallback, float *r_advance, rctf *r_bounds)
int BLF_height_max(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_color3f(int fontid, float r, float g, float b)
char * BLF_display_name_from_file(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLF_descender(int fontid) ATTR_WARN_UNUSED_RESULT
bool int BLF_str_offset_to_cursor(int fontid, const char *str, size_t str_len, size_t str_offset, int cursor_width)
int BLF_load_unique(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Array< uchar > BLF_svg_icon_bitmap(uint icon_id, float size, int *r_width, int *r_height, bool multicolor=false, FunctionRef< void(std::string &)> edit_source_cb=nullptr)
size_t BLF_str_offset_from_cursor_position(int fontid, const char *str, size_t str_len, int location_x) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
void BLF_boundbox_foreach_glyph(int fontid, const char *str, size_t str_len, BLF_GlyphBoundsFn user_fn, void *user_data) ATTR_NONNULL(2)
void BLF_draw_buffer(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_NONNULL(2)
void BLF_buffer_state_free(BLFBufferState *buffer_state)
void BLF_info_foreach_glyph(int fontid, const char *str, size_t str_len, FunctionRef< void(int index, size_t byte_offset, int byte_len, int advance_x)> callback)
bool ATTR_WARN_UNUSED_RESULT
bool BLF_is_builtin(int fontid)
void BLF_width_and_height(int fontid, const char *str, size_t str_len, float *r_width, float *r_height) ATTR_NONNULL()
void BLF_default_size(float size)
void BLF_color3fv_alpha(int fontid, const float rgb[3], float alpha)
void BLF_rotation(int fontid, float angle)
char * BLF_display_name_from_id(int fontid)
void BLF_enable(int fontid, FontFlags flag)
void BLF_color4fv(int fontid, const float rgba[4])
ocio::ColorSpace ColorSpace
Vector< Bounds< int > > BLF_str_selection_boxes(int fontid, const char *str, size_t str_len, size_t sel_start, size_t sel_length)
bool BLF_unload_id(int fontid)