Blender V5.0
VFontData_Metrics Struct Reference

#include <BKE_vfontdata.hh>

Public Attributes

float scale
float em_ratio
float ascend_ratio

Detailed Description

Font metric values explained:

Baseline: Line where the text "rests", used as the origin vertical position for the glyphs. Em height: Space most glyphs should fit within. Ascent: the recommended distance above the baseline to fit most characters. Descent: the recommended distance below the baseline to fit most characters.

We obtain ascent and descent from the font itself (FT_Face->ascender / face->height). And in some cases it is even the same value as FT_Face->bbox.yMax / yMin. (font top and bottom respectively).

The em_ratio here is relative to FT_Face->bbox.

Definition at line 33 of file BKE_vfontdata.hh.

Member Data Documentation

◆ ascend_ratio

float VFontData_Metrics::ascend_ratio

◆ em_ratio

◆ scale


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