LONG DrvQueryFontData(
IN DHPDEV dhpdev, | |
IN FONTOBJ *pfo, | |
IN ULONG iMode, | |
HGLYPH hg, | |
GLYPHDATA pgd, | |
IN PVOID pv, | |
ULONG cjSize | |
); |
DrvQueryFontData retrieves information about a realized font. GDI provides a pointer to an array of glyph or kerning handles, and the driver returns information about the glyphs or kerning pairs. The driver can assume that all handles in the array are valid.
Value |
Meaning |
QFD_GLYPHANDBITMAP |
If pgd is not null, then the driver should fill in the GLYPHDATA structure with the metrics of the glyph specified by hg. If pv is not null, a GLYPHBITS structure should be written at this address. The driver should copy the glyph bitmap corresponding to the glyph specified by hg into this structure. The size of the structure is specified by cjSize. If glyph bitmaps are not supported by the driver, this function will only be called with pv set to null. If the driver supports glyph bitmaps, the return value is the size, in bytes, of the glyph bitmap. Otherwise, it is zero. This mode must be supported. |
QFD_GLYPHANDOUTLINE |
If pgd is not null, then the driver should fill in the GLYPHDATA structure with the metrics of the glyph specified by hg. If pv is not null, a PATHOBJ structure should be written at this address. The driver passes this PATHOBJ to the PATHOBJXxx services to create the outline for the glyph specified by hg. The cjSize parameter should be ignored. The return value is zero if the function is successful. Otherwise, it is FD_ERROR. Only font drivers that provide glyph outlines need to support this mode. |
QFD_MAXEXTENTS |
If pv is not null, the driver should write an FD_DEVICEMETRICS structure to the buffer pointed to by pv. The return value is the size, in bytes, needed for the buffer if pv is null. If pgd is nonzero, the font driver should copy an FD_REALIZEEXTRA structure to this address that corresponds to this realization of the font, as identified by the FONTOBJ. |
QFD_MAXGLYPHBITMAP |
The return value is the size, in bytes, of the largest RASTERGLYPH structure required for the font realization specified by pfo. The driver should ignore the hg, pv, pgd, and cjSize parameters. Only font drivers that provide glyph bitmaps need to support this mode. |
The return value depends on the value of the iMode parameter. If an error occurs, the return value is FD_ERROR, and an error code is logged.
DrvQueryFontData is required for font drivers and drivers that use device-specific or driver-specific fonts.
DrvEnablePDEV, DrvQueryFontFile, FD_DEVICEMETRICS, FONTOBJ, GLYPHBITS, PATHOBJ