7#include "../macros.hpp"
9hi_export_module(hikogui.font.font_metrics);
22 float ascender = 0.0f;
28 float descender = 0.0f;
34 float line_gap = 0.0f;
38 float cap_height = 0.0f;
42 float x_height = 0.0f;
48 float digit_advance = 0.0f;
53 float line_spacing = 1.0f;
58 float paragraph_spacing = 1.5f;
DOXYGEN BUG.
Definition algorithm.hpp:16
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
The metrics of a font.
Definition font_metrics.hpp:19
float descender
Distance from baseline of lowest descender.
Definition font_metrics.hpp:28
float line_gap
Distance between lines.
Definition font_metrics.hpp:34
float ascender
Distance from baseline of highest ascender.
Definition font_metrics.hpp:22
float round_scale(float size) const noexcept
Round a scale so that the scaled x-height is an integral.
Definition font_metrics.hpp:96
float x_height
Height of lower case characters without ascenders or descenders, or the small letter 'x'.
Definition font_metrics.hpp:42
float cap_height
Height of capital letter, or height of the letter 'H'.
Definition font_metrics.hpp:38
float digit_advance
The advance for digits, specifically the digit '8'.
Definition font_metrics.hpp:48