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
This commit is contained in:
dbaron%fas.harvard.edu 2000-01-12 02:24:46 +00:00
parent 54bd51b737
commit 8d42619583

View File

@ -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