FDQUERYFONT (Compact 2013)

3/28/2014

The FDQUERYFONT function is used by GDI to get the IFIMETRICS structure for a given font.

Syntax

PIFIMETRICS FDQUERYFONT(
    DHPDEV dhpdev,
    ULONG_PTR iFile,
    ULONG iFace,
    ULONG_PTR *pid
);

Parameters

  • dhpdev
    [in] Handle to the PDEV structure that identifies the physical device. The PDEV was returned from a previous call to DrvEnablePDEV.
  • iFile
    [in] Pointer to a driver-defined value that identifies a driver font file. This pointer is returned by FDLOADFONTFILE. This parameter is zero for device-resident fonts.
  • iFace
    [in] Specifies the one-based index of the driver font. GDI can query the number of fonts from the DEVINFO structure.
  • pid
    [in] Pointer to a memory location holding the address of a driver-defined value that GDI passes to DrvFree when the IFIMETRICS structure is no longer needed. Depending on how the driver manages memory, this 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 IFIMETRICS structure that describes the given font if the function is successful. Otherwise, it is NULL, and an error code is logged.

Remarks

The driver fills the IFIMETRICS structure.

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.

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

Requirements

Header

fontdrv.h

See Also

Reference

Fonts Functions