|
utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
|
The Glyph struct represents a single character's visual representation in a font atlas. More...
#include <headers/utility/graphic/text/glyph.hpp>
Public Attributes | |
| math::Vector2F | size |
| Size of the glyph in pixels (width and height). | |
| math::Vector2F | bearing |
| Bearing of the glyph, representing the offset from the baseline to the top-left corner of the glyph. | |
| float | advance |
| Advance value, specifying the horizontal distance to advance the cursor after rendering the glyph. | |
| math::Vector2F | uvMin |
| Minimum UV coordinates for the glyph in the font atlas. | |
| math::Vector2F | uvMax |
| Maximum UV coordinates for the glyph in the font atlas. | |
The Glyph struct represents a single character's visual representation in a font atlas.
It contains information about the glyph's size, bearing, advance, and texture coordinates (UVs) in the font atlas. This information is essential for rendering text using a font atlas, as it allows the renderer to correctly position and display each character based on its metrics and texture mapping. The size field represents the dimensions of the glyph in pixels, while bearing indicates the offset from the baseline to the top-left corner of the glyph. The advance field specifies the horizontal distance to advance the cursor after rendering the glyph, and uvMin and uvMax define the texture coordinates for the glyph in the font atlas.
| float utility::graphic::Glyph::advance |
| math::Vector2F utility::graphic::Glyph::bearing |
| math::Vector2F utility::graphic::Glyph::size |
| math::Vector2F utility::graphic::Glyph::uvMax |
| math::Vector2F utility::graphic::Glyph::uvMin |