Font Driver Functions
In addition to the functions described in the previous topics, the following table lists several other functions that font drivers should support.
Specifies a file to be used for creating font realizations; the driver must prepare the file for use. Required for font drivers.
Asks the driver to send GDI character advance widths for a specified set of glyphs.
Copies an array of bits that defines the capabilities of a font driver, to a specified buffer.
Depending on the mode of the query, returns the number of font faces in a font file or in a descriptive string. Required for font drivers.
Returns information about a font's glyphs.
Informs driver that a font file is no longer needed so driver can do necessary cleanup. Required for font drivers.
GDI calls the DrvLoadFontFile function with a particular file to be used for creating font realizations. This function is required only of font drivers. When the function DrvLoadFontFile is called, the driver performs the conversions necessary to prepare the file for use.
DrvLoadFontFile returns a unique identifier that allows GDI to request the correct font using a GDI-maintained font usage table. Once a font is loaded, GDI does not call for the same font to be loaded again.
GDI calls DrvUnloadFontFile when the specified font file is no longer needed. The DrvUnloadFontFile function is required only in font drivers. DrvUnloadFontFile causes all scratch files to be deleted and all allocated system resources to be freed.
GDI calls the DrvQueryFontFile function to return information about a font file that was loaded by the driver. DrvQueryFontFile is required only in font drivers. The type of information to be returned is specified by iMode. If iMode is QFF_DESCRIPTION, the function returns a string that Microsoft NT-based operating systems use to describe the font file. If iMode is QFF_NUMFACES, the function returns the number of faces in the font file. The faces are identified by an index from the range 1 to number of faces.