HikoGUI
A low latency retained GUI
|
#include <hikogui/font/font_metrics.hpp>
Public Member Functions | |
constexpr | font_metrics (font_metrics const &) noexcept=default |
constexpr | font_metrics (font_metrics &&) noexcept=default |
constexpr font_metrics & | operator= (font_metrics const &) noexcept=default |
constexpr font_metrics & | operator= (font_metrics &&) noexcept=default |
Data Fields | |
au::Quantity< Unit, T > | ascender |
Distance from baseline of highest ascender. | |
au::Quantity< Unit, T > | descender |
Distance from baseline of lowest descender. | |
au::Quantity< Unit, T > | line_gap |
Distance between lines. | |
au::Quantity< Unit, T > | cap_height |
Height of capital letter, or height of the letter 'H'. | |
au::Quantity< Unit, T > | x_height |
Height of lower case characters without ascenders or descenders, or the small letter 'x'. | |
au::Quantity< Unit, T > | digit_advance |
The advance for digits, specifically the digit '8'. | |
float | line_spacing = 0.0f |
The multiplier for the space between lines of the same paragraph. | |
float | paragraph_spacing = 0.0f |
The multiplier for the space between two paragraphs. | |
Friends | |
constexpr friend bool | operator== (font_metrics const &, font_metrics const &) noexcept=default |
template<typename LhsUnit , typename LhsT > requires std::same_as<Unit, EmSquares> | |
constexpr friend auto | operator* (au::Quantity< LhsUnit, LhsT > const &lhs, font_metrics const &rhs) noexcept |
Scale the metrics by a scalar value. | |
constexpr friend font_metrics | max (font_metrics const &a, font_metrics const &b) noexcept |
The metrics of a font.
These are the metrics that are used for the font as a whole. Inside the font these are in 'em' units, outside the font they may have been scaled to 'points' or 'dp'.
|
friend |
Scale the metrics by a scalar value.
au::Quantity<Unit, T> v1::font_metrics< Unit, T >::ascender |
Distance from baseline of highest ascender.
au::Quantity<Unit, T> v1::font_metrics< Unit, T >::cap_height |
Height of capital letter, or height of the letter 'H'.
au::Quantity<Unit, T> v1::font_metrics< Unit, T >::descender |
Distance from baseline of lowest descender.
au::Quantity<Unit, T> v1::font_metrics< Unit, T >::digit_advance |
The advance for digits, specifically the digit '8'.
au::Quantity<Unit, T> v1::font_metrics< Unit, T >::line_gap |
Distance between lines.
The distance between the descender of a line and the ascender of the next line.
float v1::font_metrics< Unit, T >::line_spacing = 0.0f |
The multiplier for the space between lines of the same paragraph.
float v1::font_metrics< Unit, T >::paragraph_spacing = 0.0f |
The multiplier for the space between two paragraphs.
au::Quantity<Unit, T> v1::font_metrics< Unit, T >::x_height |
Height of lower case characters without ascenders or descenders, or the small letter 'x'.