Public Member Functions

VgEngine::VgFontManager Class Reference

Set the Font and configures it to render text. More...

Collaboration diagram for VgEngine::VgFontManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 VgFontManager (VgInternalFontManager *pVgInternalFontManager, VgIEngine *pEngine)
 Constructor.
virtual ~VgFontManager ()
virtual bool setFont (const std::string &pFontFilename)
 Sets a new font.
virtual bool setFont (const std::string &pFontFilename, unsigned int pDPIResolution)
 Sets a new font.
virtual bool setFontDpi (unsigned int pDPIResolution)
 Sets the resolution of the font.

Detailed Description

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

Constructor & Destructor Documentation

VgEngine::VgFontManager::VgFontManager ( VgInternalFontManager *  pVgInternalFontManager,
VgIEngine pEngine 
)

Constructor.

Used internally.

To get an instance of the fontManager manager, call VgEngine::VgIEngine::editFontManager ().

virtual VgEngine::VgFontManager::~VgFontManager (  ) [virtual]

Member Function Documentation

virtual bool VgEngine::VgFontManager::setFont ( const std::string &  pFontFilename ) [virtual]

Sets a new font.

Parameters:
pFontFilenameFont file to load. The font will be searched locally in the Data bundle's "config" directory. The path is expected to be absolute.
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 unloadConfiguration. 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.
virtual bool VgEngine::VgFontManager::setFont ( const std::string &  pFontFilename,
unsigned int  pDPIResolution 
) [virtual]

Sets a new font.

Parameters:
pFontFilenameFont file to load. The font will be searched locally in the Data bundle's "config" directory. The path is expected to be absolute.
pDPIResolutionDevice 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 unloadConfiguration. 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 ) [virtual]

Sets the resolution of the font.

Parameters:
pDPIResolutionDevice 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:
VisioDevKit 2.0, Visioglobe® 2013