DrvQueryFont

PIFIMETRICS DrvQueryFont(

IN DHPDEV dhpdev,
IN ULONG iFile,
IN ULONG iFace,
IN ULONG *pid
);

DrvQueryFont is used by GDI to get the IFIMETRICS structure for a given font. The driver fills the IFIMETRICS structure.

Parameters

dhpdev

Pointer to a PDEV handle that identifies a physical device. The PDEV was returned from a previous call to DrvEnablePDEV.

iFile

Identifies a driver font file. This identifier is returned by DrvLoadFontFile. This parameter is zero for device-resident fonts.

iFace

Specifies the one-based index of the driver font. GDI can query the number of fonts from the DEVINFO structure.

pid

Points to an identifier that GDI will pass to DrvFree when the IFIMETRICS structure is no longer needed. Depending on how the driver manages memory, 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 IFIMETRICS structure that describes the given font if the function is successful. Otherwise, it is null, and an error code is logged.

Comments

The IFIMETRICS structure must remain unchanged during the scope of the associated PDEV.

If the number of fonts in DEVINFO is -1 and iFace is zero, the driver should return the number of fonts it supports.

DrvQueryFont is required for font drivers and drivers that use driver-specific or device-specific fonts.

See Also

DEVINFO, DrvEnablePDEV, DrvLoadFontFile, IFIMETRICS