Microsoft KB Archive/180008

{|
 * width="100%"|

BUG: TrueType Glyphs Wrong Color Rasterized to 8bpp DIBSection

 * }

Q180008

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), on platform(s):
 * the operating system: Microsoft Windows 95
 * 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.

Additional query words:

Keywords :

Issue type : kbbug

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch