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

Forum rules
Before you post please read how to get help
Post Reply
ginahoy
Level 3
Level 3
Posts: 173
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 » Fri Mar 16, 2018 3:57 am

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 ginahoy on Sun Mar 18, 2018 1:23 am, edited 2 times in total.
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 | Samsung 850 EVO SSD

User avatar
AZgl1500
Level 9
Level 9
Posts: 2885
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 AZgl1500 » Fri Mar 16, 2018 4:42 am

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%

ginahoy
Level 3
Level 3
Posts: 173
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 » Fri Mar 16, 2018 5:45 am

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 | Samsung 850 EVO SSD

User avatar
catweazel
Level 17
Level 17
Posts: 7774
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 » Fri Mar 16, 2018 5:59 am

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/
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

ginahoy
Level 3
Level 3
Posts: 173
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 » Fri Mar 16, 2018 6:14 am

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 | Samsung 850 EVO SSD

aes2011
Level 5
Level 5
Posts: 504
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 » Fri Mar 16, 2018 6:52 am

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 16
Level 16
Posts: 6291
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 » Fri Mar 16, 2018 11:30 am

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?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

ginahoy
Level 3
Level 3
Posts: 173
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 » Fri Mar 16, 2018 3:49 pm

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 | Samsung 850 EVO SSD

ginahoy
Level 3
Level 3
Posts: 173
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 » Sun Mar 18, 2018 1:23 am

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 | Samsung 850 EVO SSD

Post Reply

Return to “Xfce”