◆ attributed_glyph()
Constructed an attributed glyph from an attributed grapheme.
When converting a string of graphemes into a string of glyphs you should process the graphemes in reverse order so that you can pass the next_attr_glyph to this constructor for font-based-kerning.
The string of graphemes should already be in display-order; after Unicode-bidi-algorithm.
- Parameters
-
| attr_grapheme | The grapheme to turn into a glyph. |
| next_attr_glyph | The next glyph in display-ordering, used for kerning. |
◆ boundingBox()
| aarect tt::attributed_glyph::boundingBox |
( |
float | border | ) |
const |
|
inlinenoexcept |
Get the bounding box for this glyph.
Get the scaled and positioned bounding box.
- Parameters
-
| border | The 1EM scaled border around the glyph bounding box. |
◆ containsLogicalIndex()
| bool tt::attributed_glyph::containsLogicalIndex |
( |
ssize_t | index | ) |
const |
|
inlinenoexcept |
Check if this glyph contains the grapheme at index.
◆ relativeIndexAtCoordinate()
| ssize_t tt::attributed_glyph::relativeIndexAtCoordinate |
( |
f32x4 | coordinate | ) |
const |
|
inlinenoexcept |
Find the logical index closest to the coordinate.
For a non-ligature, left of the halfway-point returnes the current logicalIndex, right of the halfway-point return the next logicalIndex.
◆ selectionWordClusterID()
| int tt::attributed_glyph::selectionWordClusterID |
( |
| ) |
const |
|
inlinenoexcept |
return a cluster id for word selection.
This makes clusters of:
- paragraph separator.
- identifiers (letter and digits),
- visibiles (other marks and symbols)
- whitespace
◆ graphemeCount
| int8_t tt::attributed_glyph::graphemeCount |
Number of graphemes merged (ligature) into this attributed-glyph.
◆ logicalIndex
| ssize_t tt::attributed_glyph::logicalIndex |
The logical index of the grapheme before bidi-algorithm.
◆ metrics
Metrics taken from the font file, pre-scaled to the font-size.
◆ position
| f32x4 tt::attributed_glyph::position |
◆ style
Copied from the original attributed-grapheme.
The documentation for this struct was generated from the following file: