TranslateProject/sources/tech/20180301 How to add fonts to Fedora.md
2018-04-08 08:47:13 +08:00

4.1 KiB
Raw Blame History

translating---geekpi

How to add fonts to Fedora

Fonts help you express your thoughts in creative ways through design. Whether youre captioning an image, building a presentation, or designing a greeting or advertisement, fonts can boost your idea to the next level. Its easy to fall in love with them just for their own aesthetic qualities. Fortunately, Fedora makes installation easy. Heres how to do it.

System-wide installation

If you install a font system-wide, it becomes available to all users. The best way to take advantage of this method is by using RPM packages from the official software repositories.

To get started, open the  Software  tool in your Fedora Workstation, or other tool that uses the official repositories. Choose the  Add-ons  category in the group of banners shown. Then in the add-on categories, select  Fonts.  Youll see a list of available fonts similar to this screenshot:

When you select a font, some details appear. Depending on several conditions, you may be able to preview how the font looks with some example text. Select the  Install button to add it to your system. It may take a few moments for the process to complete, based on your system speed and network bandwidth.

You can also remove previously installed font packages, shown with a check mark, with the  Remove  button shown in the font details.

Personal installation

This method works better if you have a font youve downloaded in a compatible format:  .ttfotf.ttc.pfa.pfb  or . pcf.  These font extensions shouldnt be installed system-wide by dropping them into a system folder. Non-packaged fonts of this type cant be updated automatically. They also can potentially interfere with some software operations later. The best way to install these fonts is in your own personal data directory.

Open the  Files  application in your Fedora Workstation, or a similar file manager app of your choice. If youre using  Files , you may need to use the  Ctrl+H  key combination to show hidden files and folders. Look for the  .fonts  folder and open it. If you dont have a  .fonts  folder, create it. (Remember the leading dot and to use all lowercase.)

Copy the font file youve downloaded to your  .fonts  folder. You can close the file manager at this point. Open a terminal and type the following command:

fc-cache

This will rebuild font caches that help Fedora locate and reference the fonts it can use. You may also need to restart an application such as Inkscape or LibreOffice in which you want to use the new font. Once you restart, the new font should be available.


Photo by Raphael Schaller on Unsplash.


作者简介:

Paul W. Frields Paul W. Frields has been a Linux user and enthusiast since 1997, and joined the Fedora Project in 2003, shortly after launch. He was a founding member of the Fedora Project Board, and has worked on documentation, website publishing, advocacy, toolchain development, and maintaining software. He joined Red Hat as Fedora Project Leader from February 2008 to July 2010, and remains with Red Hat as an engineering manager. He currently lives with his wife and two children in Virginia.


via: https://fedoramagazine.org/add-fonts-fedora/

作者: Paul W. Frields 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出