1. 输入查看命令,提示无效
fc -list
2.安装字体库
yum -y install fontconfig
现在/usr/shared目录就可以看到fonts和fontconfig目录了(之前是没有的)
3.添加中文字体
打开c盘下的Windows/Fonts目录:
然后把上传到服务器
在这之前我们还需要新建目录,首先在/usr/shared/fonts目录下新建一个目录chinese:
然后就是将上面的两个字体上传至/usr/shared/fonts/chinese目录下即可:
然后修改chinese目录的权限:
chmod -R 755 /usr/share/fonts/chinese
接下来需要安装ttmkfdir来搜索目录中所有的字体信息:
yum -y install ttmkfdir
然后修改 /etc/fonts/fonts.conf
vi /etc/fonts/fonts.conf
<dir>/usr/share/fonts/chinese<dir>
4.刷新缓存中的字体:
sudo fc-cache -f -v
5.查看
fc-list