This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How to change default font weight ?

  • 12 respostas
  • 1 has this problem
  • 2 views
  • Last reply by jayaura

more options

I would like to use Roboto Medium as my default font for firefox, but I am unable to select select a different font weight. I am on Linux. In Gnome settings, under Roboto, I can choose various weights like Light, Medium, etc., but not in Firefox. It take the default normal weight. Is there an advanced configuration where I can change it ?

I would like to use Roboto Medium as my default font for firefox, but I am unable to select select a different font weight. I am on Linux. In Gnome settings, under Roboto, I can choose various weights like Light, Medium, etc., but not in Firefox. It take the default normal weight. Is there an advanced configuration where I can change it ?

Chosen solution

Hi jayaura, userChrome.css is for the browser "chrome" (user interface area). To modify web pages, you can create a file named userContent.css in the same folder.

Alternately, you can use the Stylus extension, which is a bit easier because you can preview changes in real time rather than having to restart Firefox.

https://addons.mozilla.org/firefox/addon/styl-us/

Or you could look for extensions that are specific to fonts on websites with a more convenient interface.

Ler a resposta no contexto 👍 1

All Replies (12)

more options

Hello, you can change the font and colors directly from the advanced settings of Mozilla Firefox. You can do this by going from the menu, options and going in general. you should solve your problem. See you soon.

more options

Hi, you get what is there if it is there : https://support.mozilla.org/en-US/kb/change-fonts-and-colors-websites-use

Please let us know if this solved your issue or if need further assistance.

more options

Thank you MattiaN and Pkshadow for your response, but sadly my problem is not solved. Please see the attached screenshots. As you can see in the advanced settings, Roboto Medium is not listed. If you are on Linux, you can easily check out this font, as its available in the reposities for most distros.

You may compare it to how other font selection dialog boxes deal with it. The other screenshot is from openbox configuration.

Can I manually change the font configuration like I can do with GTK3 by editing its $(XDG_CONFIG_HOME}/gtk-3.0/settings.ini and then by adding "gtk-font-name=Roboto Medium 12"

jayaura modificouno o

more options

Knock Knock

Basically I'd like firefox to support "Font Styles". I hope thats the right term for this ?

more options

Hi jayaura, I don't know how Firefox selects the font file for the "normal" weight. Could you try manually overriding the font file name and see whether it works:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.

(2) In the search box above the list, type or paste west and pause while the list is filtered

Firefox should list all of the fonts assigned for "Latin" character sets.

(3) Double-click the font.name-list.serif.x-western preference to display a dialog where you can edit the font name, then click OK

Does that work? If things bring, right-click > Reset the preference.


Support volunteers are limited in what we can do: we work with existing settings, add-ons, and workarounds; we can't change Firefox itself. To submit feature suggestions, you could use one or more of the following (depending on whether you want a suggestion box or a discussion):

jscher2000 - Support Volunteer modificouno o

more options

You probably need to use code in userChrome.css to set the font-family and the font-weight. You need to set the correct font-weight to make Firefox use a specific font (not sure if bolder would work here).

more options

jscher2000 said

Hi jayaura, I don't know how Firefox selects the font file for the "normal" weight. Could you try manually overriding the font file name and see whether it works: (1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk. (2) In the search box above the list, type or paste west and pause while the list is filtered Firefox should list all of the fonts assigned for "Latin" character sets. (3) Double-click the font.name-list.serif.x-western preference to display a dialog where you can edit the font name, then click OK Does that work? If things bring, right-click > Reset the preference.

Support volunteers are limited in what we can do: we work with existing settings, add-ons, and workarounds; we can't change Firefox itself. To submit feature suggestions, you could use one or more of the following (depending on whether you want a suggestion box or a discussion):

Sadly it didnt work. I tried "Roboto Medium" and "Roboto\ Medium" as well

more options

cor-el said

You probably need to use code in userChrome.css to set the font-family and the font-weight. You need to set the correct font-weight to make Firefox use a specific font (not sure if bolder would work here).

Thanks for the pointer, I have the following in my ~/.mozilla/chrome/userChrome.css:

   @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
   /* Global UI font */
   * { font-size: 30pt !important;
     font-family: Verdana !important;
   }

I put 30pt to spot easily visible difference. Looks like these settings are not being respected. Is there something I'm doing wrong ?

more options

You need to create the chrome folder in the profile folder and place userChrome.css in this folder.

You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

more options

cor-el said

You need to create the chrome folder in the profile folder and place userChrome.css in this folder. You can use the button on the "Help -> Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page.

Thank for the detailed info! However, the settings in userChrome.css is only affecting Firefox's own interface, and not the web pages. In the screen shot, I globally set the font family to a monospaced font (same lines from the previous post from me). But its not reflected in phoronix.com, which respects Firefox font setting.

more options

Chosen Solution

Hi jayaura, userChrome.css is for the browser "chrome" (user interface area). To modify web pages, you can create a file named userContent.css in the same folder.

Alternately, you can use the Stylus extension, which is a bit easier because you can preview changes in real time rather than having to restart Firefox.

https://addons.mozilla.org/firefox/addon/styl-us/

Or you could look for extensions that are specific to fonts on websites with a more convenient interface.

more options

Thank you so much! Stylus extension worked for me!

jayaura modificouno o