Correct the setting of fontBBoxCorrect the setting of fontBBox..

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26757 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2008-07-11 23:08:36 +00:00
parent 865a89a647
commit c6f39a9553
4 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2008-07-12 Fred Kiefer <FredKiefer@gmx.de>
* Source/xlib/GSXftFontInfo.m (-setupAttributes:),
* Source/xlib/XGFontSetFontInfo.m(-setupAttributes:),
* Source/xlib/XGFont.m(-setupAttributes:): Correct the setting of
fontBBox, used for boundingRectForFont.
2008-07-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/XGServerWindow.m (-setinputstate:): Disable new code,

View file

@ -940,7 +940,7 @@ static FT_Outline_Funcs bezierpath_funcs = {
xHeight = capHeight*0.6; //Errr... TODO
fontBBox = NSMakeRect(
(float)(0),
(float)(0 - font_info->ascent),
(float)(font_info->descent),
(float)(font_info->max_advance_width),
(float)(font_info->ascent + font_info->descent));
maximumAdvancement = NSMakeSize(font_info->max_advance_width, 0.0);

View file

@ -304,8 +304,8 @@ static BOOL XGInitAtoms(Display *dpy)
ascender = font_info->ascent;
descender = -(font_info->descent);
fontBBox = NSMakeRect(
(float)(0 + font_info->min_bounds.lbearing),
(float)(0 - font_info->max_bounds.ascent),
(float)(font_info->min_bounds.lbearing),
(float)(font_info->max_bounds.descent),
(float)(font_info->max_bounds.rbearing - font_info->min_bounds.lbearing),
(float)(font_info->max_bounds.ascent + font_info->max_bounds.descent));
maximumAdvancement = NSMakeSize(font_info->max_bounds.width, 0.0);

View file

@ -132,7 +132,7 @@ static BOOL char_struct_for_glyph(NSGlyph glyph, XFontSet font_set,
mostCompatibleStringEncoding = NSASCIIStringEncoding;
fontBBox =
NSMakeRect(base->min_bounds.lbearing,
-base->max_bounds.ascent,
base->max_bounds.descent,
base->max_bounds.rbearing - base->max_bounds.lbearing,
base->max_bounds.ascent + base->max_bounds.descent);
isFixedPitch = XGFontIsFixedPitch(dpy, base);