DrvQueryFontTree

PVOID DrvQueryFontTree(

    IN DHPDEV dhpdev,

    IN ULONG iFile,

    IN ULONG iFace,

    IN ULONG iMode,

    IN ULONG *pid

   );

When GDI calls DrvQueryFontTree, the driver supplies pointers to structures that define one of the following:

Parameters

dhpdev
Identifies a device by a handle to its PDEV, returned from a prior call to DrvEnablePDEV.
iFile
Identifies the driver font file. This value is returned by DrvLoadFontFile.
iFace
Specifies the one-based index of the driver font.
iMode
Specifies the type of information to be provided. This can be one of the following values:

Value

Meaning

QFT_KERNPAIRS

GDI requests a pointer to a sorted, null-terminated array of FD_KERNINGPAIR structures.

The kerning pairs should be stored in increasing order. The primary key is the second Unicode character; the secondary key is the first Unicode character in the kerning pair.

QFT_GLYPHSET

GDI requests a pointer to an FD_GLYPHSET structure that defines the mappings from single Unicode characters to glyph handles.

pid
The driver writes an identifier at this address that GDI will pass to DrvFree, along with the returned pointer, when the FD_GLYPHSET structure or array of FD_KERNINGPAIR structures are no longer needed. Depending on how memory is managed in the driver, this identifier can identify the structure, identify the way it was allocated, or do nothing at all.

Return Value

The return value is a pointer to the requested structure if the function is successful. Otherwise, it is null, and an error code is logged.

Comments

The returned structure must remain unmodified until GDI calls DrvFree with the address of the structure.

DrvQueryFontTree is required for font drivers and drivers that use device-specific fonts.

See Also

DEVINFO, DrvEnablePDEV, DrvFree, DrvLoadFontFile, DrvQueryFontData, DrvQueryFontTree, FD_GLYPHSET, FD_KERNINGPAIR, IFIMETRICS