Initialize the OKF Font Engine.
int OkfInitialize( GPDRAWSURFACE *pSurfaces, int *pCurSurface );
Routine | Required Header |
OkfInitialize | "okf.h", <gpgraphic.h> |
Libraries
OKLIB.A | Oankali's GP32 run-time library |
Return Value
In case of success OkfInitialize returns 0, otherwise it returns -1. Look at okf.lastError for details on what happened.
Parameters
pSurfaces
A pointer to an array of GP32 surfaces.
pCurSurface
A pointer to the integer variable that holds the current surface (usually the back screen if there is more than one surface).
Remarks
The OkfInitialize
function initializes the OKF Font Engine setting all members of okf to
their default, and creating an empty font list pointed by okf.pFonts. It also
creates a default alpha blending look up table of 32 levels of precision (32KB).
If there
is not enough memory, an error occurs.
Pointers of the screen surface structures and of the current surface are used by all printing functions.
If the OKF Font Engine is already initialized, the font list is not created, but all members of okf are set to their defaults and screen pointers are updated. Alpha LUT members are left as is.
If you need to set the font engine to its default state, call OkfSetToDefaults instead of OkfInitialize. If you need to update screen pointers, update okf.pSurfaces and okf.pCurSurface members instead of calling OkfInitialize.
If you want to change the precision of the alpha LUT to save memory usage, use OkfInitializeAlphaLUT.
Example
|
See Also
OKF Font Engine Routines, OKF Font Engine Constants, OkfInitializeAlphaLUT, OkfSetToDefaults, OkfTerminate