Blender V5.0
FontBLF Struct Reference

#include <blf_internal_types.hh>

Public Attributes

char * filepath
void * mem
size_t mem_size
char * mem_name
uint unicode_ranges [4]
std::atomic< uint32_t > reference_count
float aspect [3]
int pos [3]
float angle
FontShadowType shadow
int shadow_x
int shadow_y
unsigned char shadow_color [4]
unsigned char color [4]
rcti clip_rec
int wrap_width
BLFWrapMode wrap_mode
float size
FT_MM_Var * variations
int char_weight
float char_slant
float char_width
float char_spacing
int tex_size_max
FontFlags flags
blender::Vector< std::unique_ptr< GlyphCacheBLF > > cache
KerningCacheBLFkerning_cache
FT_Library ft_lib
FT_Face face
FT_Size ft_size
FT_Long face_flags
FontMetrics metrics
FontBufInfoBLF buf_info
blender::Mutex glyph_cache_mutex

Detailed Description

Definition at line 310 of file blf_internal_types.hh.

Member Data Documentation

◆ angle

float FontBLF::angle

Angle in radians.

Definition at line 337 of file blf_internal_types.hh.

Referenced by blf_draw_gpu__start(), blf_font_fill(), and BLF_rotation().

◆ aspect

◆ buf_info

FontBufInfoBLF FontBLF::buf_info

Data for buffer usage (drawing into a texture buffer)

Definition at line 407 of file blf_internal_types.hh.

Referenced by BLF_buffer(), BLF_buffer_col(), BLF_buffer_state_pop(), BLF_buffer_state_push(), BLF_draw_buffer(), blf_draw_buffer__start(), blf_font_draw_buffer_ex(), and blf_font_fill().

◆ cache

blender::Vector<std::unique_ptr<GlyphCacheBLF> > FontBLF::cache

List of glyph caches (GlyphCacheBLF) for this font for size, DPI, bold, italic. Use blf_glyph_cache_acquire(font) and blf_glyph_cache_release(font) to access cache!

Definition at line 386 of file blf_internal_types.hh.

Referenced by blf_glyph_cache_clear(), blf_glyph_cache_find(), and blf_glyph_cache_new().

◆ char_slant

float FontBLF::char_slant

Slant in clockwise degrees. 0.0 = upright.

Definition at line 370 of file blf_internal_types.hh.

Referenced by blf_font_fill(), blf_glyph_cache_find(), blf_glyph_cache_new(), blf_glyph_render(), and blf_setup_face().

◆ char_spacing

float FontBLF::char_spacing

Factor of normal character spacing. 0.0 = normal.

Definition at line 374 of file blf_internal_types.hh.

Referenced by blf_font_fill(), blf_glyph_cache_find(), blf_glyph_cache_new(), blf_glyph_render(), and blf_setup_face().

◆ char_weight

int FontBLF::char_weight

Wight in range: 100 - 900, 400 = normal.

Definition at line 368 of file blf_internal_types.hh.

Referenced by BLF_character_weight(), blf_font_fill(), blf_glyph_cache_find(), blf_glyph_cache_new(), blf_glyph_render(), and blf_setup_face().

◆ char_width

float FontBLF::char_width

Factor of normal character width. 1.0 = normal.

Definition at line 372 of file blf_internal_types.hh.

Referenced by blf_font_fill(), blf_glyph_cache_find(), blf_glyph_cache_new(), blf_glyph_render(), and blf_setup_face().

◆ clip_rec

rcti FontBLF::clip_rec

Clipping rectangle.

Definition at line 353 of file blf_internal_types.hh.

Referenced by BLF_clipping(), blf_font_fill(), and blf_glyph_draw().

◆ color

◆ face

◆ face_flags

FT_Long FontBLF::face_flags

Copy of the font->face->face_flags, in case we don't have a face loaded.

Definition at line 401 of file blf_internal_types.hh.

Referenced by blf_setup_face().

◆ filepath

char* FontBLF::filepath

The full path to font file or NULL when from memory.

Definition at line 312 of file blf_internal_types.hh.

Referenced by blf_cache_face_requester(), blf_ensure_face(), blf_font_free(), blf_font_new_impl(), blf_search_by_filepath(), and BLF_unload().

◆ flags

◆ ft_lib

FT_Library FontBLF::ft_lib

