Skip to content
Snippets Groups Projects
Verified Commit 36ef214d authored by Jonathan Kew's avatar Jonathan Kew Committed by Pier Angelo Vendrame
Browse files

Bug 1792157 - Ensure correct font-visibility for bundled fonts on Linux when...

Bug 1792157 - Ensure correct font-visibility for bundled fonts on Linux when they 'shadow' system-installed families. r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D175350
parent 4e7b4149
Branches
Tags
1 merge request!653Bug 41795: Rebased alpha to 102.12
......@@ -1869,17 +1869,19 @@ void gfxFcPlatformFontList::InitSharedFontListForPlatform() {
}
};
// iterate over available fonts
FcFontSet* systemFonts = FcConfigGetFonts(nullptr, FcSetSystem);
addFontSetFamilies(systemFonts, policy.get(), /* aAppFonts = */ false);
#ifdef MOZ_BUNDLED_FONTS
// Add bundled fonts before system fonts, to set correct visibility status
// for any families that appear in both.
if (StaticPrefs::gfx_bundled_fonts_activate_AtStartup() != 0) {
FcFontSet* appFonts = FcConfigGetFonts(nullptr, FcSetApplication);
addFontSetFamilies(appFonts, policy.get(), /* aAppFonts = */ true);
}
#endif
// iterate over available fonts
FcFontSet* systemFonts = FcConfigGetFonts(nullptr, FcSetSystem);
addFontSetFamilies(systemFonts, policy.get(), /* aAppFonts = */ false);
mozilla::fontlist::FontList* list = SharedFontList();
list->SetFamilyNames(families);
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment