Blender V4.3
FontMetrics Struct Reference

#include <blf_internal_types.hh>

Public Attributes

bool valid
 
short weight
 
float width
 
float slant
 
float spacing
 
short units_per_EM
 
short family_class
 
short selection_flags
 
int num_glyphs
 
short first_charindex
 
short last_charindex
 
short ascender
 
short descender
 
short line_height
 
short x_height
 
short cap_height
 
float o_proportion
 
short max_advance_width
 
short max_advance_height
 
short underline_position
 
short underline_thickness
 
short strikeout_position
 
short strikeout_thickness
 
short subscript_size
 
short subscript_xoffset
 
short subscript_yoffset
 
short superscript_size
 
short superscript_xoffset
 
short superscript_yoffset
 

Detailed Description

Definition at line 230 of file blf_internal_types.hh.

Member Data Documentation

◆ ascender

short FontMetrics::ascender

Positive number of font units from baseline to top of typical capitals. Can be slightly more than cap height when head serifs, terminals, or apexes extend above cap line.

Definition at line 258 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ cap_height

short FontMetrics::cap_height

Font units from baseline to top of capital letters, specifically "H".

Definition at line 266 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ descender

short FontMetrics::descender

Negative (!) number of font units from baseline to bottom of letters like gjpqy.

Definition at line 260 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ family_class

short FontMetrics::family_class

Design classification from OS/2 sFamilyClass.

Definition at line 245 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ first_charindex

short FontMetrics::first_charindex

Minimum Unicode index, typically 0x0020.

Definition at line 251 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ last_charindex

short FontMetrics::last_charindex

Maximum Unicode index, or 0xFFFF if greater than.

Definition at line 253 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ line_height

short FontMetrics::line_height

Positive number of font units between consecutive baselines.

Definition at line 262 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ max_advance_height

short FontMetrics::max_advance_height

As above but only for vertical layout fonts, otherwise is set to line_height value.

Definition at line 272 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ max_advance_width

short FontMetrics::max_advance_width

Font unit maximum horizontal advance for all glyphs in font. Can help with wrapping.

Definition at line 270 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ num_glyphs

int FontMetrics::num_glyphs

Total number of glyphs in the font.

Definition at line 249 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ o_proportion

float FontMetrics::o_proportion

Ratio width to height of lowercase "O". Reliable indication of font proportion.

Definition at line 268 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ selection_flags

short FontMetrics::selection_flags

Style classification from OS/2 fsSelection.

Definition at line 247 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ slant

float FontMetrics::slant

This font's slant in clockwise degrees, 0 being upright.

Definition at line 238 of file blf_internal_types.hh.

Referenced by blf_font_metrics(), and blf_glyph_render().

◆ spacing

float FontMetrics::spacing

This font's default spacing, 1 is normal.

Definition at line 240 of file blf_internal_types.hh.

Referenced by blf_glyph_render().

◆ strikeout_position

short FontMetrics::strikeout_position

Positive number of font units above baseline to the top (!) of strikeout stroke.

Definition at line 279 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ strikeout_thickness

short FontMetrics::strikeout_thickness

thickness of the strikeout line in font units.

Definition at line 281 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ subscript_size

short FontMetrics::subscript_size

EM size font units of recommended subscript letters.

Definition at line 283 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ subscript_xoffset

short FontMetrics::subscript_xoffset

Horizontal offset before first subscript character, typically 0.

Definition at line 285 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ subscript_yoffset

short FontMetrics::subscript_yoffset

Positive number of font units above baseline for subscript characters.

Definition at line 287 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ superscript_size

short FontMetrics::superscript_size

EM size font units of recommended superscript letters.

Definition at line 289 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ superscript_xoffset

short FontMetrics::superscript_xoffset

Horizontal offset before first superscript character, typically 0.

Definition at line 291 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ superscript_yoffset

short FontMetrics::superscript_yoffset

Positive (!) number of font units below baseline for subscript characters.

Definition at line 293 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ underline_position

short FontMetrics::underline_position

Negative (!) number of font units below baseline to center (!) of underlining stem.

Definition at line 275 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ underline_thickness

short FontMetrics::underline_thickness

thickness of the underline in font units.

Definition at line 277 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ units_per_EM

short FontMetrics::units_per_EM

Number of font units in an EM square. 2048, 1024, 1000 are typical.

Definition at line 243 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ valid

bool FontMetrics::valid

Indicate that these values have been properly loaded.

Definition at line 232 of file blf_internal_types.hh.

Referenced by blf_font_metrics().

◆ weight

short FontMetrics::weight

This font's default weight, 100-900, 400 is normal.

Definition at line 234 of file blf_internal_types.hh.

Referenced by blf_font_metrics(), and blf_glyph_render().

◆ width

float FontMetrics::width

This font's default width, 1 is normal, 2 is twice as wide.

Definition at line 236 of file blf_internal_types.hh.

Referenced by blf_font_metrics(), and blf_glyph_render().

◆ x_height

short FontMetrics::x_height

Font units from baseline to lowercase mean line, typically to top of "x".

Definition at line 264 of file blf_internal_types.hh.

Referenced by blf_font_metrics().


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