fix bug 84668. r=shanjian sr=alecf

on simplfied chinese window. force any return value of
system font size < 9 to be at least 9 because we know
the glyph less than 9 look very very ugly on SimpChinese system
This commit is contained in:
ftang%netscape.com 2002-06-05 00:41:04 +00:00
Родитель c4f5647a9f
Коммит 610b21f7d9
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -498,6 +498,15 @@ nsresult nsDeviceContextWin :: GetSysFontInfo(HDC aHDC, nsSystemFontID anID, nsF
return NS_ERROR_FAILURE;
}
// we have problem on Simplified Chinese system because the system report
// the default font size is 8. but if we use 8, the text display very
// Ugly. force it to be at least 9 on that system (cp936)
if ((-9 < ptrLogFont->lfHeight) &&
(ptrLogFont->lfHeight < 9) &&
(936 == ::GetACP()))
ptrLogFont->lfHeight = (ptrLogFont->lfHeight > 0) ? 9 : -9;
return CopyLogFontToNSFont(&aHDC, ptrLogFont, aFont);
}