morgan pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits: 0da1a95a by Pier Angelo Vendrame at 2024-09-16T17:33:11+00:00 squash! Bug 41043: Hardcode the UI font on Linux
Bug 43141: Hardcode system-ui to Arimo.
- - - - -
2 changed files:
- gfx/thebes/gfxPlatformFontList.cpp - layout/base/nsLayoutUtils.cpp
Changes:
===================================== gfx/thebes/gfxPlatformFontList.cpp ===================================== @@ -2055,6 +2055,11 @@ static void GetSystemUIFontFamilies(const nsPresContext* aPresContext, #if defined(XP_MACOSX) || defined(MOZ_WIDGET_UIKIT) *aFamilies.AppendElement() = "-apple-system"_ns; return; +#elif defined(MOZ_WIDGET_GTK) + // tor-browser#43141: Hardcode Arimo in case our custom fontconfig is + // missing. + *aFamilies.AppendElement() = "Arimo"_ns; + return; #elif !defined(MOZ_WIDGET_ANDROID) *aFamilies.AppendElement() = "sans-serif"_ns; return;
===================================== layout/base/nsLayoutUtils.cpp ===================================== @@ -9720,7 +9720,9 @@ static void GetSpoofedSystemFontForRFP(LookAndFeel::FontID aFontID, // In general, Linux uses some sans-serif, but its size can vary between // 12px and 16px. We chose 15px because it is what Firefox is doing for the // UI font-size. - aName = u"sans-serif"_ns; + // tor-browser#43141: Hardcode Arimo in case our custom fontconfig is + // missing. + aName = u"Arimo"_ns; aStyle.size = 15; #else # error "Unknown platform"
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/0da1a95a...
tor-commits@lists.torproject.org