Disable baseline change for underlined text.

This fixes a display bug on Leopard where lines with underlined text were
higher than lines without underlined text.
This commit is contained in:
Bjorn Winckler
2007-11-05 15:44:27 +01:00
parent 67576e0281
commit f1236d0fd3
+2 -14
View File
@@ -229,25 +229,13 @@
else if (flags & DRAW_ITALIC)
theFont = italicFont;
NSDictionary *attributes;
if (flags & DRAW_UNDERC) {
// move the undercurl down a bit so it is visible
attributes = [NSDictionary dictionaryWithObjectsAndKeys:
theFont, NSFontAttributeName,
bg, NSBackgroundColorAttributeName,
fg, NSForegroundColorAttributeName,
sp, NSUnderlineColorAttributeName,
[NSNumber numberWithFloat:2],NSBaselineOffsetAttributeName,
nil];
} else {
attributes = [NSDictionary dictionaryWithObjectsAndKeys:
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
theFont, NSFontAttributeName,
bg, NSBackgroundColorAttributeName,
fg, NSForegroundColorAttributeName,
sp, NSUnderlineColorAttributeName,
nil];
}
[attribString setAttributes:attributes range:range];
if (flags & DRAW_UNDERL) {