1.文件列表(来自于windows)
C:\Windows\Fonts\微软雅黑\msyhbd.ttf C:\Windows\Fonts\微软雅黑\msyh.ttf
2.安装基础包
yum -y install fontconfig ttmkfdir
3.上传字体文件
mkdir /usr/share/fonts/chinese
上传文件(msyhbd.ttf、msyh.ttf)到/usr/share/fonts/chinese目录下
/usr/share/fonts/chinese/msyh.ttf
/usr/share/fonts/chinese/msyhbd.ttf
4.配置
chmod -R 755 /usr/share/fonts/chinese
ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
添加配置
vim +25 /etc/fonts/fonts.conf
...
26 <dir>/usr/share/fonts/chinese</dir>
...
5.刷新缓存、验证
fc-cache
fc-list