This routine will be called from font destructor, with the font instance being passed as argument. Another parameter is provided to supply additional data.
void iFont::GetDimensions (
const char * text,
int & oW,
int & oH,
int & desc ) [pure virtual]
Return the width and height of text written with this font.
desc gives the maximum descender.
uint8 * iFont::GetGlyphBitmap (
uint8 c,
int & oW,
int & oH,
int & adv,
int & left,
int & top ) [pure virtual]
Return a pointer to a bitmap containing a rendered character.
Returns NULL if error occured. The oW and oH parameters are filled with bitmap width and height. adv holds the advance in x-direction, left and top hold the x- and y-bearing.
uint8 * iFont::GetGlyphBitmap (
uint8 c,
int & oW,
int & oH ) [pure virtual]
Return a pointer to a bitmap containing a rendered character.
Returns NULL if error occured. The oW and oH parameters are filled with bitmap width and height.
bool iFont::GetGlyphSize (
uint8 c,
int & oW,
int & oH,
int & adv,
int & left,
int & top ) [pure virtual]
Return character width, height, advance, x- and y-bearing in pixels.
Returns false if values could not be determined.
bool iFont::GetGlyphSize (
uint8 c,
int & oW,
int & oH ) [pure virtual]
Return character size in pixels.
Returns false if values could not be determined.
void iFont::GetMaxSize (
int & oW,
int & oH ) [pure virtual]
Return the maximum width and height of a single glyph.
Return -1 if it could not be determined.
int iFont::GetSize (
) [pure virtual]
Query current font size.
If server does not support rescalable fonts, this method returns 0.
void iFont::SetSize (
int iSize ) [pure virtual]
Set the size for this font.
All other methods will change their behaviour as soon as you call this method; but not all font managers supports rescalable fonts in which case this method will be unimplemented.
The documentation for this struct was generated from the following file: