Blender V4.3
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]
 
unsigned int 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
 
float size
 
FT_MM_Var * variations
 
int char_weight
 
float char_slant
 
float char_width
 
float char_spacing
 
int tex_size_max
 
int 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
 
std::mutex glyph_cache_mutex
 

Detailed Description

Definition at line 296 of file blf_internal_types.hh.

Member Data Documentation

◆ angle

float FontBLF::angle

Angle in radians.

Definition at line 323 of file blf_internal_types.hh.

◆ aspect

float FontBLF::aspect[3]

Aspect ratio or scale.

Definition at line 317 of file blf_internal_types.hh.

◆ buf_info

FontBufInfoBLF FontBLF::buf_info

Data for buffer usage (drawing into a texture buffer)

Definition at line 387 of file blf_internal_types.hh.

◆ 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 366 of file blf_internal_types.hh.

◆ char_slant

float FontBLF::char_slant

Definition at line 352 of file blf_internal_types.hh.

Referenced by blf_glyph_render().

◆ char_spacing

float FontBLF::char_spacing

Definition at line 354 of file blf_internal_types.hh.

Referenced by blf_glyph_render().

◆ char_weight

int FontBLF::char_weight

Character variations.

Definition at line 351 of file blf_internal_types.hh.

Referenced by blf_glyph_render().

◆ char_width

float FontBLF::char_width

Definition at line 353 of file blf_internal_types.hh.

Referenced by blf_glyph_render().

◆ clip_rec

rcti FontBLF::clip_rec

Clipping rectangle.

Definition at line 339 of file blf_internal_types.hh.

◆ color

unsigned char FontBLF::color[4]

Main text color.

Definition at line 336 of file blf_internal_types.hh.

◆ 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 381 of file blf_internal_types.hh.

◆ filepath

char* FontBLF::filepath

Full path to font file or NULL if from memory.

Definition at line 298 of file blf_internal_types.hh.

◆ flags

int FontBLF::flags

Font options.

Definition at line 360 of file blf_internal_types.hh.

Referenced by blf_glyph_index_from_charcode(), and blf_glyph_render().

◆ ft_lib

FT_Library FontBLF::ft_lib

Freetype2 lib handle.

Definition at line 372 of file blf_internal_types.hh.

◆ ft_size

FT_Size FontBLF::ft_size

Point to face->size or to cache's size.

Definition at line 378 of file blf_internal_types.hh.

◆ glyph_cache_mutex

std::mutex FontBLF::glyph_cache_mutex

Mutex lock for glyph cache.

Definition at line 390 of file blf_internal_types.hh.

◆ kerning_cache

KerningCacheBLF* FontBLF::kerning_cache

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

Definition at line 369 of file blf_internal_types.hh.

◆ mem

void* FontBLF::mem

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

Definition at line 301 of file blf_internal_types.hh.

◆ mem_name

char* FontBLF::mem_name

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

Definition at line 304 of file blf_internal_types.hh.

◆ mem_size

size_t FontBLF::mem_size

Definition at line 302 of file blf_internal_types.hh.

◆ metrics

FontMetrics FontBLF::metrics

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

Definition at line 384 of file blf_internal_types.hh.

Referenced by blf_glyph_render().

◆ pos

int FontBLF::pos[3]

Initial position for draw the text.

Definition at line 320 of file blf_internal_types.hh.

◆ reference_count

unsigned int FontBLF::reference_count

Number of times this font was loaded.

Definition at line 314 of file blf_internal_types.hh.

Referenced by BLF_load().

◆ shadow

FontShadowType FontBLF::shadow

Shadow type.

Definition at line 326 of file blf_internal_types.hh.

◆ shadow_color

unsigned char FontBLF::shadow_color[4]

Shadow color.

Definition at line 333 of file blf_internal_types.hh.

◆ shadow_x

int FontBLF::shadow_x

And shadow offset.

Definition at line 329 of file blf_internal_types.hh.

◆ shadow_y

int FontBLF::shadow_y

Definition at line 330 of file blf_internal_types.hh.

◆ size

float FontBLF::size

Font size.

Definition at line 345 of file blf_internal_types.hh.

Referenced by blf_glyph_render().

◆ tex_size_max

int FontBLF::tex_size_max

Max texture size.

Definition at line 357 of file blf_internal_types.hh.

◆ 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 311 of file blf_internal_types.hh.

◆ variations

FT_MM_Var* FontBLF::variations

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

Definition at line 348 of file blf_internal_types.hh.

Referenced by blf_glyph_render().

◆ wrap_width

int FontBLF::wrap_width

The width to wrap the text, see BLF_WORD_WRAP.

Definition at line 342 of file blf_internal_types.hh.


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