lundi 7 août 2023

Centos8 can't find the fonts it installed

I recently encountered a problem, and I can't locate the problem for the moment. Here is a brief description of the problem I encountered: I installed the Centos8 operating system on my virtual machine and installed the font simsunb.ttf (SimSun-ExtB) in Win on it, and I can confirm that the installation was successful. Use their own to find the system font program (written in C++), given the name SimSun-ExtB, can be found; So I did the same on my friend's computer, but I couldn't find the font, and I kept finding the SimSun font. To see if the font was installed successfully, I used wps to find the font; I was confused about this, the same code, the result is not the same, so I compared the two versions of the operating system:

        The program recognizes the model         The program doesn't recognize the model

System version CentOS-8.5.2111 CentOS-8.4.2105 Kernel version 4.18.0-348.7.1.el8_5.x86_64; 4.18.0-305.3.1.el8.x86_64 System environment language English chinese fontconfig version 2.13.1-4.el8 2.13.1-4.el8

Since the code was the same, I targeted the problem to the operating system, so I tried the following:

Console input: fc-match "SimSun-ExtB"; You can find both of them Upgrade the kernel to the latest, 6.X version; Program not found The system language is changed to English; Program not found fontconfig demoted and replaced with 2.13.1-3.el8; Program not found Thought it was a slash problem, added \ to the program font, and found that all the fonts with "-" in the program could not be found Add folder index in fonts.config; Program not found Font uninstallation and reinstallation, with ordinary user installation, with the root user installation; Program not found

Confused by this problem, I added the following code to the configuration file enter image description here Too bad the program still can't be found If you have a certain understanding of it, I hope you can solve the confusion, thank you very much!

Aucun commentaire:

Enregistrer un commentaire