Blender V5.0
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 244 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 272 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 280 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 274 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 259 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 265 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 267 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 276 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 286 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 284 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 263 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 282 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 261 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 252 of file blf_internal_types.hh.

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

◆ spacing

float FontMetrics::spacing

This font's default spacing, 1 is normal.

Definition at line 254 of file blf_internal_types.hh.

Referenced by blf_glyph_render(), and blf_setup_face().

◆ strikeout_position

short FontMetrics::strikeout_position

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

Definition at line 293 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 295 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 297 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 299 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 301 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 303 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 305 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 307 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 289 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 291 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 257 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 246 of file blf_internal_types.hh.

Referenced by blf_font_metrics(), and blf_setup_face().

◆ weight

short FontMetrics::weight

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

Definition at line 248 of file blf_internal_types.hh.

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

◆ width

float FontMetrics::width

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

Definition at line 250 of file blf_internal_types.hh.

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

◆ x_height

short FontMetrics::x_height

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

Definition at line 278 of file blf_internal_types.hh.

Referenced by blf_font_metrics().


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