Gamedev Framework (gf)
0.3.0
A C++11 framework for 2D games
|
A glyph. More...
#include <gf/Font.h>
Public Attributes | |
RectF | bounds |
Bouding rectangle of the glyph, in coordinates relative to the baseline. More... | |
RectF | textureRect |
Texture coordinates of the glyph inside the font's texture. More... | |
float | advance = 0.0f |
Offset to move horizontally to the next character. More... | |
A glyph.
A glyph is the visual representation of a character.
Glyphs are loaded from fonts and put in a texture. In order to draw a glyph, you need to known the bounding rectangle of the glyph and the texture coordinates where the glyph is. Then, you can compute the position of the next glyph with the advance
field.
Generally, you do not have to manipulate glyphs directly. gf::Text can display text and make all the necessary computations for you.
float gf::Glyph::advance = 0.0f |
Offset to move horizontally to the next character.
RectF gf::Glyph::bounds |
Bouding rectangle of the glyph, in coordinates relative to the baseline.