7#include "../macros.hpp"
11hi_export_module(hikogui.font.font_metrics);
13hi_export
namespace hi::inline
v1 {
21hi_export
struct font_metrics {
62 ~font_metrics() =
default;
63 constexpr font_metrics() noexcept = default;
64 constexpr font_metrics(font_metrics const&) noexcept = default;
65 constexpr font_metrics(font_metrics&&) noexcept = default;
66 constexpr font_metrics& operator=(font_metrics const&) noexcept = default;
67 constexpr font_metrics& operator=(font_metrics&&) noexcept = default;
68 [[nodiscard]] constexpr friend
bool operator==(font_metrics const&, font_metrics const&) noexcept = default;
72 [[nodiscard]] constexpr friend font_metrics operator*(
float const& lhs, font_metrics const& rhs) noexcept
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
The metrics of a font.
Definition font_metrics.hpp:21
float descender
Distance from baseline of lowest descender.
Definition font_metrics.hpp:30
float line_gap
Distance between lines.
Definition font_metrics.hpp:36
float ascender
Distance from baseline of highest ascender.
Definition font_metrics.hpp:24
float round_scale(float size) const noexcept
Round a scale so that the scaled x-height is an integral.
Definition font_metrics.hpp:98
float x_height
Height of lower case characters without ascenders or descenders, or the small letter 'x'.
Definition font_metrics.hpp:44
float paragraph_spacing
The multiplier for the space between two paragraphs.
Definition font_metrics.hpp:60
float cap_height
Height of capital letter, or height of the letter 'H'.
Definition font_metrics.hpp:40
float digit_advance
The advance for digits, specifically the digit '8'.
Definition font_metrics.hpp:50
float line_spacing
The multiplier for the space between lines of the same paragraph.
Definition font_metrics.hpp:55