mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
[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:
parent
97d27d7b0c
commit
f6490aa71a
@ -2398,6 +2398,8 @@ nsFontMetricsGTK::GetBoundingMetrics (nsFontGTK* aFont,
|
|||||||
&aBoundingMetrics.width,
|
&aBoundingMetrics.width,
|
||||||
&aBoundingMetrics.ascent,
|
&aBoundingMetrics.ascent,
|
||||||
&aBoundingMetrics.descent);
|
&aBoundingMetrics.descent);
|
||||||
|
// flip sign of descent for cross-platform compatibility
|
||||||
|
aBoundingMetrics.descent = -aBoundingMetrics.descent;
|
||||||
// get italic correction
|
// get italic correction
|
||||||
XFontStruct *fontInfo = (XFontStruct *) GDK_FONT_XFONT (aFont->mFont);
|
XFontStruct *fontInfo = (XFontStruct *) GDK_FONT_XFONT (aFont->mFont);
|
||||||
unsigned long pr = 0;
|
unsigned long pr = 0;
|
||||||
|
@ -1623,6 +1623,9 @@ nsRenderingContextGTK::GetBoundingMetrics(const char* aString,
|
|||||||
&aBoundingMetrics.width,
|
&aBoundingMetrics.width,
|
||||||
&aBoundingMetrics.ascent,
|
&aBoundingMetrics.ascent,
|
||||||
&aBoundingMetrics.descent);
|
&aBoundingMetrics.descent);
|
||||||
|
// flip sign of descent for cross-platform compatibility
|
||||||
|
aBoundingMetrics.descent = -aBoundingMetrics.descent;
|
||||||
|
|
||||||
aBoundingMetrics.leftBearing = NSToCoordRound(aBoundingMetrics.leftBearing * mP2T);
|
aBoundingMetrics.leftBearing = NSToCoordRound(aBoundingMetrics.leftBearing * mP2T);
|
||||||
aBoundingMetrics.rightBearing = NSToCoordRound(aBoundingMetrics.rightBearing * mP2T);
|
aBoundingMetrics.rightBearing = NSToCoordRound(aBoundingMetrics.rightBearing * mP2T);
|
||||||
aBoundingMetrics.width = NSToCoordRound(aBoundingMetrics.width * mP2T);
|
aBoundingMetrics.width = NSToCoordRound(aBoundingMetrics.width * mP2T);
|
||||||
|
Loading…
Reference in New Issue
Block a user