BUG: TrueType Glyphs Wrong Color Rasterized to 8bpp DIBSection

ID: Q180008

The information in this article applies to:

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.

Additional query words:
Version           : WIN95;
Platform          : Win95
Issue type        : kbbug
Solution Type     : kbnofix

Last Reviewed: April 2, 1998