42 #ifdef WITH_INTERNATIONAL
132 uiFont *font =
U.uifonts.first;
134 for (; font; font = font->
next) {
139 return U.uifonts.first;
162 const float shadow_color[4] = {
199 yofs =
MAX2(0, yofs);
200 xofs =
MAX2(0, xofs);
263 txtrect.
ymin - yofs - xofs - 4,
275 const float shadow_color[4] = {
326 const float col_fg[4],
327 const float col_bg[4])
339 const float margin =
height / 4.0f;
342 const float color[4] = {col_bg[0], col_bg[1], col_bg[2], 0.5f};
348 .xmax =
x +
width + margin,
349 .ymin = (
y + decent) - margin,
350 .ymax = (
y + decent) +
height + margin,
373 style =
BLI_findstring(&
U.uistyles,
"Unifont Style",
sizeof(style) * 2);
374 return (style !=
NULL) ? style :
U.uistyles.first;
376 return U.uistyles.first;
459 uiFont *font_first =
U.uifonts.first;
462 if (font_first ==
NULL) {
467 if (
U.font_path_ui[0]) {
477 const bool unique =
false;
483 font->blf_id =
BLF_load(font->filename);
484 if (font->blf_id == -1) {
491 if (font->blf_id == -1) {
493 printf(
"%s: error, no fonts available\n", __func__);
501 BLF_size(font->blf_id, 11 *
U.pixelsize,
U.dpi);
502 BLF_size(font->blf_id, 12 *
U.pixelsize,
U.dpi);
503 BLF_size(font->blf_id, 14 *
U.pixelsize,
U.dpi);
516 if (
U.font_path_ui_mono[0]) {
520 const bool unique =
true;
547 if (font->blf_id != -1) {
565 const bool unique =
true;
void BLF_default_set(int fontid)
#define BLF_KERNING_DEFAULT
float BLF_width(int fontid, const char *str, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLF_color4fv(int fontid, const float rgba[4])
void BLF_shadow_offset(int fontid, int x, int y)
void BLF_shadow(int fontid, int level, const float rgba[4]) ATTR_NONNULL(3)
void BLF_draw(int fontid, const char *str, size_t len) ATTR_NONNULL(2)
#define BLF_DRAW_STR_DUMMY_MAX
void BLF_disable(int fontid, int option)
void BLF_rotation(int fontid, float angle)
float BLF_descender(int fontid) ATTR_WARN_UNUSED_RESULT
int BLF_load_unique(const char *name) ATTR_NONNULL()
void BLF_unload_id(int fontid)
float BLF_ascender(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_draw_ex(int fontid, const char *str, size_t len, struct ResultBLF *r_info) ATTR_NONNULL(2)
int BLF_load_mono_default(const bool unique)
#define BLF_HINTING_SLIGHT
void BLF_size(int fontid, int size, int dpi)
void BLF_enable(int fontid, int option)
int BLF_load(const char *name) ATTR_NONNULL()
int BLF_height_max(int fontid) ATTR_WARN_UNUSED_RESULT
int BLF_load_default(const bool unique)
void BLF_color4ubv(int fontid, const unsigned char rgba[4])
void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax)
void BLF_position(int fontid, float x, float y, float z)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findstring(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
@ USER_TEXT_HINTING_SLIGHT
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
void UI_draw_roundbox_corner_set(int type)
void UI_draw_roundbox_aa(const struct rctf *rect, bool filled, float rad, const float color[4])
#define UI_DEFAULT_TITLE_POINTS
#define UI_DEFAULT_TEXT_POINTS
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
void UI_fontstyle_draw_simple(const uiFontStyle *fs, float x, float y, const char *str, const uchar col[4])
int UI_fontstyle_string_width(const uiFontStyle *fs, const char *str)
const uiStyle * UI_style_get_dpi(void)
const uiStyle * UI_style_get(void)
void UI_fontstyle_draw_simple_backdrop(const uiFontStyle *fs, float x, float y, const char *str, const float col_fg[4], const float col_bg[4])
int UI_fontstyle_height_max(const uiFontStyle *fs)
void UI_fontstyle_draw_ex(const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4], const struct uiFontStyleDraw_Params *fs_params, size_t len, int *r_xofs, int *r_yofs, struct ResultBLF *r_info)
void UI_fontstyle_draw_rotated(const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4])
void UI_fontstyle_set(const uiFontStyle *fs)
static uiFont * uifont_to_blfont(int id)
static uiStyle * ui_style_new(ListBase *styles, const char *name, short uifont_id)
void UI_fontstyle_draw(const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4], const struct uiFontStyleDraw_Params *fs_params)
void *(* MEM_callocN)(size_t len, const char *str)
ccl_device_inline float2 floor(const float2 &a)
ccl_device_inline float3 ceil(const float3 &a)