mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-28 14:56:35 +00:00
161 lines
5.2 KiB
Text
161 lines
5.2 KiB
Text
= Adding new fonts in Fedora
|
|
The Fedora Docs Team; Peter Boy
|
|
:revnumber: F36,F37
|
|
:revdate: 2023-04-24
|
|
|
|
Fedora pre-installs several basic fonts by default.
|
|
This page explains how to add new fonts to a Fedora installation.
|
|
|
|
|
|
[[packaged]]
|
|
== Packaged fonts
|
|
|
|
Did you know Fedora packages several freely-licensed fonts?
|
|
There are several supplementary fonts to preview and try out that are not installed by default.
|
|
Like all fonts on Fedora, these fonts are not encumbered with licenses or restrictions.
|
|
|
|
An added benefit of packaged fonts is they give you control over the font package in the future.
|
|
You will receive future updates and can easily uninstall it later if you decide it is not the font for you.
|
|
|
|
[[gnome-software]]
|
|
=== GNOME Software
|
|
|
|
[NOTE]
|
|
====
|
|
This section uses a Graphical User Interface (G.U.I.) for managing fonts.
|
|
====
|
|
|
|
The easiest way to preview and install new fonts is to use [application]`GNOME Software`.
|
|
Search for a specific font or search "fonts" in [application]`GNOME Software` to see what other freely-licensed fonts are available.
|
|
|
|
[[dnf]]
|
|
=== DNF package manager
|
|
|
|
[NOTE]
|
|
====
|
|
This section uses a Command Line Interface (C.L.I.) for managing fonts.
|
|
====
|
|
|
|
If you prefer working in a C.L.I., you can also install fonts with [application]`dnf`.
|
|
|
|
Add or enable third-party repositories with font packages::
|
|
Many fonts are available from the RPM Fusion repository.
|
|
To enable the repository on your system, follow xref:setup_rpmfusion.adoc[these instructions].
|
|
|
|
List all available font packages from enabled repositories::
|
|
[source,]
|
|
[…]$ dnf search fonts
|
|
|
|
Install the font package you need::
|
|
[source,]
|
|
[…]$ sudo dnf install libreoffice-opensymbol-fonts
|
|
|
|
|
|
[[unpackaged]]
|
|
== Unpackaged fonts
|
|
|
|
In many cases, you may want to use a specific font that is not available in Fedora or is not made available under https://freedomdefined.org/Definition[Free Culture] licenses.
|
|
|
|
[IMPORTANT]
|
|
====
|
|
Unpackaged fonts are not managed by a package manager.
|
|
You will not automatically receive updates or optimizations.
|
|
If a font is provided by a distribution package, you should always use a packaged version of a font.
|
|
====
|
|
|
|
[[system-fonts]]
|
|
=== System fonts
|
|
|
|
System fonts are installed for all users.
|
|
Anyone with an account on the machine will be able to use these fonts.
|
|
|
|
Create a new directory in the system fonts directory (`/usr/local/share/fonts/`) to accommodate the new font family, and copy the downloaded fonts (e.g. robofont.ttf files)::
|
|
[source,]
|
|
----
|
|
[…]$ sudo mkdir -p /usr/local/share/fonts/robofont
|
|
[…]$ sudo cp ~/Downloads/robofont.ttf /usr/local/share/fonts/robofont/
|
|
----
|
|
|
|
Set permissions and update SELinux labels::
|
|
[source,]
|
|
----
|
|
[…]$ sudo chown -R root: /usr/local/share/fonts/robofont
|
|
[…]$ sudo chmod 644 /usr/local/share/fonts/robofont/*
|
|
[…]$ sudo restorecon -vFr /usr/local/share/fonts/robofont
|
|
----
|
|
|
|
Update the font cache::
|
|
[source,]
|
|
[…]$ sudo fc-cache -v
|
|
|
|
[[user-fonts]]
|
|
=== User fonts
|
|
|
|
User fonts are installed for an individual user.
|
|
Only the user who installs the fonts on the machine will be able to use these fonts.
|
|
This is also convenient if you do not have superuser (i.e. `root`) access on the machine.
|
|
|
|
There are three ways to install user fonts.
|
|
|
|
[[user-fonts--gnome-font-viewer]]
|
|
==== GNOME Font Viewer
|
|
|
|
[NOTE]
|
|
====
|
|
This section uses a Graphical User Interface (G.U.I.) for managing fonts.
|
|
====
|
|
|
|
The [application]`GNOME Font Viewer` is an application to display the fonts installed on the system.
|
|
It also allows you to locally install fonts.
|
|
Follow these steps to add new user fonts with [application]`GNOME Font Viewer`:
|
|
|
|
. Install [application]`GNOME Font Viewer`.
|
|
** Use GNOME Software or use the command line (`sudo dnf install gnome-font-viewer`)
|
|
. Open a file browser.
|
|
. Double-click on a font file to open it in [application]`GNOME Font Viewer`.
|
|
. Click on the blue btn:[Install] button on the top bar.
|
|
|
|
[NOTE]
|
|
====
|
|
Currently, there is a bug in the application.
|
|
When you click on the btn:[Install] button, it does not inform whether the installation succeeded.
|
|
====
|
|
|
|
[application]`GNOME Font Viewer` does two things to install fonts:
|
|
|
|
. Copy font files to a font directory in the user's home directory `.local/share/fonts`.
|
|
. Update the font cache.
|
|
|
|
[[user-fonts--KDE]]
|
|
==== KDE Font Management
|
|
|
|
. Go to Settings and enter font in Quick Settings.
|
|
. On Font Management window, press the Install from...button, and select the downloaded fonts from within the dialog.
|
|
. On pop-up window (see UI text below), select a font group that will control where the fonts will be installed.
|
|
|
|
----
|
|
Do you wish to install the font(s) for personal use (only available to you), or system-wide (available to all users)?
|
|
----
|
|
|
|
[[user-fonts--command-line]]
|
|
==== Command line
|
|
|
|
[NOTE]
|
|
====
|
|
This section uses a Command Line Interface (C.L.I.) for managing fonts.
|
|
====
|
|
|
|
If you prefer a command line interface, you can install user fonts manually.
|
|
Follow these steps in a terminal window to install a font locally:
|
|
|
|
Create a new directory `~/.local/share/fonts/<font-family-name>/` for the new font family::
|
|
[source,]
|
|
[…]$ mkdir -p ~/.local/share/fonts/robofont
|
|
|
|
Copy font files (e.g. `.ttf` files) to the new directory::
|
|
[source,]
|
|
[…]$ cp ~/Downloads/robofont.ttf ~/.local/share/fonts/robofont
|
|
|
|
Update the font cache::
|
|
[source,]
|
|
[…]$ fc-cache -v
|