BUG: TrueType Glyphs Wrong Color Rasterized to 8bpp DIBSection

Last reviewed: January 28, 1998
Article ID: Q180008
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) on the following platform:
  • Microsoft Windows 95

SYMPTOMS

If you draw rotated or large TrueType glyphs to a memory DC that is backed by an 8bpp DIBSection, you get text with glyphs that are not the color specified with the SetTextColor function. Smaller, normally-oriented text drawn to this 8bpp DIBSection memory DC has the color specified by the SetTextColor function.

RESOLUTION

It may be possible to work around this problem using one of the following methods:

  1. Draw to a memory DC using a DDB created with CreateCompatibleBitmap.

  2. Use a 24bpp DIBSection instead of an 8 bpp DIBSection.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

This problem has been reproduced on 8bpp, 16bpp, and 32bpp video drivers on Windows 95.

Steps to Reproduce Behavior

  1. Create an 8bpp DIBSection with a full unique color table.

  2. Create a memory DC using this DIBSection.

  3. Create a rotated TrueType Font.

  4. Set the Text color using a DIBINDEX colorref for one of the unique colors in the DIBs color table.

  5. SetBkMode(..., TRANSPARENT).

  6. TextOut a string with this font and observe that the color is not the one specified by the DIBINDEX macro.
Version           : WIN95;
Platform          : Win95
Issue type        : kbbug
Solution Type     : kbnofix


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 28, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.