7namespace hi::inline v1 {
18 float ascender = 0.0f;
24 float descender = 0.0f;
30 float line_gap = 0.0f;
34 float cap_height = 0.0f;
38 float x_height = 0.0f;
44 float digit_advance = 0.0f;
The metrics of a font.
Definition font_metrics.hpp:15
float descender
Distance from baseline of lowest descender.
Definition font_metrics.hpp:24
constexpr friend font_metrics operator*(float const &lhs, font_metrics const &rhs) noexcept
Scale the metrics by a scalar value.
Definition font_metrics.hpp:48
float line_gap
Distance between lines.
Definition font_metrics.hpp:30
float ascender
Distance from baseline of highest ascender.
Definition font_metrics.hpp:18
float round_scale(float size) const noexcept
Round a scale so that the scaled x-height is an integral.
Definition font_metrics.hpp:74
float x_height
Height of lower case characters without ascenders or descenders, or the small letter 'x'.
Definition font_metrics.hpp:38
float cap_height
Height of capital letter, or height of the letter 'H'.
Definition font_metrics.hpp:34
float digit_advance
The advance for digits, specifically the digit '8'.
Definition font_metrics.hpp:44