Glyph Struct
Represents a single rendered glyph (character) from a font. More...
Declaration
Public Member Attributes Index
| unsigned int | textureId |
|
GPU texture ID containing the rendered glyph bitmap. More... | |
| helios::math::vec2ui | size |
|
Size of the glyph in pixels (width, height). More... | |
| helios::math::vec2i | bearing |
|
Offset from baseline to left/top of glyph (bearingX, bearingY). More... | |
| int | advance |
|
Horizontal offset to advance to the next glyph position. More... | |
Description
Represents a single rendered glyph (character) from a font.
A `Glyph` contains all the information needed to render a single character: the texture ID, size, bearing (offset from baseline), and advance width.
## Glyph Metrics
The following diagram illustrates the glyph metrics:
``` +———–+ | | | Glyph | <– size.y (height) | | +———–+ <– baseline ^ ^ | | bearing.x | advance (to next glyph) ```
- **bearing.x:** Horizontal offset from the cursor position to the left edge of the glyph.
- **bearing.y:** Vertical offset from the baseline to the top of the glyph.
- **advance:** Horizontal distance to move the cursor after rendering this glyph.
- See Also
- See Also
OpenGLGlyphTextRenderer
Definition at line 42 of file Glyph.ixx.
Public Member Attributes
advance
|
bearing
|
Offset from baseline to left/top of glyph (bearingX, bearingY).
- `bearing.x`: Horizontal offset from cursor to left edge of glyph.
- `bearing.y`: Vertical offset from baseline to top of glyph.
Definition at line 60 of file Glyph.ixx.
Referenced by helios::rendering::text::TypeSetter::layout.
size
|
Size of the glyph in pixels (width, height).
textureId
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.