20#define FONT_THUMB_VERSION "1.0.1"
27 const float col[4] = {1.0f, 1.0f, 1.0f, 0.0f};
50 int font_id = (filepath[0] !=
'<') ?
BLF_load(filepath) : 0;
54 const char sample[] =
"ABCDEFGH\nabcdefg123";
63 float scale = float(width) / name_w;
68 int height = int(name_h * 1.3f);
71 const float col[4] = {1.0f, 1.0f, 1.0f, 0.0f};
79 BLF_buffer(font_id,
nullptr,
nullptr, 0, 0,
nullptr);
void BLF_size(int fontid, float size)
void BLF_draw_buffer(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_NONNULL(2)
void BLF_width_and_height(int fontid, const char *str, size_t str_len, float *r_width, float *r_height) ATTR_NONNULL()
void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, const ColorManagedDisplay *display)
void BLF_buffer_col(int fontid, const float rgba[4]) ATTR_NONNULL(2)
int BLF_load(const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLF_enable(int fontid, int option)
bool BLF_unload_id(int fontid)
bool BLF_thumb_preview(const char *filepath, unsigned char *buf, int w, int h, int channels) ATTR_NONNULL()
void BLF_position(int fontid, float x, float y, float z)
char * BLI_hash_md5_to_hexdigest(const void *resblock, char r_hex_digest[33])
void * BLI_hash_md5_buffer(const char *buffer, size_t len, void *resblock)
void IMB_freeImBuf(ImBuf *ibuf)
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_rectfill(ImBuf *drect, const float col[4])
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
ImBuf * IMB_thumb_load_font(const char *filepath, uint x, uint y)
bool IMB_thumb_load_font_get_hash(char *r_hash)
#define FONT_THUMB_VERSION
ImBuf * IMB_font_preview(const char *filepath, uint width, const float color[4])