ID Number: Q74467
3.00 3.10
WINDOWS
Summary:
In the Microsoft Windows graphical environment, when an application
uses an italic font synthesized by the graphics device interface
(GDI), each character and its whole character cell are "sheared," or
slanted, to the right, which can cause some unexpected results.
More Information:
The capital H in the example below illustrates how GDI synthesizes an
italic font:
.......... ..........
. . . .
. | | . . | | .
. | | . . | | .
. |----| . italicizes to . |----| .
. | | . . | | .
. | | . . | | .
. . . .
.......... ..........
Note two items in this case:
1. If the text background color is changed so that it does not match
the window background color, the text background color occupies the
sheared character cell (in other words, it is also slanted). Gaps
occur in the background where normal text is adjacent to italic
text.
2. The italic character is farther to the right in relation to the
lower-left corner of the character cell than is the normal
character. Therefore, if normal and italic text start at the same x
coordinate on different lines, the italic text appears farther to
the right.
To determine the number of units by which the character cell is
sheared, call the GetTextMetrics function to fill a TEXTMETRIC data
structure with information about the font. The tmOverhang member
describes the amount of shear.
Additional reference words: 3.00 3.10