How to change default font weight ?
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 ?
Избрано решение
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.
Прочетете този отговор в контекста 👍 1Всички отговори (12)
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.
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.
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"
Променено на
Knock Knock
Basically I'd like firefox to support "Font Styles". I hope thats the right term for this ?
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):
- Feedback: https://qsurvey.mozilla.com/s3/FirefoxInput/
- Reddit: https://www.reddit.com/r/firefox/
- Twitter: https://twitter.com/firefox
- Facebook: https://www.facebook.com/Firefox
Променено на
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).
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):
- Feedback: https://qsurvey.mozilla.com/s3/FirefoxInput/
- Reddit: https://www.reddit.com/r/firefox/
- Twitter: https://twitter.com/firefox
- Facebook: https://www.facebook.com/Firefox
Sadly it didnt work. I tried "Roboto Medium" and "Roboto\ Medium" as well
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 ?
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.
- Help -> Troubleshooting Information -> Profile Directory:
Windows: Show Folder; Linux: Open Directory; Mac: Show in Finder - http://kb.mozillazine.org/Profile_folder_-_Firefox
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.
- Help -> Troubleshooting Information -> Profile Directory:
Windows: Show Folder; Linux: Open Directory; Mac: Show in Finder- http://kb.mozillazine.org/Profile_folder_-_Firefox
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.
Избрано решение
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.
Thank you so much! Stylus extension worked for me!
Променено на