Most of the time, we need to do some image generation work (such as verification code). At this time, we generally need to use the system library. But things are always unsatisfactory. The Linux operating system we use cannot be as "flagship" as the Windows operating system does, every minute is missing (for example, we chose minimum for installation or Chinese support for installation ). In this case, we have to develop the DIY spirit and install the font library for the operating system. This section describes how to install the font library for the centos (Red Hat stream) operating system and how to install fonts on Ubuntu by referring to "how to install fonts on Ubuntu".
If you are interested in Linux. the following figure shows how to deploy the website in. net. This article is useful because it prompts you that your operating system lacks the relevant library.
At this time, you only need to refer to the operations described in this article.
First, run the following command to install the font management tool:
Yum install-y fontconfig mkfontscale
Then we go to "C: \ windows \ fonts "to copy the fonts we need (Here we copy four types:" Arial "," Comic Sans MS "," Georgia ", and" Times New Roman)
Copy them out (Note: Here is the link between fonts. If you copy a font, the system will copy the affiliated ones as well. You don't need to worry about it)
Then upload it to "/usr/share/fonts"
Run the following three commands to refresh the font cache:
Mkfontscale
Mkfontdir
FC-Cache-FV
Finally, restart the Operating System (reboot)
Here, readers can execute "FC-list" to check the fonts installed (just look at the text above each small section and add an English one)
Okay. The content in this section is here. Thank you.
My blog post address: http://jhonge.net/Home/Single/26626627
How to install the font library for centos