[NOT PART OF THE DEFAULT BUILD]. Applied a patch of Shyjan Mahamud to return the bounding metrics in a uniform XP manner (bug 19024).

This commit is contained in:
rbs%maths.uq.edu.au 1999-12-10 13:17:03 +00:00
parent 97d27d7b0c
commit f6490aa71a
2 changed files with 5 additions and 0 deletions

View File

@ -2398,6 +2398,8 @@ nsFontMetricsGTK::GetBoundingMetrics (nsFontGTK* aFont,
&aBoundingMetrics.width,
&aBoundingMetrics.ascent,
&aBoundingMetrics.descent);
// flip sign of descent for cross-platform compatibility
aBoundingMetrics.descent = -aBoundingMetrics.descent;
// get italic correction
XFontStruct *fontInfo = (XFontStruct *) GDK_FONT_XFONT (aFont->mFont);
unsigned long pr = 0;

View File

@ -1623,6 +1623,9 @@ nsRenderingContextGTK::GetBoundingMetrics(const char* aString,
&aBoundingMetrics.width,
&aBoundingMetrics.ascent,
&aBoundingMetrics.descent);
// flip sign of descent for cross-platform compatibility
aBoundingMetrics.descent = -aBoundingMetrics.descent;
aBoundingMetrics.leftBearing = NSToCoordRound(aBoundingMetrics.leftBearing * mP2T);
aBoundingMetrics.rightBearing = NSToCoordRound(aBoundingMetrics.rightBearing * mP2T);
aBoundingMetrics.width = NSToCoordRound(aBoundingMetrics.width * mP2T);