Closed Bug 1822208 Opened 3 years ago Closed 2 years ago

Firefox Doesn't Implement System Font Changes

Categories

(Core :: Layout: Text and Fonts, defect)

Firefox 110
defect

Tracking

()

RESOLVED DUPLICATE of bug 1716433

People

(Reporter: ceplaw, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0

Steps to reproduce:

Windows 11, brand new computer. Installed Firefox 110 (now up to 110.0.1, same behavior). In Windows settings, changed the System Font to a different font. In Firefox settings AND in Thunderbird (108) settings, changed all of the fonts.

Actual results:

In Thunderbird (and even in Microsoft Office!), the menus, submenus, dialog boxes, tab labels, etc. are all in the newly-chosen, non-SegoeUI font. Thus, I know that one or both of these changes work in theory.

In Firefox, however, everything is remaining in SegoeUI, the as-shipped system font.

Expected results:

Firefox's menus (etc.) should have adopted/adapted to the newly-selected system font. Just like other programs did — to the point, Thunderbird in particular. Readibility is suffering rather badly (SegoeUI, in technical terms, <i>sucks</i> — especially when trying to decipher tab labels that, because they're from non-default-character-set sites, include diacritical marks or non-Roman characters).

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core

The severity field is not set for this bug.
:jwatt, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwatt)

