Bug 1627691 - Don't include 'hidden' system fonts when preloading metadata to support the font-selection algorithm. r=jwatt

Differential Revision: https://phabricator.services.mozilla.com/D70216

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jonathan Kew 2020-04-09 09:30:40 +00:00
parent 33bc5f92db
commit b50822cb39

View File

@ -1862,12 +1862,17 @@ void gfxPlatformFontList::GetFontFamilyNames(
fontlist::FontList* list = SharedFontList();
const fontlist::Family* families = list->Families();
for (uint32_t i = 0, n = list->NumFamilies(); i < n; i++) {
aFontFamilyNames.AppendElement(families[i].DisplayName().AsString(list));
const fontlist::Family& family = families[i];
if (!family.IsHidden()) {
aFontFamilyNames.AppendElement(family.DisplayName().AsString(list));
}
}
} else {
for (auto iter = mFontFamilies.Iter(); !iter.Done(); iter.Next()) {
RefPtr<gfxFontFamily>& family = iter.Data();
aFontFamilyNames.AppendElement(family->Name());
if (!family->IsHidden()) {
aFontFamilyNames.AppendElement(family->Name());
}
}
}
}
@ -1939,9 +1944,6 @@ bool gfxPlatformFontList::LoadFontInfo() {
if (!family) {
continue;
}
if (family->IsHidden()) {
continue;
}
ReadFaceNamesForFamily(family, NeedFullnamePostscriptNames());
} else {
// lookup in canonical (i.e. English) family name list