|
HikoGUI
A low latency retained GUI
|
#include <ttauri/text/glyph_metrics.hpp>
Public Member Functions | |
| glyph_metrics (glyph_metrics const &) noexcept=default | |
| glyph_metrics (glyph_metrics &&) noexcept=default | |
| glyph_metrics & | operator= (glyph_metrics const &) noexcept=default |
| glyph_metrics & | operator= (glyph_metrics &&) noexcept=default |
| vector2 | advanceForgrapheme (int index) const noexcept |
| glyph_metrics & | scale (float rhs) noexcept |
Data Fields | |
| aarectangle | 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 |
| vector2 | 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.
| vector2 tt::glyph_metrics::advance = {0.0f, 0.0f} |
The distance to the next character.
| float tt::glyph_metrics::ascender = 0.0f |
Distance from baseline of highest ascender.
| aarectangle tt::glyph_metrics::boundingBox = {} |
Bounding box of the path.
| float tt::glyph_metrics::capHeight = 0.0f |
Height of capital letter, or height of the letter 'H'.
| float tt::glyph_metrics::descender = 0.0f |
Distance from baseline of lowest descender.
| float tt::glyph_metrics::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::glyph_metrics::lineGap = 0.0f |
Distance between lines.
| int tt::glyph_metrics::numberOfgraphemes = 1 |
The number of graphemes this glyph represents. This may be larger than one when the glyph is a ligature.
| float tt::glyph_metrics::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::glyph_metrics::xHeight = 0.0f |
Height of the small letter 'x'.