utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
utility::graphic::Glyph Struct Reference

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.
 

Detailed Description

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.

Definition at line 29 of file glyph.hpp.

Member Data Documentation

◆ advance

float utility::graphic::Glyph::advance

Advance value, specifying the horizontal distance to advance the cursor after rendering the glyph.

Definition at line 45 of file glyph.hpp.

◆ bearing

math::Vector2F utility::graphic::Glyph::bearing

Bearing of the glyph, representing the offset from the baseline to the top-left corner of the glyph.

Definition at line 39 of file glyph.hpp.

◆ size

math::Vector2F utility::graphic::Glyph::size

Size of the glyph in pixels (width and height).

Definition at line 33 of file glyph.hpp.

◆ uvMax

math::Vector2F utility::graphic::Glyph::uvMax

Maximum UV coordinates for the glyph in the font atlas.

Definition at line 55 of file glyph.hpp.

◆ uvMin

math::Vector2F utility::graphic::Glyph::uvMin

Minimum UV coordinates for the glyph in the font atlas.

Definition at line 50 of file glyph.hpp.


The documentation for this struct was generated from the following file: