SubFont class reference
Inaccessable class whose objects are used in 'main' Font class. Directly represents a font with a specific size. Responsible for creating texture atlas.
Functions documentation
Private constructor. Setups a texture for specific font size. Allows to create textures with specific dimensions.
~SubFont();
Destructor - deallocates memory.
constGlyphData* GetGlyph(int ch);
Returns glyph data.
Texture* GetAtlasTexture();
Returns the texture used in the SubFont.
const int GetLineHeight() const;Returns new line height for SubFont.
std::map<int,GlyphData>::iterator AddGlyph(int ch);
Adds a glyph (from the character) to a SubFont.
Variables documentation
int m_iFontSize;Stores font size.
int m_iFontHeight;Stores font new line height.
std::map<int,GlyphData> m_GlyphsInfo;
Stores glyphs data.
Dimension<size_t> m_AtlasDim;
Stores atlas texture dimensions.
Point<int> m_TexOffsets;Describes the current cursor position on the texture to allow further glyphs to be added.