BUG: Left Part of Character Is Clipped with ExtTextOut/TextOut (111649)
The information in this article applies to:
- Microsoft Windows Software Development Kit (SDK) 3.1
This article was previously published under Q111649 SYMPTOMS
The left part of a TrueType character such as an italic "f" is clipped.
CAUSE
There is a bug in the TextOut() and ExtTextOut() functions that occurs with
complex clipping regions. In this case, GDI considers the left edge of the
string to be the X coordinate used in the TextOut() or ExtTextOut() call.
This works for bitmap fonts, but not TrueType fonts because the "A" part of
a TrueType font's ABC width may be negative (as it normally is with an
italic "f").
Because this problem only occurs with complex clipping regions, the
character may appear to be randomly clipped as the clipping region changes.
For example, clipping may be tied to the presence of a dialog box or other
window over the client area, because that may create a complex clipping
region.
RESOLUTION
An application can correct this problem by calling ExtTextOut() and passing
in a clipping rectangle that accounts for the portion of the text going to
the left of the starting point.
For example, in the following call, the string origin is offset within the
clipping rectangle so the string will not be clipped:
ExtTextOut(hdc, rc.left+10, // text origin (offset by 10 into cliprect)
rc.top, ETO_CLIPPED,
&rc, "ffff", 4, NULL);
STATUS
Microsoft has confirmed this to be a bug in Windows version 3.1.
This problem does not occur in Windows 95.
Modification Type: | Major | Last Reviewed: | 11/6/1999 |
---|
Keywords: | kb16bitonly KB111649 |
---|
|