FDQUERYFONTDATA (Windows Embedded CE 6.0)
1/6/2010
Applies to Windows Embedded CE 6.0 R2
The FDQUERYFONTDATA function retrieves information about a realized font.
Syntax
LONG FDQUERYFONTDATA(
DHPDEV dhpdev,
FONTOBJ *pfo,
ULONG iMode,
HGLYPH hg,
GLYPHDATA *pgd,
PVOID pv,
ULONG cjSize
);
Parameters
- dhpdev
[in] Handle to the physical device's PDEV structure that was returned from a prior call to DrvEnablePDEV. A PDEV structure is a logical representation of a physical display device.
- pfo
[in] Pointer to a FONTOBJ structure that defines the font realization.
iMode
[in] Specifies the type of information requested. This parameter can be one of the following values: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 PATHOBJ_xxx 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.
QFD_TT_GRAY1_BITMAP
The realized font should be rendered in one bit-per-pixel of grayscale (that is, either black or white).
QFD_TT_GRAY2_BITMAP
The realized font should be rendered in two bits-per-pixel of grayscale.
QFD_TT_GRAY4_BITMAP
The realized font should be rendered in four bits-per-pixel of grayscale.
QFD_TT_GRAY8_BITMAP
The realized font should be rendered in eight bits-per-pixel of grayscale.
QFD_TT_MONO_BITMAP
Same as QFD_TT_GRAY1_BITMAP.
- hg
[in] Handle to the glyph.
- pgd
[in] [out] Pointer to GLYPHDATA structure. This parameter can be NULL.
- pv
[in] [out] Pointer to a data buffer. The type of data written to this buffer is dependent on iMode. This parameter can be NULL.
- cjSize
[in] Specifies the size of the buffer pointed to by pv.
Return Value
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.
Remarks
For the QFD_GLYPHANDBITMAP and QFD_GLYPHANDOUTLINE values of the iMode parameter, GDI provides a pointer to a GLYPHDATA structure (in the pgd parameter). The driver places information about glyph metrics in this structure and writes the contents of either a GLYPHBITS structure or a PATHOBJ structure in the location specified by the pv parameter, depending respectively, on whether the font is a bitmap font or an outline font.
For the QFD_MAXEXTENTS value of the iMode parameter, the driver writes the contents of an FD_DEVICEMETRICS structure in the location specified by the pv parameter.
FDQUERYFONTDATA is required for font drivers and drivers that use device-specific or driver-specific fonts.
Requirements
Header | fontdrv.h |
Windows Embedded CE | Windows Embedded CE 6.0 R2 |