Cafu Engine
FontGeneratorT Class Reference

Classes

struct  FontDataT
 

Public Member Functions

bool GenerateFont (const wxString &FontFile, bool DebugPNGs=false)
 Generates a Cafu font from a .ttf font file. More...
 
void SaveFont (const wxString &Directory, const wxString &MaterialBaseName="") const
 Saves all files related to this font into a directory. More...
 
unsigned long GetNrOfSizes () const
 Gets the number of sizes created for this font. More...
 
ArrayT< BitmapT * > GetBitmaps (unsigned long SizeNr) const
 Gets an array of font bitmaps for the passed font size. More...
 

Member Function Documentation

bool FontGeneratorT::GenerateFont ( const wxString &  FontFile,
bool  DebugPNGs = false 
)

Generates a Cafu font from a .ttf font file.

Parameters
FontFileThe ttf file to create the Cafu font from.
DebugPNGsAdd debug information to the created texture images?
Returns
Whether the font has been successfully generated.
ArrayT< BitmapT * > FontGeneratorT::GetBitmaps ( unsigned long  SizeNr) const

Gets an array of font bitmaps for the passed font size.

Parameters
SizeNrThe size number for which the bitmaps should be returned (if this size number is not existant an empty array is returned).
Returns
Array of all font bitmaps for this font size.
unsigned long FontGeneratorT::GetNrOfSizes ( ) const

Gets the number of sizes created for this font.

Returns
Number of font sizes.
void FontGeneratorT::SaveFont ( const wxString &  Directory,
const wxString &  MaterialBaseName = "" 
) const

Saves all files related to this font into a directory.

Parameters
DirectoryThe directory into which the font files are saved.
MaterialBaseNameThe name of the material to be created for this font. Empty string means that no material is created.

The documentation for this class was generated from the following files: