Handle the minimum font size being changed to 0 correctly. Bug 327054, r+sr=roc

This commit is contained in:
bzbarsky%mit.edu 2006-08-08 16:43:20 +00:00
parent c0fca2db20
commit 3c2930f20a

View File

@ -347,13 +347,11 @@ nsPresContext::GetFontPreferences()
pref.Append(langGroup);
PRInt32 size = nsContentUtils::GetIntPref(pref.get());
if (size > 0) {
if (unit == eUnit_px) {
mMinimumFontSize = NSFloatPixelsToTwips((float)size, p2t);
}
else if (unit == eUnit_pt) {
mMinimumFontSize = NSIntPointsToTwips(size);
}
if (unit == eUnit_px) {
mMinimumFontSize = NSFloatPixelsToTwips((float)size, p2t);
}
else if (unit == eUnit_pt) {
mMinimumFontSize = NSIntPointsToTwips(size);
}
// get attributes specific to each generic font