1、在/usr/share/fonts/chinese文件夹下创建一个文件夹,如custom
[root@localhost ~]# mkdir /usr/share/fonts/chinese/custom
然后把windows中的字体(一般在c:\windows\fonts中)复制到custom文件夹中,再为custom文件夹添加超级权限
即:[root@localhost ~]# chmod -R 755 /usr/share/fonts/chinese/custom
2、在字体目录中执行ttmkfdir命令
[root@localhost custom]# ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
3、更改fonts.conf文件,
在/etc/fonts目录中找到 fonts.conf文件,然后添加如下一行;
/usr/share/fonts/chinese/custom
添加位置如下:
<!-- Font directory list -->
<dir>/usr/share/fonts/chinese/custom</dir>
<dir>/usr/share/fonts</dir>
4、重启xfs服务器[root@localhost ~]# service xfs restart
重新启动 xfs:
关闭 xfs: [确定]
启动 xfs: [确定]
至此,windows字体添加成功
浙公网安备 33010602011771号