|
boolean | setFont (String pFontFilename) |
|
boolean | setFont (String pFontFilename, long pDPIResolution) |
|
boolean | setFontDpi (long pDPIResolution) |
|
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
boolean VgFontManager.setFont |
( |
String |
pFontFilename | ) |
|
Sets a new font.
- 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.
- 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.
boolean VgFontManager.setFont |
( |
String |
pFontFilename, |
|
|
long |
pDPIResolution |
|
) |
| |
Sets a new font.
- 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.
- 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.
boolean VgFontManager.setFontDpi |
( |
long |
pDPIResolution | ) |
|
Sets the resolution of the font.
- Note
- This is effective only between VgEngine::VgIDatabase::loadConfiguration and the rendering of the first frame. It will have no effect if called outside.
- Parameters
-
pDPIResolution | Device resolution in dot-per-inch. By default, the resolution is 96dpi. |
- Returns
- True if the resolution has been updated. It returns False and sets the error code to eInvalidOperation if no font is set.
The documentation for this class was generated from the following file: