What text is measured and laid out from: font, metrics and decoration lines.
More...
#include <gui_core/style/gui_style_text.h>
What text is measured and laid out from: font, metrics and decoration lines.
One per state of a Style; the colors it's drawn in are StyleState::textColor and StyleState::decorationColors, so a state that only recolors keeps the layout. Metrics are in CSS px until StyleManager::Register (or ToPixels) scales them to the UI.
◆ GetHashCode()
| uint64_t tachyon::TextStyle::GetHashCode |
( |
| ) |
const |
|
noexcept |
◆ operator==()
| bool tachyon::TextStyle::operator== |
( |
const TextStyle & | other | ) |
const |
|
inlinenoexcept |
◆ CalcLineHeight()
| float tachyon::TextStyle::CalcLineHeight |
( |
| ) |
const |
|
inline |
Line pitch in the style's units.
Normal / MetricsRelative need font metrics, so they return fontSize.
◆ fontSize
| float tachyon::TextStyle::fontSize = 0 |
CSS: font-size, in CSS px.
◆ lineHeight
| float tachyon::TextStyle::lineHeight = 1.25f |
CSS: line-height, read per lineHeightType (by default a multiple of fontSize).
A fixed pitch, so a fallback font with tall metrics can't stretch a line.
◆ letterSpacing
| float tachyon::TextStyle::letterSpacing = 0.0f |
CSS px; stored and scaled, not applied by the text system.
◆ wordSpacing
| float tachyon::TextStyle::wordSpacing = 0.0f |
CSS px; stored and scaled, not applied by the text system.
◆ family
generic family, used when fontId isn't registered
◆ weight
◆ style
◆ stretch
◆ lineHeightType
how lineHeight is interpreted
◆ fontId
overrides family when set
◆ language
Picks regional letterforms (e.g. CJK); empty = the text system's default.
◆ throughLine
◆ bottomLine
◆ underLine
under the alphabetic baseline
◆ overLine
The documentation for this class was generated from the following file: