7#include "../macros.hpp"
9hi_export_module(hikogui.font.font_metrics);
11namespace hi::inline
v1 {
19hi_export
struct font_metrics {
60 ~font_metrics() =
default;
61 constexpr font_metrics() noexcept = default;
62 constexpr font_metrics(font_metrics const&) noexcept = default;
63 constexpr font_metrics(font_metrics&&) noexcept = default;
64 constexpr font_metrics& operator=(font_metrics const&) noexcept = default;
65 constexpr font_metrics& operator=(font_metrics&&) noexcept = default;
66 [[nodiscard]] constexpr friend
bool operator==(font_metrics const&, font_metrics const&) noexcept = default;
70 [[nodiscard]] constexpr friend font_metrics operator*(
float const& lhs, font_metrics const& rhs) noexcept
DOXYGEN BUG.
Definition algorithm.hpp:16
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 paragraph_spacing
The multiplier for the space between two paragraphs.
Definition font_metrics.hpp:58
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
float line_spacing
The multiplier for the space between lines of the same paragraph.
Definition font_metrics.hpp:53