DrvGetGlyphMode function (winddi.h)
The DrvGetGlyphMode function tells GDI how to cache glyph information.
Syntax
ULONG DrvGetGlyphMode(
[in] DHPDEV unnamedParam1,
[in] FONTOBJ *unnamedParam2
);
Parameters
[in] unnamedParam1
Handle to a physical device's PDEV structure.
[in] unnamedParam2
Pointer to a FONTOBJ structure that can be queried to find the font size, transform, and other font attributes.
Return value
DrvGetGlyphMode returns one of the following values:
Return code | Description |
---|---|
|
GDI should cache all glyph data for this font. |
|
The device caches fonts on its own, so GDI should cache only glyph handles for this font. |
|
GDI should cache PATHOBJ structures for this font. |
Remarks
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.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | winddi.h (include Winddi.h) |