[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-91.4.0esr-11.5-1] Bug 1745715 - Process app-bundled fonts before system fonts when initializing the font list, to ensure their families get the expected Base visibility level. r=emilio
commit 6ebf4b5c74896f0d30c061d6c61e98586ff2ca79
Author: Jonathan Kew <jkew@xxxxxxxxxxx>
Date: Mon Dec 13 20:09:36 2021 +0000
Bug 1745715 - Process app-bundled fonts before system fonts when initializing the font list, to ensure their families get the expected Base visibility level. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133667
---
gfx/thebes/gfxFcPlatformFontList.cpp | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/gfx/thebes/gfxFcPlatformFontList.cpp b/gfx/thebes/gfxFcPlatformFontList.cpp
index 41a305c537c4..3b6029bd4353 100644
--- a/gfx/thebes/gfxFcPlatformFontList.cpp
+++ b/gfx/thebes/gfxFcPlatformFontList.cpp
@@ -1524,17 +1524,21 @@ nsresult gfxFcPlatformFontList::InitFontListForPlatform() {
}
#endif
- // iterate over available fonts
- FcFontSet* systemFonts = FcConfigGetFonts(nullptr, FcSetSystem);
- AddFontSetFamilies(systemFonts, policy.get(), /* aAppFonts = */ false);
-
#ifdef MOZ_BUNDLED_FONTS
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1745715:
+ // It's important to do this *before* processing the standard system fonts,
+ // so that if a family is present in both font sets, we'll treat it as app-
+ // bundled and therefore always visible.
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);
+
return NS_OK;
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits