centos安装字体

1、查看中文字体
fc-list :lang=zh

2、安装字体
yum -y install fontconfig   #安装字体库
yum -y install ttmkfdir mkfontscale #安装字体索引信息
可拷贝Windows的字体目录:C:\Windows\Fonts

3、linux字体目录:/usr/share/fonts,建议创建一个目录mkdir chinese 放中文字体

4、把字体上传到/usr/share/fonts/chinese目录

5、然后在/usr/share/fonts/chinese执行命令,生成字库索引信息
mkfontscale
mkfontdir

6、更新字体缓存
fc-cache

猜你喜欢

转载自www.cnblogs.com/fan-gx/p/11324398.html