Sparkle 0.0.1
Loading...
Searching...
No Matches
spk::Font::Bitmap::Glyph Struct Reference

Glyph quad data and layout metrics. More...

#include <spk_font.hpp>

Collaboration diagram for spk::Font::Bitmap::Glyph:
Collaboration graph

Public Member Functions

void applyRatioOnUV (const spk::Vector2 &p_scaleRatio)
 Applies a scaling ratio to glyph UVs.

Public Attributes

std::array< spk::Vector2Int, 4 > positions
 Quad positions for the glyph.
std::array< spk::Vector2, 4 > uvs
 Quad UV coordinates for the glyph.
spk::Vector2Int step
 Glyph advance step.
spk::Vector2Int baselineOffset
 Baseline offset for glyph placement.
spk::Vector2UInt size
 Glyph dimensions in pixels.
wchar_t codepoint = 0
 Unicode codepoint for this glyph.

Static Public Attributes

static std::array< unsigned int, 6 > indexesOrder = {0, 1, 2, 2, 1, 3}
 Index order used to render the glyph quad.

Detailed Description

Glyph quad data and layout metrics.

Member Function Documentation

◆ applyRatioOnUV()

void spk::Font::Bitmap::Glyph::applyRatioOnUV ( const spk::Vector2 & p_scaleRatio)
inline

Applies a scaling ratio to glyph UVs.

Parameters
p_scaleRatioUV scaling ratio.

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