|
HikoGUI
A low latency retained GUI
|
#include <TTauri/Text/GlyphMetrics.hpp>
Public Member Functions | |
| GlyphMetrics (GlyphMetrics const &) noexcept=default | |
| GlyphMetrics (GlyphMetrics &&) noexcept=default | |
| GlyphMetrics & | operator= (GlyphMetrics const &) noexcept=default |
| GlyphMetrics & | operator= (GlyphMetrics &&) noexcept=default |
| vec | advanceForGrapheme (int index) const noexcept |
| GlyphMetrics & | scale (float rhs) noexcept |
Data Fields | |
| aarect | boundingBox = {} |
| float | leftSideBearing = 0.0f |
| float | rightSideBearing = 0.0f |
| float | ascender = 0.0f |
| float | descender = 0.0f |
| float | lineGap = 0.0f |
| float | capHeight = 0.0f |
| float | xHeight = 0.0f |
| vec | advance = {0.0f, 0.0f} |
| int | numberOfGraphemes = 1 |
Metrics of a glyph. This information is used to position glyphs next to each other and determinate the size of a shaped text.
|
inlinenoexcept |
Get the advanceWidth for the specific grapheme of a potential ligature.
| vec tt::GlyphMetrics::advance = {0.0f, 0.0f} |
The distance to the next character.
| float tt::GlyphMetrics::ascender = 0.0f |
Distance from baseline of highest ascender.
| aarect tt::GlyphMetrics::boundingBox = {} |
Bounding box of the path.
| float tt::GlyphMetrics::capHeight = 0.0f |
Height of capital letter, or height of the letter 'H'.
| float tt::GlyphMetrics::descender = 0.0f |
Distance from baseline of lowest descender.
| float tt::GlyphMetrics::leftSideBearing = 0.0f |
This is the position where the left side of the glyph starts. This includes some leading white space so that the glyph will stand a small distance of the edge.
For many glyphs the leftSideBearing is the origin.
| float tt::GlyphMetrics::lineGap = 0.0f |
Distance between lines.
| int tt::GlyphMetrics::numberOfGraphemes = 1 |
The number of graphemes this glyph represents. This may be larger than one when the glyph is a ligature.
| float tt::GlyphMetrics::rightSideBearing = 0.0f |
This is the position where the right side of the glyph ends. This includes some leading white space so that the glyph will stand a small distance of the edge.
| float tt::GlyphMetrics::xHeight = 0.0f |
Height of the small letter 'x'.