DrvQueryFontTree function (winddi.h)

The DrvQueryFontTree function provides GDI with a pointer to a structure that defines one of the following:

  • A mapping from Unicode to glyph handles, including glyph variants
  • A mapping of kerning pairs to kerning handles

Syntax

PVOID DrvQueryFontTree(
  DHPDEV    dhpdev,
  ULONG_PTR iFile,
  ULONG     iFace,
  ULONG     iMode,
  ULONG_PTR *pid
);

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_GLYPHSET GDI requests a pointer to an FD_GLYPHSET structure that defines the mappings from single Unicode characters to glyph handles.
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.

pid

Pointer to a memory location holding the address of a driver-defined value. GDI passes the contents of *pid 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, the driver-defined value 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.

Remarks

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.

Requirements

Requirement Value
Target Platform Desktop
Header winddi.h (include Winddi.h)

See also

DEVINFO

DrvEnablePDEV

DrvFree

DrvLoadFontFile

DrvQueryFontData

DrvQueryFontTree

FD_GLYPHSET

FD_KERNINGPAIR

IFIMETRICS