Skip to content
Snippets Groups Projects
Verified Commit a0b015c4 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 64ea04a6
Branches
Tags
1 merge request!624Bug 41163: Cherry-pick Moz's fix of Bug 1792157 and remove our workaround
......@@ -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