ULONG DrvGetGlyphMode(
IN DHPDEV dhpdev, | |
IN FONTOBJ *pfo | |
); |
DrvGetGlyphMode tells GDI how to cache glyph information.
Parameters
dhpdev
Identifies a PDEV.
pfo
Points to a FONTOBJ structure that can be queried to find the font size, transform, and so on.
Comments
GDI calls a driver's DrvGetGlyphMode routine to determine the range of font information that should be cached for a particular font; that is, DrvGetGlyphMode determines what GDI stores in its font cache. A device that caches fonts on its own should return FO_HGLYPHS to minimize the storage requirements for the font.
GDI calls DrvGetGlyphMode for each font realization. For example, a driver might want to download outlines for point sizes larger than 12 point, but raster images for smaller fonts. However, GDI reserves the right to refuse this request.
The driver must check the RASTER_FONTTYPE bit of the flFontType member of the FONTOBJ structure to determine the actual form of the glyphs. If this bit is set, GDI is sending bitmaps; otherwise it is sending PATHOBJ structures.
At the time of the call to DrvGetGlyphMode, the associated FONTOBJ is not fully functional. GDI guarantees only that the IFIMETRICS structure and the notional-to-device transform are correct.
DrvGetGlyphMode is an optional driver function. If this function is not provided, GDI will store raster fonts by default.
Return Value
DrvGetGlyphMode returns one of the following values:
Value | Meaning |
FO_GLYPHBITS | GDI should cache all glyph data for this font. |
FO_HGLYPHS | The device caches fonts on its own, so GDI should cache only glyph handles for this font. |
FO_PATHOBJ | GDI should cache PATHOBJs for this font. |
See Also
FONTOBJ, FONTOBJ_cGetGlyphs, GLYPHDEF, GLYPHPOS, IFIMETRICS, PATHOBJ, STROBJ