forked from mirrors/gecko-dev
Bug 1881993 - Allow use of important fonts through FontVisibilityLangPack. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D209589
This commit is contained in:
parent
727dac89a3
commit
dd464427ad
2 changed files with 14 additions and 0 deletions
|
|
@ -193,4 +193,10 @@ static const char* kBaseFonts_Android12_Higher[] = {
|
|||
"Noto Serif Yezidi",
|
||||
"Source Sans Pro",
|
||||
"Source Sans Pro SemiBold"
|
||||
};
|
||||
|
||||
// Additional manufacturer font families that are important for usability.
|
||||
// Set as langpack to allow use through FontVisibilityLangPack
|
||||
static const char* kLangPack_MFR_Android12_Higher[] = {
|
||||
"One UI Sans KR VF"
|
||||
};
|
||||
|
|
@ -978,6 +978,7 @@ gfxFT2FontList::gfxFT2FontList() : mJarModifiedTime(0) {
|
|||
CheckFamilyList(kBaseFonts_Android9_Higher);
|
||||
CheckFamilyList(kBaseFonts_Android9_11);
|
||||
CheckFamilyList(kBaseFonts_Android12_Higher);
|
||||
CheckFamilyList(kLangPack_MFR_Android12_Higher);
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
|
||||
if (obs) {
|
||||
|
|
@ -1315,6 +1316,10 @@ FontVisibility gfxFT2FontList::GetVisibilityForFamily(
|
|||
if (FamilyInList(aName, kBaseFonts_Android12_Higher)) {
|
||||
return FontVisibility::Base;
|
||||
}
|
||||
|
||||
if (FamilyInList(aName, kLangPack_MFR_Android12_Higher)) {
|
||||
return FontVisibility::LangPack;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1364,6 +1369,9 @@ gfxFT2FontList::GetFilteredPlatformFontLists() {
|
|||
fontLists.AppendElement(
|
||||
std::make_pair(kBaseFonts_Android12_Higher,
|
||||
ArrayLength(kBaseFonts_Android12_Higher)));
|
||||
fontLists.AppendElement(
|
||||
std::make_pair(kLangPack_MFR_Android12_Higher,
|
||||
ArrayLength(kLangPack_MFR_Android12_Higher)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue