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

git-svn-id: svn://10.0.0.236/trunk@55850 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rbs%maths.uq.edu.au 1999-12-10 13:17:03 +00:00
parent 7db2c3e16f
commit 3ba6bb1158
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);