libdonut  2.3.2
Application framework for cross-platform game development in C++20
Public Attributes | List of all members
donut::graphics::Font::GlyphMetrics Struct Reference

Dimensions of a single glyph in this font, for shaping text. More...

#include <donut/graphics/Font.hpp>

Public Attributes

vec2 size
 Size of this glyph's rectangle when rendered, in pixels. More...
 
vec2 bearing
 Offset from the baseline to apply to the glyph's rectangle position when rendering this glyph. More...
 
float advance
 Horizontal offset to apply in order to advance to the next glyph position, excluding any kerning. More...
 

Detailed Description

Dimensions of a single glyph in this font, for shaping text.

Member Data Documentation

◆ size

vec2 donut::graphics::Font::GlyphMetrics::size

Size of this glyph's rectangle when rendered, in pixels.

◆ bearing

vec2 donut::graphics::Font::GlyphMetrics::bearing

Offset from the baseline to apply to the glyph's rectangle position when rendering this glyph.

◆ advance

float donut::graphics::Font::GlyphMetrics::advance

Horizontal offset to apply in order to advance to the next glyph position, excluding any kerning.


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