The OKFFONT structure contains the members of a font as used by the OKF Font Engine.
typedef
struct tagOKFFONT {
OKFHEADER *pOkf;
unsigned char
embeddedFont;
unsigned char *pBitmap;
unsigned short bitmapWidth;
unsigned short bitmapHeight;
unsigned char *pMask;
unsigned short maskWidth;
unsigned short maskHeight;
unsigned char *charSet;
unsigned char *charWidths;
unsigned char *charLeftIndents;
unsigned char *charRightIndents;
OKFCHAR extInfo[OKF_LASTCHAR - OKF_FIRSTCHAR + 1];
} OKFFONT;
Members
pOkf
A pointer to the main OKF Font file header.
embeddedFont
Indicates if the font its a fully embedded font contained in the executable file, or if it has been loaded from the SMC card or cloned.
pBitmap
A pointer to the decoded font bitmap. The bitmap is rotated and sized to be used with GP32 SDK functions.
bitmapWidth
The width of the decoded bitmap. The width can be different from the real width of the font bitmap in the OKF Font file.
bitmapHeight
The height of the decoded bitmap. The height can be different from the real height of the font bitmap in the OKF Font file.
pMask
A pointer to the decoded font mask. As for the font bitmap, the mask is rotated but it is not sized because the mask is not rendered by the GP32 SDK functions.
maskWidth
The width of the font mask.
maskHeight
The height of the font mask.
charSet
A pointer to the character set of the font. Note that is an array of pOkf->nbChars elements and not a zero ended string.
charWidths
A pointer to an array of pOkf->nbChars elements containing the width of each character in the character set of the font.
charLeftIndents
A pointer to an array of pOkf->nbChars elements containing the left indent of each character in the character set of the font. Can be NULL if the font does not contain this information (see pOkf->indents flag).
charRightIndents
A pointer to an array of pOkf->nbChars elements containing the right indent of each character in the character set of the font. Can be NULL if the font does not contain this information (see pOkf->indents flag).
extInfo
An array of OKFCHAR elements that contains the extended information specific to font chars calculated during the registration of the font.
Remarks
The OKFFONT structure does not match the properties of an OKF Font file header, this structure is calculated from the real OKF Font file header when the font is registered.
The extInfo member is used by the OKF Font Engine for speed optimisation, but it can also be used to retrieve properties of a specific character. To get the OKFCHAR structure of a given character use OkfGetFontChar macro definition.
See Also
OKF Font Engine Routines, OKF Font Engine Structures, OKF Font Engine Constants, OkfGetFontChar