зеркало из https://github.com/mozilla/pjs.git
Bug 409342. Handle pref lang array correctly. r+sr=pavlov
This commit is contained in:
Родитель
12b558376a
Коммит
ca2c197665
|
@ -702,16 +702,17 @@ gfxAtsuiFontGroup::WhichPrefFontSupportsChar(PRUint32 aCh)
|
||||||
|
|
||||||
for (i = 0; i < numLangs; i++) {
|
for (i = 0; i < numLangs; i++) {
|
||||||
nsAutoTArray<nsRefPtr<MacOSFamilyEntry>, 5> families;
|
nsAutoTArray<nsRefPtr<MacOSFamilyEntry>, 5> families;
|
||||||
|
eFontPrefLang currentLang = prefLangs[i];
|
||||||
|
|
||||||
gfxQuartzFontCache *fc = gfxQuartzFontCache::SharedFontCache();
|
gfxQuartzFontCache *fc = gfxQuartzFontCache::SharedFontCache();
|
||||||
|
|
||||||
// get the pref families for a single pref lang
|
// get the pref families for a single pref lang
|
||||||
if (!fc->GetPrefFontFamilyEntries(charLang, &families)) {
|
if (!fc->GetPrefFontFamilyEntries(currentLang, &families)) {
|
||||||
eFontPrefLang prefLangs[1] = { charLang };
|
eFontPrefLang prefLangsToSearch[1] = { currentLang };
|
||||||
PrefFontCallbackData prefFontData(families);
|
PrefFontCallbackData prefFontData(families);
|
||||||
gfxPlatform::ForEachPrefFont(prefLangs, 1, PrefFontCallbackData::AddFontFamilyEntry,
|
gfxPlatform::ForEachPrefFont(prefLangsToSearch, 1, PrefFontCallbackData::AddFontFamilyEntry,
|
||||||
&prefFontData);
|
&prefFontData);
|
||||||
fc->SetPrefFontFamilyEntries(charLang, families);
|
fc->SetPrefFontFamilyEntries(currentLang, families);
|
||||||
}
|
}
|
||||||
|
|
||||||
// find the first pref font that includes the character
|
// find the first pref font that includes the character
|
||||||
|
|
|
@ -391,7 +391,7 @@ gfxPlatform::GetPrefLangName(eFontPrefLang aLang)
|
||||||
|
|
||||||
const PRUint32 kFontPrefLangCJKMask = (1 << (PRUint32) eFontPrefLang_Japanese) | (1 << (PRUint32) eFontPrefLang_ChineseTW)
|
const PRUint32 kFontPrefLangCJKMask = (1 << (PRUint32) eFontPrefLang_Japanese) | (1 << (PRUint32) eFontPrefLang_ChineseTW)
|
||||||
| (1 << (PRUint32) eFontPrefLang_ChineseCN) | (1 << (PRUint32) eFontPrefLang_ChineseHK)
|
| (1 << (PRUint32) eFontPrefLang_ChineseCN) | (1 << (PRUint32) eFontPrefLang_ChineseHK)
|
||||||
| (1 << (PRUint32) eFontPrefLang_Korean);
|
| (1 << (PRUint32) eFontPrefLang_Korean) | (1 << (PRUint32) eFontPrefLang_CJKSet);
|
||||||
PRBool
|
PRBool
|
||||||
gfxPlatform::IsLangCJK(eFontPrefLang aLang)
|
gfxPlatform::IsLangCJK(eFontPrefLang aLang)
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче