Check the UseDocFont Pref setting
before calling the font download
r=shanjian; /sr=brendan
This commit is contained in:
yokoyama%netscape.com 2001-11-21 23:30:36 +00:00
Родитель b4ada86403
Коммит 35d9dcf437
1 изменённых файлов: 8 добавлений и 4 удалений

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

@ -451,10 +451,14 @@ nsFontMetricsWin::Init(const nsFont& aFont, nsIAtom* aLangGroup,
mLangGroup = aLangGroup;
// do special checking for the following lang group
CheckFontLangGroup(mLangGroup, gJA, "ja", gHitJACase, gCheckJAFont, gHaveJAFont);
CheckFontLangGroup(mLangGroup, gKO, "ko", gHitKOCase, gCheckKOFont, gHaveKOFont);
CheckFontLangGroup(mLangGroup, gZHTW, "zh-TW", gHitZHTWCase, gCheckZHTWFont, gHaveZHTWFont);
CheckFontLangGroup(mLangGroup, gZHCN, "zh-CN", gHitZHCNCase, gCheckZHCNFont, gHaveZHCNFont);
// * use fonts?
PRInt32 useDccFonts = 0;
if (NS_SUCCEEDED(gPref->GetIntPref("browser.display.use_document_fonts", &useDccFonts)) && (useDccFonts != 0)) {
CheckFontLangGroup(mLangGroup, gJA, "ja", gHitJACase, gCheckJAFont, gHaveJAFont);
CheckFontLangGroup(mLangGroup, gKO, "ko", gHitKOCase, gCheckKOFont, gHaveKOFont);
CheckFontLangGroup(mLangGroup, gZHTW, "zh-TW", gHitZHTWCase, gCheckZHTWFont, gHaveZHTWFont);
CheckFontLangGroup(mLangGroup, gZHCN, "zh-CN", gHitZHCNCase, gCheckZHCNFont, gHaveZHCNFont);
}
//don't addref this to avoid circular refs
mDeviceContext = (nsDeviceContextWin *)aContext;