Blender V5.3
blender::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 267 of file blf_internal_types.hh.

Member Data Documentation

◆ ascender

short blender::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 296 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ cap_height

short blender::FontMetrics::cap_height

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

Definition at line 304 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ descender

short blender::FontMetrics::descender

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

Definition at line 298 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ family_class

short blender::FontMetrics::family_class

Design classification from OS/2 sFamilyClass.

Definition at line 282 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ first_charindex

short blender::FontMetrics::first_charindex

Minimum Unicode index, typically 0x0020.

Definition at line 288 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ last_charindex

short blender::FontMetrics::last_charindex

Maximum Unicode index, or 0xFFFF if greater than.

Definition at line 290 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ line_height

short blender::FontMetrics::line_height

Positive number of font units between consecutive baselines.

Definition at line 300 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ max_advance_height

short blender::FontMetrics::max_advance_height

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

Definition at line 310 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ max_advance_width

short blender::FontMetrics::max_advance_width

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

Definition at line 308 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ num_glyphs

int blender::FontMetrics::num_glyphs

Total number of glyphs in the font.

Definition at line 286 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ o_proportion

float blender::FontMetrics::o_proportion

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

Definition at line 306 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ selection_flags

short blender::FontMetrics::selection_flags

Style classification from OS/2 fsSelection.

Definition at line 284 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ slant

float blender::FontMetrics::slant

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

Definition at line 275 of file blf_internal_types.hh.

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

◆ spacing

float blender::FontMetrics::spacing

This font's default spacing, 1 is normal.

Definition at line 277 of file blf_internal_types.hh.

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

◆ strikeout_position

short blender::FontMetrics::strikeout_position

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

Definition at line 317 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ strikeout_thickness

short blender::FontMetrics::strikeout_thickness

thickness of the strikeout line in font units.

Definition at line 319 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ subscript_size

short blender::FontMetrics::subscript_size

EM size font units of recommended subscript letters.

Definition at line 321 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ subscript_xoffset

short blender::FontMetrics::subscript_xoffset

Horizontal offset before first subscript character, typically 0.

Definition at line 323 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ subscript_yoffset

short blender::FontMetrics::subscript_yoffset

Positive number of font units above baseline for subscript characters.

Definition at line 325 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ superscript_size

short blender::FontMetrics::superscript_size

EM size font units of recommended superscript letters.

Definition at line 327 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ superscript_xoffset

short blender::FontMetrics::superscript_xoffset

Horizontal offset before first superscript character, typically 0.

Definition at line 329 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ superscript_yoffset

short blender::FontMetrics::superscript_yoffset

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

Definition at line 331 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ underline_position

short blender::FontMetrics::underline_position

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

Definition at line 313 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ underline_thickness

short blender::FontMetrics::underline_thickness

thickness of the underline in font units.

Definition at line 315 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ units_per_EM

short blender::FontMetrics::units_per_EM

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

Definition at line 280 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().

◆ valid

bool blender::FontMetrics::valid

Indicate that these values have been properly loaded.

Definition at line 269 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics(), and blender::blf_setup_face().

◆ weight

short blender::FontMetrics::weight

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

Definition at line 271 of file blf_internal_types.hh.

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

◆ width

float blender::FontMetrics::width

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

Definition at line 273 of file blf_internal_types.hh.

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

◆ x_height

short blender::FontMetrics::x_height

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

Definition at line 302 of file blf_internal_types.hh.

Referenced by blender::blf_font_metrics().


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