Does Firefox get its UI font specs from the o/s, and if so, how to change?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

Does Firefox get its UI font specs from the o/s, and if so, how to change?

Post by ginahoy »

I got no response to this question over in the Mozilla forum. Hopefully someone here can help...

On my Linux machine, the Firefox user interface fonts (menus and bookmark labels) are larger than on my XP machine (both have same monitor model & resolution setting), so fewer bookmarks fit across the toolbar, pushing several onto the 'show more' flyout. Also, Linux Firefox uses a serif font, whereas XP Firefox use a sans-serif font. The FF versions are slightly different but I don't think that's what's going on here.

There's an about:config setting in FF that can be used to scale the fonts (layout.css.devPixelsPerPx) but it also scales the fonts in the content pane, which I don't want. In any case, that doesn't solve my desire to set a sans-serif font for Firefox.

I read elsewhere that FF gets its font spec from the o/s. If so, how do I make these modifications in Linux Mint (xfce)? interestingly, all my desktop fonts are sans-serif, so it seems odd that FF would use serif.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Does Firefox get its UI font specs from the o/s, and if so, how to change?

Post by AZgl1800 »

I don't know what where FF gets the specs, but the defaults are too small.
Even when I use preferences to set them to 16 pitch....

I use Control-key and the Mouse Wheel to enlarge them to 150%
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

Re: Does Firefox get its UI font specs from the o/s, and if so, how to change?

Post by ginahoy »

AZgl1500 wrote: Fri Mar 16, 2018 4:42 am Even when I use preferences to set them to 16 pitch....I use Control-key and the Mouse Wheel to enlarge them to 150%
Ctrl+wheel only affects the content pane. Ditto for font settings in Preferences (after all, font preferences are on the Content tab). My question is how to change font size for Firefox menus and bookmark labels.

One thing I just discovered, thanks to you, is that Preferences / Content / Default Font style DOES change the font style that Firefox uses for its menus and bookmark labels! I just changed to DejaVu Sans. Now if I can just figure out how to change the menu font size.
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Does Firefox get its UI font specs from the o/s, and if so, how to change?

Post by catweazel »

ginahoy wrote: Fri Mar 16, 2018 5:45 am My question is how to change font size for Firefox menus and bookmark labels.
https://addons.mozilla.org/en-US/firefo ... e-changer/
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

Re: Does Firefox get its UI font specs from the o/s, and if so, how to change?

Post by ginahoy »

Thanks. I just installed. When I click the icon, it opens a page with buttons to change Theme background color and Theme text color, but nothing else! The page displays a message about Firefox's new extension system and requests user to complete a survey. I'm running v55 so there shouldn't be any compatibility issues, but checking the reviews, most on the first page (most recent) are 1 star, so this add-on is clearly broken. Sigh.
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
aes2011
Level 4
Level 4
Posts: 498
Joined: Wed Jul 06, 2011 10:39 pm

Re: Does Firefox get its UI font specs from the o/s, and if so, how to change?

Post by aes2011 »

ginahoy wrote: Fri Mar 16, 2018 3:57 am
I read elsewhere that FF gets its font spec from the o/s. If so, how do I make these modifications in Linux Mint (xfce)?
Look at https://github.com/Aris-t2/CustomCSSforFx/releases/ for how to use userChrome.css.
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Does Firefox get its UI font specs from the o/s, and if so, how to change?

Post by Flemur »

You can change the firefox GUI fonts - in a user-hostile manner - by adding some css code to the file

Code: Select all

~/.mozilla/firefox/profile.default/chrome/userChrome.css
(you might have to create the file - it has some nonsense at the beginning**).

I put this in it:

Code: Select all

/* Change ALL the FF GUI fonts */
 *  {
    font-size:      10.5pt      !important;
    font-family:    sans        !important;     /* */
    font-weight:    bold        !important;     /* */
    }
**nonsense for userChrome.css:

Code: Select all

/** Do not remove the @namespace line -- it's required for correct functioning **/
/* set default namespace to XUL */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

Re: Does Firefox get its UI font specs from the o/s, and if so, how to change?

Post by ginahoy »

Thanks Flemur. I made changes to css many years ago (tabs on bottom) and ported that over from my XP Firefox profile, so this is not unfamiliar to me. Not sure why I didn't think of that. Thanks for the code!
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
ginahoy
Level 4
Level 4
Posts: 223
Joined: Sun May 28, 2017 3:15 pm

Re: [SOLVED] Does Firefox get its UI font specs from the o/s, and if so, how to change?

Post by ginahoy »

Does anyone know if there's a CSS statement that would adjust the bookmark container size on the Bookmark Menu bar?

With trial & error I adjusted the font size in UserChrome.css so that the same bookmarks appear across the Bookmarks Menu bar on both machines, but on the Linux machine, the font size required to accomplish that is too small. As it turns out, the maximum bookmark container width is larger with Linux FF than with XP FF, so containers with bookmark names that are too long to fit take up more horizontal space.

Also, the bookmark containers are about 20% taller. I have several folders on the Bookmarks Menu bar and this makes the drop-down list take more vertical space compared to XP FF. I have a folder with 30+ bookmarks and the drop-down list doesn't fit on the screen so it has the scroll arrows. On XP FF, that same folder drop-down only takes about 3/4ths of the screen. Not a big deal but it would be nice to be able to adjust the bookmark container dimensions in css.
Linux Mint 18.2 Xfce x64 | ASRock Z270 Extreme4 | Core i7 7700K | Cryorig H7 cooler| 32GB DDR4 2400| modded legacy Evercase LE4252 | EVGA 450W B3 | ADATA SX8200 Pro SSD
Locked

Return to “Xfce”