Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux system installs new fonts

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "installing new fonts in Linux system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

First, view the system font

Before starting the installation, let's check the fonts that have been installed on the system.

To see the fonts that are already installed on the system, we can use the fc-list command to view them. If the command is not available on the system, we need to install the relevant software package first.

On centos, use the following command to install: yum install-y fontconfig mkfontscale

On ubuntu, use the following command to install: sudo apt-get-y install fontconfig xfonts-utils

To view the Chinese fonts that have been installed on the system, we can use the following command: fc-list: lang=zh

Second, install fonts

Create a subdirectory such as win under the / usr/share/fonts directory

[root@FR-APP1 fonts] # mkdir win

In CentOS, the location of the font library is the fonts directory seen in the image above, so the first thing we need to do is to find the Chinese font file and put it in this directory, while the Chinese font file can be found in our windows system. Open the C:\ Windows\ Fonts directory under disk c:

We just need to copy the font we need and upload it to the linux server. Here I choose bold and boldface (these two fonts are used in the report). You can see that there are two files with the suffix ttf.

Then upload the above two fonts to the / usr/shared/fonts/win directory: / usr/share/fonts/win

Build font index information and update font cache:

[root@FR-APP1 win] # mkfontscale

[root@FR-APP1 win] # mkfontdir

[root@FR-APP1 win] # fc-cache

# just restart the application

This is the end of the introduction of "Linux system installs new fonts". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report