HOWTO: Realize a TrueType Font as a Glyph Index Font

ID: Q180584


The information in this article applies to:
  • Microsoft Windows 95 Driver Development Kit (DDK)


SUMMARY

To indicate support for glyph indices for a TrueType font the printer driver has to call EngineRealizeFontExt function to realize the font.


MORE INFORMATION

To support glyph indices, the printer driver has to perform the following steps:

  1. Build the driver with a resource compiler that supports the -40 option.


  2. Set the dpVersion field of the GDIINFO 0x400. This will tell GDI that the driver is a Windows 95 driver.


  3. Set the C1_GLYPH_INDEX ( 0x100 ) flag in the dpCaps1, which is in the GDIINFO structure, to indicate that the driver supports glyph index fonts.


  4. At RealizeObject time, the driver must realize the font using the EngineRealizeFontExt (...) function. This sets the appropriate fields in the FONTINFO structure. The prototype for the EngineRealizeFontExt is:
    
           WORD FAR PASCAL EngineRealizeFontExt ( HDC,
                                                  LPLOGFONT,
                                                  LPTEXTXFORM,
                                                  LPFONTINFO,
                                                  WORD   /* flags */  ); 
    Bit 0 of the flags parameter indicates whether to realize the font as a glyph index font or old style font (all other bits should be zero).


  5. Return a value of 0x400 in DeviceCapabilities for DC_VERSION.


To confirm support for the glyph indices, you can check the FONTINFO structure that is passed to the ExtTextOut function. It should have the PF_GLYPH_INDEX ( 0x20) bit set in the dfType field, and the lpString will have the glyph indices for the string to printed.

Additional query words:

Keywords : ntddkprnt
Version : Win95:
Platform : Win95
Issue type : kbhowto


Last Reviewed: October 18, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.