Text Support

To draw text strings, minidrivers should call either DIB_ExtTextOut or DIB_ExtTextOutExt. Call the DIB_GetCharWidth function to retrieve character-width data for a string of text.

Minidrivers can forward ExtTextOut calls from GDI to the DIB engine function DIB_ExtTextOutExt by providing two additional parameters to the argument list. These two parameters are:

lpDrawTextBitmap

lpDrawRect

Both parameters are callback functions provided by the driver that the DIB engine calls to draw the text string and opaquing rectangle.

A minidriver has three options when receiving ExtTextOut calls from GDI:

  1. Forward all calls to ExtTextOut to the DIB engine.
  2. Forward all calls to ExtTextOut to the DIB engine function DIB_ExtTextOutExt with the lpDrawTextBitmap and lpDrawRect parameters set to the driver's callback functions.
  3. Handle the text output directly.

With most accelerators, handling the text output directly will result in the highest performance. However, the callback function specified by lpDrawTextBitmap may be faster for small point-size fonts, depending on the per-character overhead in the driver.

In Windows 95, almost all fonts are converted to the new format specified by the NewFontSeg structure if the driver sets the C1_BYTE_PACKED or C1_BIT_PACKED bit of the dpCaps1 field of the GDIINFO structure. However, it is still possible for the driver to receive an old style font; this is indicated if neither of the ExtTextOut wOptions flags ETO_BYTE_PACKED or ETO_BIT_PACKED is set. In this case, the minidriver should let the DIB engine handle the text output.

See Also

DIB_ExtTextOut, DIB_ExtTextOutExt, DIB_GetCharWidth