Freetype2 lib handle.

Definition at line 392 of file blf_internal_types.hh.

Referenced by blf_ensure_face(), blf_font_free(), blf_font_new_impl(), and blf_glyph_render_bitmap().

◆ ft_size

◆ glyph_cache_mutex

blender::Mutex FontBLF::glyph_cache_mutex

Mutex lock for glyph cache.

Definition at line 410 of file blf_internal_types.hh.

Referenced by blf_glyph_cache_acquire(), blf_glyph_cache_clear(), and blf_glyph_cache_release().

◆ kerning_cache

KerningCacheBLF* FontBLF::kerning_cache

Cache of unscaled kerning values. Will be NULL if font does not have kerning.

Definition at line 389 of file blf_internal_types.hh.

Referenced by blf_font_fill(), blf_font_free(), blf_kerning(), and blf_setup_face().

◆ mem

void* FontBLF::mem

Pointer to in-memory font, or NULL when from a file.

Definition at line 315 of file blf_internal_types.hh.

Referenced by blf_cache_face_requester(), blf_ensure_face(), and blf_font_new_impl().

◆ mem_name

char* FontBLF::mem_name

Handle for in-memory fonts to avoid loading them multiple times.

Definition at line 318 of file blf_internal_types.hh.

Referenced by blf_font_free(), blf_font_new_impl(), and blf_search_by_mem_name().

◆ mem_size

size_t FontBLF::mem_size

◆ metrics

FontMetrics FontBLF::metrics

Details about the font's design and style and sizes (in un-sized font units).

Definition at line 404 of file blf_internal_types.hh.

Referenced by BLF_default_weight(), blf_glyph_render(), and blf_setup_face().

◆ pos

int FontBLF::pos[3]

◆ reference_count

std::atomic<uint32_t> FontBLF::reference_count

Number of references to this font object. When it reaches zero, font is unloaded.

Definition at line 328 of file blf_internal_types.hh.

Referenced by BLF_addref_id(), BLF_load(), BLF_load_mem_unique(), BLF_load_unique(), BLF_unload(), and BLF_unload_id().

◆ shadow

FontShadowType FontBLF::shadow

Shadow type.

Definition at line 340 of file blf_internal_types.hh.

Referenced by blf_draw_svg_icon(), blf_glyph_draw(), and BLF_shadow().

◆ shadow_color

unsigned char FontBLF::shadow_color[4]

Shadow color.

Definition at line 347 of file blf_internal_types.hh.

Referenced by blf_draw_svg_icon(), blf_glyph_draw(), and BLF_shadow().

◆ shadow_x

int FontBLF::shadow_x

And shadow offset.

Definition at line 343 of file blf_internal_types.hh.

Referenced by blf_draw_svg_icon(), blf_glyph_calc_rect_shadow(), and BLF_shadow_offset().

◆ shadow_y

int FontBLF::shadow_y

◆ size

◆ tex_size_max

int FontBLF::tex_size_max

Max texture size.

Definition at line 377 of file blf_internal_types.hh.

Referenced by blf_font_fill(), and blf_glyph_draw().

◆ unicode_ranges

uint FontBLF::unicode_ranges[4]

Copied from the SFNT OS/2 table. Bit flags for unicode blocks and ranges considered "functional". Cached here because face might not always exist. See: https://docs.microsoft.com/en-us/typography/opentype/spec/os2#ur

Definition at line 325 of file blf_internal_types.hh.

Referenced by blf_font_has_coverage_bit(), and blf_font_new_impl().

◆ variations

FT_MM_Var* FontBLF::variations

Axes data for Adobe MM, TrueType GX, or OpenType variation fonts.

Definition at line 363 of file blf_internal_types.hh.

Referenced by blf_font_free(), blf_glyph_render(), blf_glyph_set_variation_float(), blf_glyph_set_variation_normalized(), BLF_has_variable_weight(), and blf_setup_face().

◆ wrap_mode

◆ wrap_width

int FontBLF::wrap_width

The width to wrap the text, see BLF_WORD_WRAP.

Definition at line 356 of file blf_internal_types.hh.

Referenced by blf_font_boundbox__wrap(), blf_font_draw__wrap(), blf_font_draw_buffer__wrap(), and BLF_wordwrap().


The documentation for this struct was generated from the following file: