FONTOBJ

typedef struct _FONTOBJ {
    ULONG iUniq;
    ULONG iFace;
    ULONG cxMax;
    FLONG flFontType;
    ULONG iTTUniq;
    ULONG iFile;
    SIZE sizLogResPpi;
    ULONG ulStyleSize;
    PVOID pvConsumer;
    PVOID pvProducer;
} FONTOBJ;

The FONTOBJ structure is used to give a driver access to information about a particular instance of a font. As an accelerator, the driver is allowed to access the public members of the FONTOBJ structure.

Members

iUniq
Specifies a distinct realization of the font. This value can be used by the driver to identify a GDI font that it might have cached or to identify a driver’s realization of its own font. If this member is zero for a GDI font, the font should not be cached.
iFace
Specifies the device index for a device font, which was registered by a call to DrvQueryFont. If the font is a GDI font, this member has meaning only to GDI, and the driver should ignore it.
cxMax
Specifies the width, in pixels, of the largest glyph in the specified font.
flFontType
A value specifying the type of the font. This member can be a combination of the following flags:

Flag

Meaning

RASTER_FONTTYPE

Bitmap font.

DEVICE_FONTTYPE

Device-specific font.

TRUETYPE_FONTTYPE

TrueType font.

FO_SIM_ITALIC

Driver-simulated italic font.

FO_SIM_BOLD

Driver-simulated bold font.

FO_EM_HEIGHT

TrueType driver internal flag.

FO_4_LEVEL

Four-level antialiased font.

FO_16_LEVEL

Sixteen-level antialiased font.

FO_64_LEVEL

Sixty-four-level antialiased font.

If the RASTER_FONTYPE flag is set, the glyphs written to the specified STROBJ structure are bitmaps, otherwise they are pointers to PATHOBJ structures. If the glyph images are returned in the form of PATHOBJ structures, the driver must inspect the FM_INFO_TECH_STROKE flag of the flInfo member of the associated IFIMETRICS structure. If that flag is set, the paths should be stroked, otherwise the paths must be filled using the alternating mode convention.

If the FO_16_LEVEL bit is set, the associated glyph’s bitmaps are 4-bits-per-pixel. If this bit is not set, the glyph’s bitmaps are monochrome.

iTTUniq
Specifies the associated TrueType file. Two separate point size realizations of a TrueType font face will have FONTOBJ structures that share the same iTTUniq value, but will have different iUniq values. Only TrueType font types can have a nonzero iTTUniq member. For more information see flFontType.
iFile
The identifier returned for device fonts already loaded. If the font is a GDI font, then this member is used internally to identify the font and should be ignored.
sizLogResPpi
Specifies the resolution of the device for which this font is realized.
ulStyleSize
Specifies the style size of the font instance, in points.
pvConsumer
A consumer is a driver that accepts glyph information as input for generating text output. Only a font consumer can modify this member. The consumer of this font can store any information in the location pointed to by this member. This member should be used to store a pointer to consumer-allocated data associated with this font instance. The engine will not modify this member. The pvConsumer member is guaranteed to be null the first time a FONTOBJ structure is passed to the consumer.
pvProducer
A producer is a driver that can produce glyph information as output; this includes glyph metrics, bitmaps, and outlines. Only a font producer can modify this member. The producer of this font can store any information in the location pointed to by this member. This member should be used to store a pointer to producer-allocated data associated with this font instance. The engine will not modify this member. The pvProducer member is guaranteed to be null the first time a FONTOBJ structure is passed to the producer.

Comments

A driver can be both a producer and a consumer. For example, a printer driver can act as a producer while processing a call to the driver-supplied DrvQueryFontData function to provide glyph metrics, and later act a consumer while processing a call to the driver-supplied DrvTextOut function.

See Also

DrvDestroyFont, DrvGetGlyphMode, DrvQueryFont, DrvQueryTrueTypeOutline, FONTOBJ_cGetAllGlyphHandles, FONTOBJ_cGetGlyphs, FONTOBJ_pifi, FONTOBJ_pxoGetXform, FONTOBJ_vGetInfo, IFIMETRICS