ULONG DrvLoadFontFile(
ULONG iFile, | |
PVOID pvView, | |
ULONG cjView, | |
ULONG ulLangID | |
); |
DrvLoadFontFile identifies the file used to create fonts.
The return value is a unique identifier for a font file if the function is successful. Otherwise, it is FD_ERROR.
When DrvLoadFontFile is called, the driver should do any conversions necessary to prepare the file for use. If a font driver uses other DLLs, then it is responsible for ensuring that the DLL addresses to be accessed are valid.
Each font driver could obtain the parameters pvView and cjView by passing iFile to EngMapFontFile. However, for performance reasons, GDI calls EngMapFontFile once when loading fonts to obtain pvView and cjView, determines which font driver supports the font data in the file, and then calls that driver’s DrvLoadFontFile implementation with pvView and cjView. Font files can be unmapped until they are actually going to be used, so drivers should record iFile to do the remapping later.
DrvLoadFontFile returns a unique identifier that allows the graphics engine to request the correct font. The graphics engine maintains a font usage table. After a font is loaded, the graphics engine will not try to load the same font again.
DrvLoadFontFile is required for font drivers.