Fonts
Tested on openSUSE
Recommended articles
n/a
Related articles
Fonts available in openSUSE
openSUSE contains many high-quality, free and open source fonts. An overview of already packaged fonts can be found on our fontinfo website:
https://fontinfo.opensuse.org/
Installed by default
Available in official repositories
Since there are so many fonts and they can use a lot of disk space, most fonts are not installed by default. In YaST Software Management, you can search "font" or browse "Font" category to find all available fonts in official repositories.
Available on openSUSE Build Service
M17N:fonts repository provides a larger collection of fonts. If you would like to try new fonts, add the repository manually and update.
Manage fonts
Find font files
- System fonts must be installed in the /usr/share/fonts/ directory. These fonts can be used by all users on the machine.
- Personal fonts are usually installed in ~/.local/share/fonts/ directory. Only the user themself can use it while other users cannot. NOTE: ~/.fonts/ is deprecated
Install fonts
If the font you want to install is provided by openSUSE online repositories, use YaST or zypper to install the package.
sudo zypper install lato-fonts
If you have font files (*.otf, *.ttf), click to open the files with the font installation application. In KDE, The Font Install tool shows preview text of the font, and there are two buttons: install as system font and install as personal font. Installing as personal font is recommended if other users do not need it. You can also simply copy font files to ~/.local/share/fonts folder.
Note: newly installed fonts are invisible until you restart applications or system.
Manage fonts in KDE
KDE provides font management tools that are built into it's system settings app. You can access it in System Settings --> Fonts --> Font Management.
Manage fonts in GNOME
GNOME's official font management tool is GNOME Fonts. It allows to view fonts and information about them, as well as to install them. In order to learn how to actually apply new fonts to your system, see the "GNOME user interface fonts" section below. If your system is, for some reason, missing the app, it can be installed with
sudo zypper install gnome-font-viewer
There is also Font Manager, a very good font manager for GTK+ desktop environments. You can install it from official openSUSE repositories with
sudo zypper install font-manager
Configure default display fonts
Your system is installed with a lot of fonts, but which one does the system use for your desktop user interface? What if you want to change it?
The default font is selected by several conditions in the following order (later one overrides previous one):
- Fontconfig
- Configuration files of font packages /etc/fonts/config.d/ (should NOT be edited)
- Preset system font configuration file /etc/fonts/fonts.conf (should NOT be edited, edit /etc/fonts/local.conf instead)
- Editable system font configuration file /etc/fonts/local.conf
- User font configuration file ~/.config/fontconfig/fonts.conf
- KDE/GNOME desktop font settings. This will only affect Qt/GTK applications.
- Application font settings.
- Document / web page font settings.
Fontconfig: sans, serif and mono fonts
Sans Serif (sans-serif), Serif (serif) and Monospace (monospace) are three special font families. Usually, Sans Serif will be used as the default UI font while Monospace will be used for text editors and console.
Fontconfig decides which actual font should be Sans Serif, Serif and Monospace font. It is a rule set in XML configuration files.
If you don't want to edit the configuration files, you can use a GUI frontend of fontconfig:
- YaST --> Fonts, modify system font configuration file.
- Fontweak, modify personal font configuration file.
KDE user interface fonts
System Settings --> Fonts --> Font Settings (ONLY affect KDE/Qt applications)
System Settings --> Application Styles --> GNOME/GTK Application Styles (Change GNOME/GTK application default fonts)
GNOME user interface fonts
By default, GNOME doesn't provide options to change default UI fonts. It also doesn't follow fontconfig rules. In order to change fonts, you need to install GNOME Tweaks. It will only affect GTK applications.
sudo zypper install gnome-tweaks
Firefox default display fonts
Firefox respects fontconfig settings. By default, it uses the Sans Serif font of the system for UI and default web page font. You can also change different Sans Serif, Serif and Monospace fonts in Firefox Preferences.
Note: most websites have their own font styles, so each web page can have different display fonts.
LibreOffice default document fonts
LibreOffice respects fontconfig settings. It uses the Sans Serif font of the system for UI and default document font. You can also change different fonts for default, paragraph, heading texts.
Tools --> Options --> LibreOffice Writer Document --> Standard fonts (fonts of different text styles)
Tools --> Options --> General --> Fonts (replace MS Windows fonts with system fonts, source code fonts)