ParseFont

Parses a font and prepare it for use.

Synopsis

FontDescriptor * ParseFont (void *fontImage)

Description

Parses an in-memory image of a font file, creating a FontDescriptor for it and preparing it for use. Use this function when you've loaded a font file yourself (using data streaming or some other custom I/O method) and you want to prepare the font for use by the font and text API routines.

Use UnloadFont() to release resources acquired by ParseFont(). You must release the font image memory yourself; UnloadFont() only releases resources acquired internally by ParseFont().

Arguments

fontImage
Pointer to a font file image that you have loaded into memory.

Return Value

Pointer to a FontDescriptor structure that describes the font; NULL if the image is not a valid font file, or there is not enough memory to create a FontDescriptor structure.

Associated Files

lib3do.lib, fontlib.h

See Also

LoadFont, UnloadFont