BUG: Left Part of Character Is Clipped with ExtTextOut/TextOutLast reviewed: July 23, 1997Article ID: Q111649 |
3.10
WINDOWS
kbprg kbbuglist
The information in this article applies to:
SYMPTOMSThe left part of a TrueType character such as an italic "f" is clipped.
CAUSEThere 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.
RESOLUTIONAn 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); STATUSMicrosoft has confirmed this to be a bug in Windows version 3.1. This problem does not occur in Windows 95.
MORE INFORMATION
Steps to Reproduce ProblemThis problem can be reproduced in Windows Write as follows:
|
Additional reference words: buglist3.10 3.10 sporadic
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |