|
virtual | ~VgFontManager () |
|
virtual bool | setFont (const std::string &pFontFilename)=0 |
|
virtual bool | setFont (const std::string &pFontFilename, unsigned int pDPIResolution)=0 |
|
virtual bool | setFontDpi (unsigned int pDPIResolution)=0 |
|
Set the Font and configures it to render text.
- Note
- The font manager can set font between VgEngine::VgIDatabase::loadConfiguration and VgEngine::VgIDatabase::unloadConfiguration. However, once a font is set, it will be valid until the font manager is deleted (i.e. when the VgApplication::VgIApplication is deleted).
- Version
- 2.0.8387
-
2.1.0 updated to be a true interface
VgEngine::VgFontManager::VgFontManager |
( |
| ) |
|
|
inlineprotected |
virtual VgEngine::VgFontManager::~VgFontManager |
( |
| ) |
|
|
inlinevirtual |
virtual bool VgEngine::VgFontManager::setFont |
( |
const std::string & |
pFontFilename | ) |
|
|
pure virtual |
Sets a new font.
- Parameters
-
pFontFilename | Font file to load. The font will be searched locally in the Data bundle's "config" directory otherwise use an absolute path. |
- Returns
- True if the font has been set. False if the font is not found/incorrect.
- Note
- This is effective only between VgEngine::VgIDatabase::loadConfiguration and the rendering of the first frame. It will have no effect if called outside.
-
By default, the resolution will be set to 96 dpi. To change the resolution, you may you use either setFont (const std::string& pFontFilename, unsigned int pDPIResolution) or setFontDpi.
-
If the specified font fails to load, the previous one is still set.
Referenced by ~VgFontManager().
virtual bool VgEngine::VgFontManager::setFont |
( |
const std::string & |
pFontFilename, |
|
|
unsigned int |
pDPIResolution |
|
) |
| |
|
pure virtual |
Sets a new font.
- Parameters
-
pFontFilename | Font file to load. The font will be searched locally in the Data bundle's "config" directory. The path is expected to be absolute. |
pDPIResolution | Device resolution in dot-per-inch. By default, the resolution is 96dpi. |
- Returns
- True if the font has been registered. False if the font is not found/incorrect.
- Note
- This is effective only between VgEngine::VgIDatabase::loadConfiguration and the rendering of the first frame. It will have no effect if called outside.
-
If the specified font fails to load, the previous one is still set.
virtual bool VgEngine::VgFontManager::setFontDpi |
( |
unsigned int |
pDPIResolution | ) |
|
|
pure virtual |
Sets the resolution of the font.
- Parameters
-
pDPIResolution | Device resolution in dot-per-inch. By default, the resolution is 96dpi. |
- Note
- This is effective only between VgEngine::VgIDatabase::loadConfiguration and the rendering of the first frame. It will have no effect if called outside.
- Returns
- True if the resolution has been updated. It returns False and sets the error code to eInvalidOperation if no font is set.
Referenced by ~VgFontManager().
The documentation for this class was generated from the following file: