#include <MFont.h>
Public Types | |
typedef unsigned int | TUnicodeChar |
Unicode character definition. | |
typedef TUnicodeChar * | TUnicodeString |
Unicode string definition. | |
enum | EFontParameters { KHeight, KMaxAdvanceWidth, KAscender, KDescender } |
Font parameters. | |
enum | EFixedFontType { KFixedFont6 = 1, KFixedFont12 = 2, KFixedFont24 = 3, KFixedFont48 = 4, KFixedFont96 = 5 } |
Describes different internal font widths. | |
Public Member Functions | |
virtual unsigned int | GetCharHeight (TUnicodeChar aChar)=0 |
Returns the width of given symbol in pixels. | |
virtual unsigned int | GetStringHeight (const char *aString)=0 |
Returns the width of given string in pixels. | |
virtual unsigned int | GetStringHeight (const TUnicodeString aString)=0 |
Unicode version of GetStringHeight. | |
virtual unsigned int | GetCharWidth (TUnicodeChar aChar)=0 |
Returns the height of given symbol in pixels. | |
virtual unsigned int | GetStringWidth (const char *aString)=0 |
Returns the height of given string in pixels. | |
virtual unsigned int | GetStringWidth (const TUnicodeString aString)=0 |
Unicode version of GetStringWidth. | |
virtual bool | Render (MFrameBuffer &aFrameBuffer, TUnicodeChar aChar, unsigned int aX, unsigned int aY, CDesktop::TColor aColor)=0 |
Renders given character on given MFrameBuffer. | |
virtual bool | Render (MFrameBuffer &aFrameBuffer, const char *aString, unsigned int aX, unsigned int aY, CDesktop::TColor aColor)=0 |
Renders given string on given MFrameBuffer. | |
virtual bool | Render (MFrameBuffer &aFrameBuffer, const TUnicodeString aString, unsigned int aX, unsigned int aY, CDesktop::TColor aColor)=0 |
Unicode version of Render. | |
virtual int | GetFontParameter (EFontParameters aParameter)=0 |
Returns various fond parameters in pixels. | |
Static Public Member Functions | |
MFont & | GetFixedWidthFont (EFixedFontType aFontType) |
Returns the reference of MFont that represents an internal fixed width font. | |
MFont * | CreateTrueTypeFont (const char *aFontName, unsigned int aFontSize) |
Returns the pointer to MFont that represents the True Type font that. | |
unsigned int | UStrLen (const TUnicodeString aString) |
Calculates the length of an Unicode string. |
While rendering, the background is always left intact.
This interface contains static methods for obtaining the
references for default fixed character width fonts and
external True Type fonts. FreeType (www.freetype.org) library is used
for managing True Type fonts. Currently TrueType rendering uses kerning but
it does not use anti-aliasing
|
Returns the pointer to MFont that represents the True Type font that. is stored in the given file. Returned pointer should be deleted by the application explicitly when it is not longer needed
pixels
|
|
Returns the width of given string in pixels. Note that the total string width sometimes is not just the sum of all widths of all characters in this string. It could differ for True Type fonts when kerning is used |