在CentOS中安装中文字体

以linux下安装宋体,黑体为例,介绍字体安装方法:
第一步、拷贝
把对应字体的的ttf文件拷到/usr/share/fonts/的任意目录下,假设宋体已拷贝到/usr/share/fonts/chinese/simsun,黑体已拷贝到/usr/share/fonts/chinese/simhei。
第二步、安装
安装宋体:
cd /usr/share/fonts/chinese/simsun
mkfontscale(如果提示 mkfontscale: command not found,需自行安装 # yum install mkfontscale )
mkfontdir
fc-cache -fv(如果提示 fc-cache: command not found,则需要安装# yum install fontconfig )
安装黑体:
cd /usr/share/fonts/chinese/simhei
mkfontscale
mkfontdir
fc-cache -fv
第三步、使其生效
重启系统或使用source命令

reboot

source /etc/profile

猜你喜欢

转载自sundful.iteye.com/blog/2101737