quick-docs/en-US/modules/proc_adding-new-fonts-as-superuser.adoc

74 lines
2.1 KiB
Text
Raw Normal View History

2017-12-14 13:44:21 +00:00
[[adding-new-fonts-as-superuser]]
= Adding new fonts as the superuser
2017-12-14 15:18:05 +00:00
System fonts are available to all system users. If you need to add system fonts, there are two ways:
2017-12-14 13:44:21 +00:00
2017-12-14 15:18:05 +00:00
. Use the `dnf` package manager to install font packages,
. Manually add fonts to the system and update the font cache to make them available to the users.
2017-12-14 13:44:21 +00:00
[WARNING]
====
2017-12-14 15:18:05 +00:00
If you manually add system-wide fonts, you will not be able to control them with the package manager. If the font is provided as a distribution package, you should always use the package manager to install it.
2017-12-14 13:44:21 +00:00
====
[[installing-new-fonts-with-dnf]]
== Installing new fonts with `dnf`
2017-12-14 14:57:49 +00:00
Whenever you can add new fonts by installing a font package with the `dnf` package manager, you should do so. This method gives you control over the font package in the future, such as updating the package and removing it from the system.
2017-12-14 13:44:21 +00:00
To install a font package with `dnf`:
.Before you start
* Add and enable repositories with font packages.
+
[NOTE]
====
A lot of fonts are available from the RPMfusion repository. To enable the repository on your system, follow the instructions on link:https://rpmfusion.org/Configuration[the RPMfusion webpage].
====
.Procedure
. List all available font packages from enabled repositories.
+
----
$ sudo dnf search fonts
----
. Install the package you need.
+
----
$ sudo dnf install libreoffice-opensymbol-fonts.noarch
----
.More information
2017-12-14 15:18:05 +00:00
* The `dnf search fonts` command lists all available font packages, as well as their descriptions.
2017-12-14 13:44:21 +00:00
[[installing-new-fonts-manually]]
== Installing new fonts manually
When you need to install fonts that are not available in a repository, you can install them manually by copying the font files into a system font directory and updating the font cache.
.Procedure
. Create a new directory in the system's font directory `/usr/share/fonts`, where you will place the font files.
+
----
$ sudo mkdir /usr/share/fonts/robofont
----
. Copy the font file to the font's directory created in the previous step.
+
----
$ sudo cp ~/fonts/robofont.ttf /usr/share/fonts/robofont
----
. Update the font cache.
+
----
$ sudo fc-cache -v
----