Linux系统中安装中文字体方法

本例子以安装微软雅黑和黑体为例,其他的同理;

0.准备工作:

    没有的可以先下载字体,或是到C:\Windows\Fonts目录下找

  《simhei.ttf(黑体)》点击下载;

  《msyh.ttf(微软雅黑)》点击下载;

1.创建本地字体文件夹:

   mkdir /usr/share/fonts/local

2.将【simhei.ttf(黑体)】和【msyh.ttf(微软雅黑)】拷贝到/usr/share/fonts/local/目录下

3.修改字体权限,使root以外的用户可以使用这些字体。

   chmod -R 777 /usr/share/fonts/local

4.建立字体缓存:
   (1)cd /usr/share/fonts/local
   (2)mkfontscale
   (3)mkfontdir
   (4)fc-cache -fv

5.启动 xfs 字体服务器:

   /etc/init.d/xfs restart

6.查看已安装字体列表,判断是都安装成功:

   fc-list

猜你喜欢

转载自blog.csdn.net/ieeso/article/details/81902005