Home > Article > Operation and Maintenance > Does centos not restart when adding fonts?
centos does not need to be restarted when adding fonts. The method of adding fonts is: 1. Use the ll command to enter the shared file with the font; 2. Use the cp command to copy the font file and create a font cache; 3. Set the font style according to the file. There is no need to restart the system during the process of adding fonts.
The operating environment of this article: centos 7 system, Dell G3 computer.
centos does not need to restart when adding fonts
The steps for centos to add fonts are as follows:
1
from Windows and enter the C:\Winodws\Fonts directory.
2
Enter the name of the font you want to add in the search box in the upper right corner (this is Microsoft Yahei) , find it among many fonts.
3
Right-click the mouse on the found font and select "Copy".
4
Paste the copied fonts to the shared folder of the VM (method to set up the shared folder in the VM, See my experience "How to share folders with the host in VM").
Note that although only one Microsoft Yahei font appears in the font directory, it actually includes three font files.
END
1
Open the CentOS virtual machine and log in to the desktop.
2
Start the terminal and enter the shared folder directory. At this point, typing the ll command will see the files that were previously copied to the shared directory. (For the method of entering shared folders, please also refer to my experience "How to share folders with the host in VM")
3
Switch to the root account, and then type the command cp msyhbd.ttc msyhl.ttc msyh.ttc /usr/share/fonts/chinese/TrueType to copy the three fonts to the /usr/share/fonts/chinese/TrueType directory.
4
To create a font cache, the command is as follows (; means writing multiple commands in the same line and executing them in sequence):
cd /usr/share/fonts/chinese/TrueType; mkfontscale; mkfontdir; fc-cache -fv. After execution, the font will be installed.
END
After the font is installed successfully, we can let the system use the newly installed font. Click "System" - "First Items" - "Font" on the graphical interface, and the following setting box will pop up.
At this time, click on the font after the corresponding entry, and we can set it to the font we just added according to our own preferences.
The following is the desktop effect after changing the font.
Recommended tutorial: "centos tutorial"
The above is the detailed content of Does centos not restart when adding fonts?. For more information, please follow other related articles on the PHP Chinese website!