#include <fontserv.h>
Inheritance diagram for iFont:
Public Methods | |
virtual void | SetSize (int iSize)=0 |
Set the size for this font. More... | |
virtual int | GetSize ()=0 |
Query current font size. More... | |
virtual void | GetMaxSize (int &oW, int &oH)=0 |
Return the maximum width and height of a single glyph. More... | |
virtual bool | GetGlyphSize (uint8 c, int &oW, int &oH)=0 |
Return character size in pixels. More... | |
virtual uint8* | GetGlyphBitmap (uint8 c, int &oW, int &oH)=0 |
Return a pointer to a bitmap containing a rendered character. More... | |
virtual void | GetDimensions (const char *text, int &oW, int &oH)=0 |
Return the width and height of text written with this font. | |
virtual int | GetLength (const char *text, int maxwidth)=0 |
Determine how much characters from this string can be written without exceeding given width (in pixels). | |
virtual void | AddDeleteCallback (iFontDeleteNotify *func)=0 |
Add a font delete notification callback routine. More... | |
virtual bool | RemoveDeleteCallback (iFontDeleteNotify *func)=0 |
Remove a font delete notification callback. |
Objects of this class are used by canvas driver to paint glyphs.
|
Add a font delete notification callback routine. This routine will be called from font destructor, with the font instance being passed as argument. Another parameter is provided to supply additional data. |
|
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. |
|
Return character size in pixels. Returns false if values could not be determined. |
|
Return the maximum width and height of a single glyph. Return -1 if it could not be determined. |
|
Query current font size. If server does not support rescalable fonts, this method returns 0. |
|
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. |