OKF Font Engine Constants

These constants defined in OKF.H are used by the OKF Font Engine routines and/or structures.


OKF Font Engine Defined Constants

Constant Use
OKF_FIRSTCHAR, OKF_LASTCHAR These constants indicates the codes of the first and last valid chars.
OKF_LASTCHAR - OKF_FIRSTCHAR + 1 represents the number of OKFCHAR structures allocated for each font and must be less than 255 (see OKFFONT structure).
OKF_MAXLINE Maximum length of a line of text when printing text that is centred or right justified.
The length of a left justified text has no limit.
OKF_MAXNUMBER Maximum length of the resulting formatted string generated by OkfPrintLong and OkfPrintLongAt.


OKF Font Engine OKFERROR Constants

OKFERROR is an enumeration used to list the error codes that you can find in okf.lastError.

Constant Use
okfOk Execution completed correctly
okfNotInitialized OKF Font Engine has not been initialized
okfMemory Not enough memory
okfNoCurrentFont The handle of the font actually selected in okf.font is not a valid registered font handle
okfHandleNotValid The font handle passed as argument in the last function call is not a valid registered font handle
okfFontFileNotFound You are trying to load a font from an .OKF font file that doesn't exist in the SMC card
okfBadFontFile The file your are trying to register is not a valid .OKF font file
okfVersionNotSupported The version of the .OKF font file you are trying to register is not supported by this OKF font engine
okfSMCError Some error occurred while accessing to the SMC card


OKF Font Engine OKFJUSTIFICATION Constants

OKFJUSTIFICATION is an enumeration used to list the different types of text justification supported by all printing functions of the font engine through the okf.justify property. okf.x is taken as a reference for the justification.

Constant Use
okfJustifyLeft Text has to be printed justified to the left
okfCenter Text has to be printed centred
okfJustifyRight Text has to be printed justified to the right


OKF Font Engine OKFEFFECTTYPE Constants

OKFEFFECTTYPE is an enumeration used to list the different types of effects you can apply on the text of a font (okf.effect.type) or its shadow (okf.shadow.effect.type).

Constant Use
okfNone No effect has to be applied on the font or shadow
okfOverlay *.effect.color will be overlaid using *.effect.intensity
okfAddColor *.effect.color will be added up to the white color
okfSubtractColor *.effect.color will be subtracted down to the black color
okfGrayScale The color of the font or shadow will be converted to grayscale.


OKF Font Engine OKFALPHALEVELS Constants

OKFALPHALEVELS is an enumeration used to list the different precisions of the alpha blending look up table used by the OKF Font Engine to render fonts. Change the precision of the alpha LUT calling OkfInitializeAlphaLUT.

Constant Use
okf4Levels 2 bits alpha LUT. Memory usage 4KB
okf8Levels 3 bits alpha LUT. Memory usage 8KB
okf16Levels 4 bits alpha LUT. Memory usage 16KB
okf32Levels 5 bits alpha LUT. Memory usage 32KB (default value when initializing the OKF Font Engine)


See Also

OKF Font Engine Routines, OKF Font Engine Structures, OkfInitializeAlphaLUT, OkfPrintLong, OkfPrintLongAt