![]() |
VR-Forces 5.0.3 Developer's Guide
|
A class with encapsulated a font loaded from disk with a given size.
Public Types | |
| enum | TextAlignement { AlignLeft, AlignCenter, AlignRight, AlignJustify } |
Protected Member Functions | |
| DtFont (DtFontManager &fm, const std::string &fontFilePath) | |
Protected Attributes | |
| FontPrivate * | myImpl |
Friends | |
| class | DtFontManager |
| makVrv::DtFont::~DtFont | ( | ) |
DTOR.
|
protected |
CTOR create and load a font.
| const std::string& makVrv::DtFont::fontName | ( | ) | const |
Get the name.
Attach auxilliary file to font e.g font metrics.
Set the FreeType characte encoding map.
| const DtFreeTypeFace& makVrv::DtFont::freeTypeFace | ( | ) | const |
| float makVrv::DtFont::globalAscender | ( | ) | const |
| float makVrv::DtFont::globalDescender | ( | ) | const |
| float makVrv::DtFont::lineHeight | ( | ) | const |
| DtBoundingBox makVrv::DtFont::calculateBoundingBox | ( | const DtPen & | pen, |
| const DtUnicode & | string, | ||
| unsigned int | pos = 0, |
||
| int | len = -1 |
||
| ) |
Calculate the bounding box for a string.
| Dt2dPoint makVrv::DtFont::calculateGlyphSize | ( | const DtPen & | pen, |
| const DtUnicode & | string, | ||
| unsigned int | pos = 0, |
||
| int | len = -1 |
||
| ) |
Calculate the bounding box for a string.
| float makVrv::DtFont::calculateAdvance | ( | const DtPen & | pen, |
| const DtUnicode & | string, | ||
| unsigned int | pos = 0, |
||
| int | len = -1 |
||
| ) |
| void makVrv::DtFont::releaseResources | ( | ) |
| bool makVrv::DtFont::isValid | ( | ) | const |
Returns true if this font is valid (has a character map)
| bool makVrv::DtFont::checkError | ( | ) | const |
Asks the private implementation to see if there is an error with the font.
| DtGlyph* makVrv::DtFont::findOrLoadGlyphForRendering | ( | DtGlyphRenderer & | renderer, |
| const unsigned int | characterCode, | ||
| bool | characterCodeIsIndex = false |
||
| ) |
Returns the glyph to render given the character code. If characterCodeIsIndex is true then the character code given is an index into the font, not the character code itself.
Load the glyph, or return null if the glyph is not loaded.
Returns the absolute index of the font in the font set given the font character. Internally used to map character font to its index.
|
friend |
|
protected |
Internal FTGL FTFont implementation object. For private use only.