Inheritance diagram for CEGUI::PixmapFont:
Public Member Functions | ||||||||||
virtual void | load () | |||||||||
Complete font loading. If you create the font from an XML file, this method is invoked automatically after reading all the required data from the XMLAttributes object. If you create the font manually, it is your responsability to call this function as soon as you set up all the appropiate fields of the Font object. | ||||||||||
Protected Member Functions | ||||||||||
PixmapFont (const String &name, const String &fontname, const String &resourceGroup="") | ||||||||||
Constructs a new semi-complete Font object. It is the responsability of the user to define the glyph mapping (via the Mapping property), and finally call the load() method which will make font available for use (this is not *required* for PixmapFont, though). | ||||||||||
PixmapFont (const XMLAttributes &attributes) | ||||||||||
Constructs a new semi-complete Font object. It is the responsability of the user to set up all remaining font parameters after constructing the Font object, and finally calling the load() method which will make font available for use. All font parameters that are not initialized are set to sensible default values.
| ||||||||||
virtual | ~PixmapFont () | |||||||||
Destroys a Font object. | ||||||||||
virtual void | updateFont () | |||||||||
Update the font as required according to the current parameters. | ||||||||||
virtual void | writeXMLToStream_impl (XMLSerializer &xml_stream) const | |||||||||
Same as writeXMLToStream() but called from inside writeXMLToStream() so that derived classes may add their own attributes to stream.
| ||||||||||
virtual void | defineMapping (const XMLAttributes &attributes) | |||||||||
Define a glyph mapping (handle a <Mapping> XML element). | ||||||||||
void | defineMapping (String image_name, utf32 codepoint, float horzAdvance) | |||||||||
Define a single glyph mapping. | ||||||||||
void | addPixmapFontProperties () | |||||||||
Register all properties of this class. | ||||||||||
void | reinit () | |||||||||
Initialize the imageset. | ||||||||||
Protected Attributes | ||||||||||
Imageset * | d_glyphImages | |||||||||
The imageset with the glyphs. | ||||||||||
float | d_origHorzScaling | |||||||||
Current X scaling for glyph images. | ||||||||||
bool | d_imagesetOwner | |||||||||
true if we're the owners of the imageset | ||||||||||
Friends | ||||||||||
class | FontManager | |||||||||
class | FontProperties::PixmapImageset | |||||||||
class | FontProperties::PixmapMapping |
To create such a font you must create a Imageset with all the glyphs, and then define individual glyphs via the Mapping object property (or via the Mapping XML element).
CEGUI::PixmapFont::PixmapFont | ( | const String & | name, | |
const String & | fontname, | |||
const String & | resourceGroup = "" | |||
) | [protected] |
Constructs a new semi-complete Font object. It is the responsability of the user to define the glyph mapping (via the Mapping property), and finally call the load() method which will make font available for use (this is not *required* for PixmapFont, though).
All font parameters that are not initialized are set to sensible default values.
name | The unique name that will be used to identify this Font. | |
fontname | The filename of the font file, which contains the font data. This can be a TrueType, PostScript, bitmap font etc file. If resourceGroup is set to the special value of "*", fontname is interpreted as a imageset name and the respective Imageset object must be already loaded. | |
resourceGroup | Resource group identifier to be passed to the resource provider to load the font definition file. |
UnknownObjectException | Thrown if no Imageset named filename is present in within the system (when resourceGroup == "*"). |