Class used to describe a single glyph or character available for text operations. More...
#include <glyph.h>
Public Types | |
typedef KerningContainer::const_iterator | ConstKerningIterator |
typedef std::vector< KerningInfo > | KerningContainer |
typedef KerningContainer::iterator | KerningIterator |
enum | Whitespace { HT = 0x0009, LF = 0x000A, VT = 0x000B, CR = 0x000D, Space = 0x0020, NEL = 0x0085 } |
This enum represents the common whitespace characters found in Ascii/UTF-8. More... | |
Public Member Functions | |
Glyph (FontData *Data) | |
Default constructor. More... | |
Glyph (FontData *Data, TextureAtlas *TexAtlas, const UInt32 &ID, const Real &Advance, const Real &VertOffset) | |
Descriptive constructor. More... | |
~Glyph () | |
Class destructor. | |
Vector2 | GetAtlasCoords (const UI::QuadCorner Corner) const |
Gets the pixel position on the Atlas of a corner belonging to this glyph. More... | |
const String & | GetAtlasName () const |
Gets the name of the atlas this glyph belongs to. More... | |
Real | GetHeight () const |
Gets the glyphs height on the Texture. | |
Real | GetKerning (const UInt32 Previous) const |
Convenience function for getting the Kerning information for a given Glyph. More... | |
Vector2 | GetPosition () const |
Gets the position of the glyph on the Texture. | |
Vector2 | GetRelativeAtlasCoords (const UI::QuadCorner Corner) const |
Gets the relative position on the Atlas of a corner belonging to this glyph. More... | |
Vector2 | GetSize () const |
Gets the size of the glyph on the Texture. | |
Real | GetUVBottom () const |
Gets the Bottom coordinate on the Texture. | |
Real | GetUVLeft () const |
Gets the Left coordinate on the Texture. | |
Real | GetUVRight () const |
Gets the Right coordinate on the Texture. | |
Real | GetUVTop () const |
Gets the Top coordinate on the Texture. | |
Real | GetWidth () const |
Gets the glyphs width on the Texture. | |
bool | IsCarriageReturn () const |
Checks if this glyph is a carriage return. | |
bool | IsHorizontalTab () const |
Checks if this glyph is a horizontal tab. | |
bool | IsLineFeed () const |
Checks if this glyph is a line feed. | |
bool | IsNewLine () const |
Checks if this glyph marks a new line. | |
bool | IsNextLine () const |
Checks if this glyph is a next line. | |
bool | IsSpace () const |
Checks if this glyph is a space. | |
bool | IsTab () const |
Checks if this glyph marks a tab. | |
bool | IsVerticalTab () const |
Checks if this glyph is a vertical tab. | |
bool | IsWhitespace () const |
Checks if this glyph is not renderable. | |
Public Attributes | |
TextureAtlas * | Atlas |
The TextureAtlas this glyph belongs to. | |
Vector2 | AtlasCoords [4] |
The 4 corner coordinates on the Texture. | |
FontData * | Font |
The collection of glyphs this glyph belongs to. | |
Real | GlyphAdvance |
The number of pixels to advance the cursor for the next glyph. | |
UInt32 | GlyphID |
The Character this glyph information represents. | |
KerningContainer | Kernings |
List of all the Kernings that apply to this glyph. | |
Real | VerticalOffset |
The amount of pixels the glyph is to be adjusted on the Y axis. | |
Class used to describe a single glyph or character available for text operations.
|
inline |
|
inline |
Descriptive constructor.
Data | The collection of glyphs this glyph belongs to. |
TexAtlas | The TextureAtlas this glyph belongs to. |
ID | The Character this glyph information represents. |
Advance | The number of pixels to advance the cursor for the next glyph. |
VertOffset | The amount of pixels the glyph is to be adjusted on the Y axis. |
|
inline |
|
inline |
Convenience function for getting the Kerning information for a given Glyph.
Previous | The previous glyph in the sequence. |
|
inline |