Home >Operation and Maintenance >Linux Operation and Maintenance >Where is the font directory of the linux system?

Where is the font directory of the linux system?

青灯夜游
青灯夜游Original
2022-03-21 14:35:3320185browse

The font directory of the Linux system is in the "/usr/share/" directory, and the full path is "/usr/share/fonts"; a subdirectory under the font directory is a font, which contains " .ttf" suffix font file.

Where is the font directory of the linux system?

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

The font directory of the Linux system is in the "/usr/share/" directory, and the full path is "/usr/share/fonts".

Linux inherits the network-centric design philosophy of Unix and is a multi-user network operating system with stable performance. Many users may not be used to the fonts that come with the system. We can install other fonts ourselves.

Installation method:

First prepare the font file, usually with ttf as the suffix.

Find the path of the system (the font storage directory)

/usr/share/fonts

Create a new directory in it, the name can be your own Take whatever you want, just use "win".

Copy the previously prepared font files into this directory (sudo permissions may be required here), and then run the following commands in sequence

cd /usr/share/fonts/win
sudo mkfontscale
sudo mkfontdir
sudo fc-cache

This way there will be two more files in the directory,

  • fonts.dir

  • fonts.scale

After the installation is complete, you can use the related fonts

Note that if you copy the ttf file of a certain Windows font to a newly created subdirectory, you also need to execute the above commands in the subdirectory as the root user in order for this font to be Use, it does not mean copying to the /usr/share/fonts directory to use it

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of Where is the font directory of the linux system?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn