Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

Font handling

MGUI library provides ten preallocated (static) fonts in any platform which are referenced in the source code via macros. More...

Functions

MTFont MLoadFont (const char *family, int h, int bold, int italic)
 Loads a font by desired family, height with specified bold and Italic features and returns the new font id.

void MUnloadFont (MTFont font)
 Removes a no longer used font.

const char * MGetFirstFontFamily (void)
 Returns the first font family availbale in the system.

const char * MGetNextFontFamily (void)
 Returns next font family.


Detailed Description

MGUI library provides ten preallocated (static) fonts in any platform which are referenced in the source code via macros.

There are four fixed picth fonts:

The others are proportional Times ed Helvetica (arial): It's possible to load additional fonts via the MLoadFont() function call, specifying the font family, font size, bold and italic options. The font family is a case unsensitive string which specifies the font name. Since release 3.2 you can query MGUI to enumerate available font families (including ALL DOS versions) and load the desired font at run time. The font size specifies the desired font height. The returned font can have an actual height smaller than the requested one if the system doesn't support scaleable fonts or the font itself is fixed size. An application can load up to 22 new fonts. Note that, since any font loading request allocates an entry even if the the requested font has already been loaded before, it's highly recommended to unload unused font via the MUnloadFont() function call. If the MLoadFont() request cannot be satisfied, the function returns the predefined value DEFAULT_FONT as an error. This also offers the application the opportunity to continue without testing the returned font identifier since it's always valid.

Function Documentation

const char* MGetFirstFontFamily void   
 

Returns the first font family availbale in the system.

const char* MGetNextFontFamily void   
 

Returns next font family.

MTFont MLoadFont const char *    family,
int    h,
int    bold,
int    italic
 

Loads a font by desired family, height with specified bold and Italic features and returns the new font id.

void MUnloadFont MTFont    font
 

Removes a no longer used font.


Generated on Sun Jun 29 13:03:09 2003 for MGui API by doxygen1.3-rc2