centos 系统字体库安装中文字体


一,centos系统默认不支持中文字体的,需要手动安装windows系统中的中文字体库到centos中。

首先,将windows系统中的字体拷贝出来:

windows:打开C:\Windows\Fonts

 

1,查看系统安装了哪些字体

  fc-list   (如果没有此命令,需要yum安装字体库)

2,安装字体库

  yum -y install fontconfig

  cd /usr/share/fonts

  mkdir chinese

  cd chinese   

  #上传拷贝出来的windows中文字

  chmod -R 755 /usr/share/fonts/chinese

3,安装ttmkfdir工具

  yum -y install ttmkfdir

  ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir

4,修改字体配置文件

  vim /etc/fonts/fonts.conf

5,保存退出,如果服务器可以重启的话,就reboot吧。

6,如果无法reboot,可以执行

  fc-cache

7,查看是否安装成功

  fc-list

  #看到刚上传的字体即为安装成功。


免责声明!

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



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