Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | BatchBLF |
struct | KerningCacheBLF |
struct | GlyphCacheBLF |
struct | GlyphBLF |
struct | FontBufInfoBLF |
struct | FontBLF |
struct | DirBLF |
Macros | |
#define | BLF_VARIATIONS_MAX 16 /* Maximum variation axes per font. */ |
#define | MAKE_DVAR_TAG(a, b, c, d) (((uint32_t)a << 24u) | ((uint32_t)b << 16u) | ((uint32_t)c << 8u) | ((uint32_t)d)) |
#define | blf_variation_axis_weight MAKE_DVAR_TAG('w', 'g', 'h', 't') /* 'wght' weight axis. */ |
#define | blf_variation_axis_slant MAKE_DVAR_TAG('s', 'l', 'n', 't') /* 'slnt' slant axis. */ |
#define | blf_variation_axis_width MAKE_DVAR_TAG('w', 'd', 't', 'h') /* 'wdth' width axis. */ |
#define | blf_variation_axis_spacing MAKE_DVAR_TAG('s', 'p', 'a', 'c') /* 'spac' spacing axis. */ |
#define | blf_variation_axis_optsize MAKE_DVAR_TAG('o', 'p', 's', 'z') /* 'opsz' optical size. */ |
#define | BLF_BATCH_DRAW_LEN_MAX 2048 /* in glyph */ |
#define | GLYPH_ASCII_TABLE_SIZE 128 |
#define | KERNING_CACHE_TABLE_SIZE 128 |
#define | KERNING_ENTRY_UNSET INT_MAX |
Typedefs | |
typedef struct BatchBLF | BatchBLF |
typedef struct KerningCacheBLF | KerningCacheBLF |
typedef struct GlyphCacheBLF | GlyphCacheBLF |
typedef struct GlyphBLF | GlyphBLF |
typedef struct FontBufInfoBLF | FontBufInfoBLF |
typedef struct FontBLF | FontBLF |
typedef struct DirBLF | DirBLF |
Variables | |
BatchBLF | g_batch |
Sub-Pixel Offset & Utilities | |
Free-type uses fixed point precision for sub-pixel offsets. Utility functions here avoid exposing the details in the BLF API. | |
#define | USE_LEGACY_SPACING |
#define | FT_PIX_FLOOR(x) ((x) & ~63) |
#define | FT_PIX_ROUND(x) FT_PIX_FLOOR((x) + 32) |
#define | FT_PIX_CEIL(x) ((x) + 63) |
#define | FT_PIX_DEFAULT_ROUNDING(x) FT_PIX_FLOOR(x) |
typedef int32_t | ft_pix |
BLI_INLINE int | ft_pix_to_int (ft_pix v) |
BLI_INLINE int | ft_pix_to_int_floor (ft_pix v) |
BLI_INLINE int | ft_pix_to_int_ceil (ft_pix v) |
BLI_INLINE ft_pix | ft_pix_from_int (int v) |
BLI_INLINE ft_pix | ft_pix_from_float (float v) |
BLI_INLINE ft_pix | ft_pix_round_advance (ft_pix v, ft_pix step) |
Definition at line 98 of file blf_internal_types.h.
#define blf_variation_axis_optsize MAKE_DVAR_TAG('o', 'p', 's', 'z') /* 'opsz' optical size. */ |
Definition at line 24 of file blf_internal_types.h.
#define blf_variation_axis_slant MAKE_DVAR_TAG('s', 'l', 'n', 't') /* 'slnt' slant axis. */ |
Definition at line 21 of file blf_internal_types.h.
#define blf_variation_axis_spacing MAKE_DVAR_TAG('s', 'p', 'a', 'c') /* 'spac' spacing axis. */ |
Definition at line 23 of file blf_internal_types.h.
#define blf_variation_axis_weight MAKE_DVAR_TAG('w', 'g', 'h', 't') /* 'wght' weight axis. */ |
Definition at line 20 of file blf_internal_types.h.
#define blf_variation_axis_width MAKE_DVAR_TAG('w', 'd', 't', 'h') /* 'wdth' width axis. */ |
Definition at line 22 of file blf_internal_types.h.
#define BLF_VARIATIONS_MAX 16 /* Maximum variation axes per font. */ |
Definition at line 15 of file blf_internal_types.h.
Definition at line 49 of file blf_internal_types.h.
#define FT_PIX_DEFAULT_ROUNDING | ( | x | ) | FT_PIX_FLOOR(x) |
Definition at line 52 of file blf_internal_types.h.
Definition at line 47 of file blf_internal_types.h.
#define FT_PIX_ROUND | ( | x | ) | FT_PIX_FLOOR((x) + 32) |
Definition at line 48 of file blf_internal_types.h.
#define GLYPH_ASCII_TABLE_SIZE 128 |
Definition at line 101 of file blf_internal_types.h.
#define KERNING_CACHE_TABLE_SIZE 128 |
Definition at line 104 of file blf_internal_types.h.
#define KERNING_ENTRY_UNSET INT_MAX |
Definition at line 107 of file blf_internal_types.h.
#define MAKE_DVAR_TAG | ( | a, | |
b, | |||
c, | |||
d | |||
) | (((uint32_t)a << 24u) | ((uint32_t)b << 16u) | ((uint32_t)c << 8u) | ((uint32_t)d)) |
Definition at line 17 of file blf_internal_types.h.
#define USE_LEGACY_SPACING |
Definition at line 45 of file blf_internal_types.h.
typedef struct FontBufInfoBLF FontBufInfoBLF |
This is an internal type that represents sub-pixel positioning, users of this type are to use ft_pix_*
functions to keep scaling/rounding in one place.
Definition at line 37 of file blf_internal_types.h.
typedef struct GlyphCacheBLF GlyphCacheBLF |
typedef struct KerningCacheBLF KerningCacheBLF |
BLI_INLINE ft_pix ft_pix_from_float | ( | float | v | ) |
Definition at line 81 of file blf_internal_types.h.
References v.
BLI_INLINE ft_pix ft_pix_from_int | ( | int | v | ) |
Definition at line 76 of file blf_internal_types.h.
References v.
Referenced by blf_font_boundbox_ex(), blf_font_draw_buffer_ex(), blf_font_draw_mono(), blf_font_height_max_ft_pix(), blf_font_width_max_ft_pix(), and blf_font_wrap_apply().
BLI_INLINE ft_pix ft_pix_round_advance | ( | ft_pix | v, |
ft_pix | step | ||
) |
Definition at line 86 of file blf_internal_types.h.
References FT_PIX_DEFAULT_ROUNDING, and v.
Referenced by blf_font_boundbox_ex(), blf_font_boundbox_foreach_glyph_ex(), blf_font_draw_buffer_ex(), blf_font_draw_ex(), blf_font_width_to_strlen_glyph_process(), and blf_font_wrap_apply().
BLI_INLINE int ft_pix_to_int | ( | ft_pix | v | ) |
Definition at line 57 of file blf_internal_types.h.
References FT_PIX_DEFAULT_ROUNDING, and v.
Referenced by blf_font_ascender(), blf_font_boundbox_ex(), blf_font_boundbox_foreach_glyph_ex(), blf_font_descender(), blf_font_draw_buffer_ex(), blf_font_draw_ex(), blf_font_height_max(), blf_font_width_max(), blf_font_width_to_rstrlen(), blf_font_width_to_strlen(), blf_font_width_to_strlen_glyph_process(), blf_font_wrap_apply(), and blf_glyph_calc_rect_test().
BLI_INLINE int ft_pix_to_int_ceil | ( | ft_pix | v | ) |
Definition at line 71 of file blf_internal_types.h.
References FT_PIX_CEIL, and v.
Referenced by blf_font_boundbox_ex(), and blf_font_boundbox_foreach_glyph_ex().
BLI_INLINE int ft_pix_to_int_floor | ( | ft_pix | v | ) |
Definition at line 66 of file blf_internal_types.h.
References v.
Referenced by blf_font_boundbox_ex(), blf_font_boundbox_foreach_glyph_ex(), blf_font_draw_ex(), and blf_font_draw_mono().
|
extern |
Definition at line 52 of file blf_font.c.
Referenced by blf_batch_cache_texture_load(), blf_batch_draw(), blf_batch_draw_begin(), BLF_batch_draw_begin(), BLF_batch_draw_end(), blf_batch_draw_end(), blf_batch_draw_exit(), BLF_batch_draw_flush(), blf_batch_draw_init(), blf_font_init(), blf_glyph_draw(), and blf_texture_draw().