Article ID: 244798 - Last Review: February 12, 2007 - Revision: 1.6 HOWTO: Mix Italic and Regular (Non-Italic) Text
This article was previously published under Q244798 SUMMARY
When a sequence of italic text is immediately followed by regular text, and if the placement of the text is not correct, the italic characters can overlap the other trailing text. To resolve this issue, compensate for both the overhang of the trailing character of the first substring and for the underhang of the lead character of second substring. For TrueType fonts, use GetCharABCWidths to retrieve these values. MORE INFORMATION
The sample code that follows outputs the string "fff" in italic text, and immediately follows it with the string "ggg" in regular (non-italic) text. If you do not compensate for the overhang and underhang values of the trailing italic character and leading non-italic character, these two substrings typically overlap.
REFERENCES
For more information, visit the following MSDN Web sites:
Windows GDI - Fonts and Text http://msdn.microsoft.com/en-us/library/ms534210.aspx (http://msdn.microsoft.com/en-us/library/ms534210.aspx)
How to Fit Text in a Rectangle http://support.microsoft.com/default.aspx?scid=kb;[LN];Q200262 (http://support.microsoft.com/default.aspx?scid=kb;%5Bln%5D;q200262) | Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
