在CentOS 6.X中安装中文字体


1、从Windows中 拷贝或者网络上下载你想要安装的字体文件(*.ttf文件)

2、新建字体目录

 

#mkdir /usr/share/fonts/

3、修改字体文件的权限,使root用户以外的用户也可以使用

 

# cd /usr/share/fonts/xx.ttf
# chmod 755 *.ttf

 

4、建立字体缓存

 

# mkfontscale (如果提示 mkfontscale: command not found,需自行安装 # yum install mkfontscale )
# mkfontdir   (如果提示 mkfontdir: command not found,需自行安装 # yum install mkfontdir ) 
# fc-cache -fv (如果提示 fc-cache: command not found,则需要安装# yum install fontconfig 

 

5、查看是否安装成功

# fc-list :lang=zh
STZhongsong,华文中宋:style=Regular

如果还没有安装中文字体,可参考上述步骤。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM