CentOS6.5 字体安装
1. TTF字体安装
方法1:通过yum安装
[root@ceshi200 Packages]# yum install fonts-chinese
#查看已安装的字体
[root@ceshi200 ~]# fc-list
Liberation Sans:style=Regular
AR PL UMing TW:style=Light
AR PL UMing HK:style=Light
……
Liberation Sans:style=Bold Italic
文泉驿正黑,文泉驛正黑,WenQuanYi Zen Hei:style=Regular
文泉驿等宽正黑,文泉驛等寬正黑,WenQuanYi Zen Hei Mono:style=Regular
AR PL UMing TW MBE:style=Light
文泉驿点阵正黑,文泉驛點陣正黑,WenQuanYi Zen Hei Sharp:style=Regular
Liberation Sans:style=Italic
方法2:手动按装ttf字体
1. 将*.ttf文件复制到/usr/share/fonts/chinese/TrueType目录下(没有则创建,可以创建自己喜欢的文件夹名称);
2. 修改字体权限,使所有用户都有权限使用;
[root@ceshi200 ~]# cd /usr/share/fonts/chinese/TrueType
[root@ceshi200 ~]# chmod 755 *.ttf #在CentOS6.5中安装不需要,可能是高版本的原因
3. 建立字体缓存
[root@ceshi200 ~]# mkfontscale
# 如果提示 mkfontscale: command not found, 自行安装 # yum install mkfontscale
[root@ceshi200 ~]# mkfontdir
#上面两步在CentOS6.5中不需要,可能是高版本的原因
#其实上面两个命令是建立字体索引文件,使之能够为系统和应用使用
[root@ceshi200 ~]# fc-cache -fv
# 如果提示 fc-cache: command not found, 自行安装 # yum install fontconfig