In the old code the ascender and descender of the font were
taken from the maximum bounding box of the characters.
This patch will take them from the font information itself.
This makes a huge differences when viewing Readme.rtf in Ink.
In the old situation the lines were spaced way too far appart.
After applying this patch the distance is reasonable.
Wim Oudshoorn.
2003-02-20 Willem Rein Oudshoorn <[EMAIL PROTECTED]>
* Source/xlib/XGFont.m ([XGFontInfo -setupAttributes]): Use ascender and
descender
informaton of the X11 font instead of using maximum bounding box.
--- Source/xlib/XGFont.m Thu Feb 20 14:57:27 2003
+++ ../../core/back/Source/xlib/XGFont.m Sun Feb 2 22:06:03 2003
@@ -298,10 +298,10 @@
[fontDictionary setObject: familyName forKey: NSAFMFamilyName];
isFixedPitch = XGFontIsFixedPitch(xdpy, font_info);
isBaseFont = NO;
- ascender = font_info->ascent;
+ ascender = font_info->max_bounds.ascent;
[fontDictionary setObject: [NSNumber numberWithFloat: ascender]
forKey: NSAFMAscender];
- descender = -(font_info->descent);
+ descender = -(font_info->max_bounds.descent);
[fontDictionary setObject: [NSNumber numberWithFloat: descender]
forKey: NSAFMDescender];
fontBBox = NSMakeRect(
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep