Conditionally Required Graphics Driver Functions

Depending on how a driver is implemented, other functions, such as those listed in the table that follows, are required. If the driver manages its own surface (using EngCreateDeviceSurface to get a handle to the surface), the driver must also support several drawing functions. Drivers writing to standard format DIBs usually allow GDI to manage most or all of these operations. Displays that support settable palettes must also support DrvSetPalette.

It is more common for a printer driver than a display driver to define or draw fonts. A display driver is not required to handle fonts unless it must be able to draw its own fonts or those of the video hardware on a device-managed surface. If the hardware has a resident font, the driver must supply information to GDI about this font. This information includes font metrics, mappings from Unicode to individual glyph identities, individual glyph attributes, and kerning tables.

Entry Point When Required Description
DrvCopyBits Device-managed surfaces Translates between a device-managed raster surface and a GDI standard-format bitmap.
DrvStrokePath Device-managed surfaces Renders a path on the display.
DrvTextOut Device-managed surfaces or drivers that define fonts Renders a set of character components (glyphs) at specified positions.
DrvSetPalette Displays that support settable palettes Realizes the palette for a specified device.
DrvPaint Device-managed surfaces Fills ("paints") a specified region.
DrvDescribePixelFormat Displays that support windows with different pixel formats on a single surface Describes a PDEV’s pixel format.
DrvSetPixelFormat Displays that support windows with different pixel formats on a single surface Sets a window’s pixel format.
DrvSwapBuffers Drivers that support a pixel format with double buffering Displays contents of a surface’s hidden buffer.
DrvResetPDEV Devices that allow mode changes in documents Transfers driver state from old PDEV to new PDEV.
DrvQueryFont Drivers that draw fonts Retrieves a GDI structure for a given font.
DrvQueryFontData Drivers that draw fonts Retrieves information about a realized font.
DrvQueryFontTree Drivers that draw fonts Queries a tree structure defining one of three types of font mapping.
DrvLoadFontFile Font drivers Specifies file to use for font realizations.
DrvUnloadFontFile Font drivers Informs driver a font file is not needed.
DrvQueryFontCaps Font drivers Asks driver for font driver capabilities.
DrvQueryFontFile Font drivers Asks driver for font file information.
DrvQueryTrueTypeTable TrueType font drivers Gives GDI access to TrueType font files.
DrvQueryTrueTypeOutline TrueType font drivers Returns TrueType glyph handles to GDI.
DrvGetTrueTypeFile TrueType font drivers Gives GDI access to memory-mapped TrueType font file.