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

82 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
====
2018-01-03 17:04:10 +00:00
2017-12-14 13:44:21 +00:00
[[installing-new-fonts-with-dnf]]
2018-01-03 17:04:10 +00:00
== Installing new fonts with dnf
2017-12-14 13:44:21 +00:00
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`:
2018-01-03 17:04:10 +00:00
[discrete]
=== Before you start
2017-12-14 13:44:21 +00:00
* 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].
====
2018-01-03 17:04:10 +00:00
[discrete]
=== Procedure
2017-12-14 13:44:21 +00:00
. List all available font packages from enabled repositories.
+
----
2018-01-03 17:04:10 +00:00
# dnf search fonts
2017-12-14 13:44:21 +00:00
----
. Install the package you need.
+
----
2018-01-03 17:04:10 +00:00
# dnf install libreoffice-opensymbol-fonts.noarch
2017-12-14 13:44:21 +00:00
----
2018-01-03 17:04:10 +00:00
[discrete]
=== More information
2017-12-14 13:44:21 +00:00
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
2018-01-03 17:04:10 +00:00
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.
2018-01-03 17:04:10 +00:00
[discrete]
== Procedure
2017-12-14 13:44:21 +00:00
. Create a new directory in the system's font directory `/usr/share/fonts`, where you will place the font files.
+
----
2018-01-03 17:04:10 +00:00
# mkdir /usr/share/fonts/robofont
2017-12-14 13:44:21 +00:00
----
. Copy the font file to the font's directory created in the previous step.
+
----
2018-01-03 17:04:10 +00:00
# cp ~/fonts/robofont.ttf /usr/share/fonts/robofont
2017-12-14 13:44:21 +00:00
----
. Update the font cache.
+
----
2018-01-03 17:04:10 +00:00
# fc-cache -v
2017-12-14 13:44:21 +00:00
----