I installed Ubuntu 18.04, and I want to customize the fonts. I have already change all the setting by tweak tool. But the system default font not be changed, is anything I need to do?
1 Answers
The font for the texts highlighted in the screenshots you've posted is dictated by the GNOME shell theme.
Since generally it's not a good idea to edit system files (any update of an associated package will most probably overwrite it), you may create a custom css override in your home directory and load it from there. To do that, follow the steps below.
- Create a directory, say
MyThemein~/.themes. (You may create~/.themesif it doesn't exist.) - Create another directory inside
MyThemecalledgnome-shell. - Create an empty document in this
gnome-shelldirectory and name itgnome-shell.css. Open this
gnome-shell.cssfile with a text editor and add the following lines@import url("/usr/share/gnome-shell/theme/ubuntu.css"); stage { font-family: FONT_NAME, Sans-Serif; }Change
FONT_NAMEto the font of your choice and save the file.Install the GNOME extension called the User themes from here.
Install (GNOME) Tweaks by running
sudo apt install gnome-tweak-toolLaunch Tweaks and go to Appearance section. Click on the drop-down box next to "Shell theme". MyTheme should appear in the drop-down list. Select it.
Restart GNOME shell by pressing alt+f2 then typing
rand hitting enter (works in an Xorg session, in Wayland logout and login again).
- 67,112
- 21
- 233
- 243
-
2I do it step by step, and it success. Thank you so much, pomsky. It is useful to me, I learned a new function. – Pedro May 06 '18 at 12:33

