Microsoft KB Archive/194643

{|
 * width="100%"|

HOWTO: Turn Off Glyph Index Fonts for Active Accessibility

 * }

Q194643

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), on platform(s):
 * the hardware: Intel x86

-

SUMMARY
Some Microsoft Active Accessibility applications need to be able to turn off support for glyph index fonts at the display-driver level.

MORE INFORMATION
The Active Accessibility application might have created a "wrapper" DLL to intercept function calls to and from the operating system and the display system driver(s).

Implementation of this "wrapper" DLL is not the focus of this article. In general, these DLLs are loaded as if they are the real display driver and they load the real driver through LoadLibrary or LoadLibraryEx. This step provides the module handle needed for the next step of obtaining the entry points to the real display driver through GetProcAddress. The "wrapper" DLL needs to export every possible device driver interface (DDI) of the underlying display driver so it can work on any commercial display system driver.

Understanding the initialization process for the display system is important to this topic. This process is documented in the Windows 95 DDK and the Windows 98 DDK. All of the documented DDI routines for the display system are documented in these two DDKs.

As part of the initialization process, the operating system calls into the display driver's Enable routine to get a copy of the GDIINFO structure. This structure informs the operating system about the capabilities and settings of the display system. One of the fields of this structure is the dpCaps1 bit field. The bits that are set or clear in this bit field determine several raster capabilities for the driver. One of the bits in this field is the C1_GLYPH_INDEX (0x0100) bit. If this bit is set, the driver supports glyph index fonts. For the purposes of this article, you need to turn this bit off if it is set by the driver.

The Technique
In your "wrapper" DLL's Enable routine, perform a bitwise AND of the dpCaps1 field of the display driver's GDIINFO with the inverse of C1_GLYPH_INDEX (0x0100). Then pass the altered GDIINFO to the operating system when returning from the Enable call to the display driver. This tells GDI that the driver does not support glyph index fonts, so GDI will not try to use them.

The Caveats
Many international versions of the Windows 95 or Windows 98 operating systems use glyph index fonts exclusively, converting raster fonts to glyph index fonts as described in the following article in the Microsoft Knowledge Base:

"Q180575 INFO: Raster Fonts Converted to Glyph Fonts in Hebrew Win95" If you use the technique above to implement your Active Accessibility application, your application will not function on many internationally localized versions of the Windows 95 or Windows 98 operating systems. Microsoft Development is aware of this limitation and is working on a global solution.