(In reply to CEP from comment #0)

Windows 11, brand new computer. Installed Firefox 110 (now up to 110.0.1, same behavior). In Windows settings, changed the System Font to a different font.

Just to be sure we're following the same steps as you -- could you clarify how you did this? In particular, what specifically did you do, to change the Windows system font? (Some googling turned up e.g. https://www.howtogeek.com/825257/how-to-change-the-default-system-font-on-windows-11/ which involves creating a .reg file that appears to set up a font-substitute to remap Segoe UI to some other font -- is that the procedure you followed, or did you do something else?)

(I haven't actually tested this yet, since I don't want to unnecessarily mess with my Windows registry, but I'll do so after I hear back from you if this is the procedure that you followed.)

Also, for what it's worth -- it looks like our internal styling uses font: message-box (which is a special system font name that Firefox recognizes and maps to a platform-specific font). So e.g. the following should work as a testcase here, probably:

data:text/html,<html style="font:message-box; font-size: 30px">abc
Flags: needinfo?(ceplaw)

FWIW, I've now followed the steps from the howtogeek guide in comment 3 in a Windows 11 VM (using "Segoe Script" as my replacement font since it's cursive and extremely-obvious / hard-to-read in UI).

After the reboot at the end of the steps there, I confirmed that this changed the font for all text shown on the desktop and in the content area of the file-browser, as well as e.g. the title above the tiny-app-screenshot when I hover icons in the taskbar for currently-running programs.

However: the font change doesn't take effect for tons of apps -- Firefox, Thunderbird, Edge, Visual Studio, the official Windows Settings app, etc. Also, no menus change their font for me as far as I can tell; e.g. the system desktop context-menu, and menus/context-menus in all the aforementioned apps. So I'm seeing results that are quite different from what you described. What am I missing? (Perhaps you changed the system font using a different / more-thorough technique?)

(You did mention doing some additional "changed all the fonts" step in Firefox/Thunderbird; if that was just the "Fonts/Advanced" button in Firefox/Thunderbird preferences, then I think that only changes the font for content -- not for the Firefox/Thunderbird's UI itself. I just confirmed that for myself locally.)

I'm starting with a fresh Windows 11 VM from https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/ , running in VirtualBox 7, for what it's worth.

Flags: needinfo?(jwatt)

https://support.mozilla.org/en-US/questions/1335097 might be of use to you too, for what it's worth.

(essentially: if you set about:config pref toolkit.legacyUserProfileCustomizations.stylesheets to true, then you can create a file chrome/userChrome.css inside of your Firefox profile folder, with arbitrary CSS customizations. E.g. if I create that chrome folder in my profile, and create a new file userChrome.css in that folder which just contains * { font-family:monospace !important } there, then all of the Firefox UI renders with my default monospace font. This might be the tool you're looking for? Though also: if you really have found some unrelated way to change the system font in a way that other apps respect but Firefox does not, it'd be good to know more about it.)

(Been away for a few days, responding all at once)

3,4: I followed the HowToGeek "recipe" attempting to replace SegoeUI with Verdana. (Not my first choice, but it's workable AND includes readable nonkeyboard characters and clear number/letter distinctions i/l/1 and O/0, that last being one of the problems with the entire Segoe family.) What bugs me is that it did work with Thunderbird, but not with Firefox. I can accept M$'s arrogant refusal to allow their own programs to follow a user choice that is inherent in/made possible by their own operating system (because, as is well known, M$'s user interfaces are sheer perfection and require no adjustments), but different behavior from programs from the same provider, in the same environment, seems a bit off kilter.

5: I'm hesitant to rely upon userChrome; my machine already relies on it for a lot (like putting the tabs where they belong, right under the address bar), and every time in the past I've tried to use it to do anything other than move parts around the screen the next update has come along and killed it. That specifically includes two attempts to change the UI typeface on Windows 10 machines (although not this one). Then there's the whole "rely on legacy features when the developers are doing their very best to kill everything that's legacy" problem — for both good and bad reasons; it's turning back the tide to oppose it regardless.
Once I get a readable font, I'm going to be stuck relying upon userChrome to deal with the insanely excessive leding (space between lines), which would be entirely unnecessary if the font used was a readable one... which comes back around to the subject of my request.

Flags: needinfo?(ceplaw)

(In reply to CEP from comment #6)

(Been away for a few days, responding all at once)

3,4: I followed the HowToGeek "recipe" attempting to replace SegoeUI with Verdana. [...] What bugs me is that it did work with Thunderbird, but not with Firefox [...] different behavior from programs from the same provider, in the same environment, seems a bit off kilter.

So, I'm not seeing what you're seeing -- for me, when I do the HowToGeek registry font-change (with Verdana now), Thunderbird continues to use Segoe UI as its font in menus, tab titles, preferences page, etc.

So I'm wondering if perhaps the Thunderbird user-visible change was from some other customization that you made? (Maybe you could retry the registry change but with a different font [just as an experiment]), and see if Thunderbird picks up the new font that you choose?

It would also help if you could attach a screenshot of how thunderbird looks, maybe e.g. showing Tools|Settings to avoid showing your email inbox :) and to pick up a substantial amount of UI to see what fonts are being used where.

Also -- you mentioned you were using Thunderbird v108 -- was that the beta version, and are you still on v108?

I'm a little confused about that version, since:

  • The latest official Thunderbird release is 102 (that's what I've been testing up until now)
  • At the time you filed this bug, the latest Thunderbird beta release was v111 (3 versions newer than 108)

Do you know how/why you were using a 108 version? If you're still on v108 today, does Thunderbird offer you updates if you choose Help|About? (you may have to press Alt for the menubar with Help menu to show up).

(I meant to mention -- I did now try the latest Thunderbird beta, which is currently v113, and I'm still not seeing it use anything other than Segoe UI after following the HowToGeek font-change and also tweaking the "Default Font" and "HTML Style | Font" in Thunderbird preferences.)

Aha, I think I found the thing you're looking for. Try visiting about:config, setting gfx.windows-font-substitutes.always to true, and restarting Firefox.

For me, that makes the new font show up in Firefox.

(I'm guessing that somehow that about:config flag is toggled in your Thunderbird installation, or maybe your Thunderbird build is in fact older [if "108" was a typo] and predates the need for this change? In any case: this does seem to be the preference to toggle this behavior in current Firefox builds.)

See bug 1716433 comment 2 for a brief note about why this isn't just the default behavior. Assuming the pref-flip fixes the issue for you, I think we can mark this as a duplicate of that bug, basically.

(setting needinfo=reporter to confirm whether the pref-flip in comment 10 fixes the issue for them)

Flags: needinfo?(ceplaw)

I will try this later tonight, I can't close Firefox right now to restart it because there's a software download going...

And yes, that was a typo on the Tbird version, it should have been 102(.10.0 now). I'm also struggling with a new keyboard on a new laptop, that for some reason seems to have different keypress resistance on the top row.

Flags: needinfo?(ceplaw)

Also as to Tbird: To my knowledge, this install/profile has never accessed about:config (I've only used that in Firefox); if there was a change, it was done by something else. A Tbird 102-series install on a different machine using a different profile behaves by substituting the font, so perhaps something in the 102-series build has already toggled that setting? Which, frankly, would be a good thing.

Again, it's the unexplained inconsistency between/among products that bugs me. (And the arrogance of the SegoeUI font designer, but that's definitely not something Mozilla has any control over...)

Setting (via about:config)
gfx.windows-font-substitutes.always
to
true

has seemed to work, at least in this session. The fun will be watching what happens with the next Firefox update — there's a history of unpredictable forced-reversion-to-default of about:config manually-made changes...

Which leads to the question of why this (and related) "settings" are not accessible in the Settings | General | Fonts | Advanced panel, when that panel DOES have a setting to allow webpages to select their own fonts instead of the user's ordinary preferences. Again, it's the inconsistency that's a bit bothersome.

(In reply to CEP from comment #14)

Setting (via about:config)
gfx.windows-font-substitutes.always
to
true

has seemed to work, at least in this session.

Thanks! I'm glad to hear it. I'll close this as a duplicate of bug 1716433 (which added that about:config preference). I think that's the switch to activate the behavior that you're looking for.

The fun will be watching what happens with the next Firefox update — there's a history of unpredictable forced-reversion-to-default of about:config manually-made changes...

I'd be surprised if that happens here. If it does, feel free to file another bug with any details you can provide.

Which leads to the question of why this (and related) "settings" are not accessible in the Settings | General | Fonts | Advanced panel, when that panel DOES have a setting to allow webpages to select their own fonts instead of the user's ordinary preferences. Again, it's the inconsistency that's a bit bothersome.

I suspect it's not something that the folks who mange Firefox's preferences UI would be in favor of exposing there, given the fact that this setting doesn't do much in terms of producing useful outcomes unless you've taken additional steps to manually edit the Windows registry.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1716433
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.