DrvQueryFontCaps

LONG DrvQueryFontCaps(

    ULONG  culCaps,
   ULONG  *pulCaps
  );

DrvQueryFontCaps defines the capabilities of the font driver.

Parameters

culCaps

Specifies the number of ULONG values that can be written by the font driver.

pulCaps

Points to a buffer that will receive the ULONG values. The elements of the array have the following meanings:

Element Meaning
pulCaps[0] A count of the number of ULONG values in the complete array. If culCaps is less than this value, then the caller will receive an incomplete array.
pulCaps[1] A set of flags that can be one or more of the following values:

QC_OUTLINES
If this flag is set, the font driver can return an outline description of the glyphs. Moreover, the fonts are assumed to be scalable. Bitmap fonts do not have this flag set.

QC_2_LEVEL
Indicates that the font driver is capable of returning monochrome bitmaps of each glyph. QC_2_LEVEL is equal to the previous QC_1_BIT value.

QC_4_LEVEL
Indicates that the font driver is capable of returning antialiased 8-bit-per-pixel bitmaps, where each pixel in the bitmap is represented by an unsigned 8-bit value in the range 0 through 3. The values contained in each BYTE indicate how much of the foreground color should be mixed into the background. For example, a value of 0 indicates that the pixel will take the color of the background, while a value of 3 indicates that the pixel will take the foreground color of the text.

QC_16_LEVEL
Indicates that the font driver is capable of returning antialiased 4-bit-per-pixel bitmaps where each pixel in the bitmap is represented by an unsigned 4-bit value in the range 0 through 15. The values contained in each nibble indicate how much of the foreground color should be mixed into the background. For example, a value of 0 indicates that the pixel will take the color of the background, while a value of 15 indicates that the pixel will take the foreground color of the text.


Return Value

The return value is the number of ULONG values written to the destination buffer if the function is successful. Otherwise, it is FD_ERROR.

Comments

A driver might report that it supports more than one format for a font. For example, a driver could, in principle, return with both QC_2_LEVEL and QC_16_LEVEL set, indicating that it is capable of returning both monochrome and antialiased versions of the font. All bitmaps generated by a font driver must start and end on 32-bit boundaries. If necessary, the end of a bitmap should be “padded” to satisfy this requirement.

See Also

DrvQueryFont, DrvQueryFontTree