Fix bug 11168. Underline position metrics are returned as positive
numbers by X, but Mozilla wants them to be negative. This caused problems only for certain font servers (those that returned underline position metrics). r=pavlov git-svn-id: svn://10.0.0.236/trunk@57499 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -485,8 +485,9 @@ void nsFontMetricsGTK::RealizeFont()
|
||||
|
||||
if (::XGetFontProperty(fontInfo, XA_UNDERLINE_POSITION, &pr))
|
||||
{
|
||||
/* this will only be provided from adobe .afm fonts */
|
||||
mUnderlineOffset = NSToIntRound(pr * f);
|
||||
/* this will only be provided from adobe .afm fonts and TrueType
|
||||
* fonts served by xfsft (not xfstt!) */
|
||||
mUnderlineOffset = -NSToIntRound(pr * f);
|
||||
#ifdef REALLY_NOISY_FONTS
|
||||
printf("underlineOffset=%d\n", mUnderlineOffset);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user