mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
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:
parent
54bd51b737
commit
8d42619583
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user