博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

向 fedora/centos5.x 中添加windows字体的方法

Posted on 2009-11-26 18:16  百万负翁  阅读(290)  评论(0)    收藏  举报

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字体添加成功