mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Correct the sign of the descender in the bounding box.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26760 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3c1efdce2b
commit
d7d3bf8ea1
6 changed files with 16 additions and 7 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,8 +1,17 @@
|
|||
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
|
||||
* Source/xlib/XGFontSetFontInfo.m (-setupAttributes:),
|
||||
* Source/xlib/XGFont.m (-setupAttributes:),
|
||||
* Source/art/ftfont.m (-setupAttributes:),
|
||||
* Source/art/ftfont-old.m (-setupAttributes): Correct the sign of
|
||||
the descender in the bounding box.
|
||||
|
||||
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>
|
||||
|
|
|
@ -246,7 +246,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
|
|||
xHeight = ascender * 0.5; /* TODO */
|
||||
maximumAdvancement = NSMakeSize((size->metrics.max_advance / 64.0), ascender + descender);
|
||||
|
||||
fontBBox = NSMakeRect(0, descender, maximumAdvancement.width, ascender + descender);
|
||||
fontBBox = NSMakeRect(0, -descender, maximumAdvancement.width, ascender + descender);
|
||||
descender = -descender;
|
||||
|
||||
/* printf("(%@) h=%g a=%g d=%g max=(%g %g) (%g %g)+(%g %g)\n",name,
|
||||
|
|
|
@ -262,7 +262,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
|
|||
maximumAdvancement = NSMakeSize((ft_size->metrics.max_advance / 64.0), 0.0);
|
||||
|
||||
fontBBox
|
||||
= NSMakeRect(0, descender, maximumAdvancement.width, ascender + descender);
|
||||
= NSMakeRect(0, -descender, maximumAdvancement.width, ascender + descender);
|
||||
descender = -descender;
|
||||
|
||||
/* printf("(%@) h=%g a=%g d=%g max=(%g %g) (%g %g)+(%g %g)\n",name,
|
||||
|
|
|
@ -940,7 +940,7 @@ static FT_Outline_Funcs bezierpath_funcs = {
|
|||
xHeight = capHeight*0.6; //Errr... TODO
|
||||
fontBBox = NSMakeRect(
|
||||
(float)(0),
|
||||
(float)(font_info->descent),
|
||||
(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);
|
||||
|
|
|
@ -305,7 +305,7 @@ static BOOL XGInitAtoms(Display *dpy)
|
|||
descender = -(font_info->descent);
|
||||
fontBBox = NSMakeRect(
|
||||
(float)(font_info->min_bounds.lbearing),
|
||||
(float)(font_info->max_bounds.descent),
|
||||
(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);
|
||||
|
|
|
@ -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.descent,
|
||||
-base->max_bounds.descent,
|
||||
base->max_bounds.rbearing - base->max_bounds.lbearing,
|
||||
base->max_bounds.ascent + base->max_bounds.descent);
|
||||
isFixedPitch = XGFontIsFixedPitch(dpy, base);
|
||||
|
|
Loading…
Reference in a new issue