Blender V5.3
blender::FontBLF Struct Reference

#include <blf_internal_types.hh>

Public Attributes

char * filepath
const 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
Vector< std::unique_ptr< GlyphCacheBLF > > cache
KerningCacheBLF * kerning_cache
FT_Library ft_lib
FT_Face face
FT_Size ft_size
FT_Long face_flags
FontMetrics metrics
FontBufInfoBLF buf_info
Mutex glyph_cache_mutex

Detailed Description

Definition at line 334 of file blf_internal_types.hh.

Member Data Documentation

◆ angle

◆ aspect

◆ buf_info

◆ cache

Vector<std::unique_ptr<GlyphCacheBLF> > blender::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 410 of file blf_internal_types.hh.

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

◆ char_slant

float blender::FontBLF::char_slant

◆ char_spacing

float blender::FontBLF::char_spacing

Factor of normal character spacing. 0.0 = normal.

Definition at line 398 of file blf_internal_types.hh.

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

◆ char_weight

int blender::FontBLF::char_weight

◆ char_width

float blender::FontBLF::char_width

◆ clip_rec

rcti blender::FontBLF::clip_rec

Clipping rectangle.

Definition at line 377 of file blf_internal_types.hh.

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

◆ color

◆ face

◆ face_flags

FT_Long blender::FontBLF::face_flags

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

Definition at line 425 of file blf_internal_types.hh.

Referenced by blender::blf_setup_face().

◆ filepath

char* blender::FontBLF::filepath

◆ flags

◆ ft_lib

FT_Library blender::FontBLF::ft_lib

Freetype2 lib handle.

Definition at line 416 of file blf_internal_types.hh.

Referenced by blender::blf_font_free(), blender::blf_font_new_impl(), and blender::blf_glyph_render_bitmap().

◆ ft_size

◆ glyph_cache_mutex

Mutex blender::FontBLF::glyph_cache_mutex

◆ kerning_cache

KerningCacheBLF* blender::FontBLF::kerning_cache

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

Definition at line 413 of file blf_internal_types.hh.

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

◆ mem

const void* blender::FontBLF::mem

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

Definition at line 339 of file blf_internal_types.hh.

Referenced by blender::blf_cache_face_requester(), and blender::blf_font_new_impl().

◆ mem_name

char* blender::FontBLF::mem_name

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

Definition at line 342 of file blf_internal_types.hh.

Referenced by blender::blf_font_free(), blender::blf_font_new_impl(), blender::blf_search_by_mem_name(), and blender::BLF_state_print().

◆ mem_size

size_t blender::FontBLF::mem_size

◆ metrics

FontMetrics blender::FontBLF::metrics

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

Definition at line 428 of file blf_internal_types.hh.

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

◆ pos

◆ reference_count

std::atomic<uint32_t> blender::FontBLF::reference_count

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

Definition at line 352 of file blf_internal_types.hh.

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

◆ shadow

FontShadowType blender::FontBLF::shadow

Shadow type.

Definition at line 364 of file blf_internal_types.hh.

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

◆ shadow_color

unsigned char blender::FontBLF::shadow_color[4]

Shadow color.

Definition at line 371 of file blf_internal_types.hh.

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

◆ shadow_x

int blender::FontBLF::shadow_x

◆ shadow_y

int blender::FontBLF::shadow_y

◆ size

◆ tex_size_max

int blender::FontBLF::tex_size_max

Max texture size.

Definition at line 401 of file blf_internal_types.hh.

Referenced by blender::blf_font_fill(), and blender::blf_glyph_draw().

◆ unicode_ranges

uint blender::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 349 of file blf_internal_types.hh.

Referenced by blender::blf_font_has_coverage_bit(), and blender::blf_font_new_impl().

◆ variations

FT_MM_Var* blender::FontBLF::variations

◆ wrap_mode

◆ wrap_width

int blender::FontBLF::wrap_width

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