linux fedora core 5上安装字体

上一篇 / 下一篇  2007-02-01 00:00:00 / 个人分类:Linux/Unix技术

本人比较喜欢Courier New这个字体,但默认下FC5是不安装这个字体的,需要手工安装。





具体步骤如下:
1、下载字体
可以直接从windows拷贝一个字体,比如Courier New对应的字体文件是c:WINDOWSfontscour.ttf。
把它拷贝到FC5上。

2、安装
2.1 创建目录
[root@suk ~]# mkdir -p /usr/share/fonts/chinese/custom
然后把cour.ttf拷贝到刚建立的目录上
[root@suk ~]# cp /tmp/cour.ttf /usr/share/fonts/chinese/custom
2.2 设置权限
[root@suk ~]# chmod -R 755 /usr/share/fonts/chinese/custom
2.3 生成fonts.scale文件
[root@suk ~]# cd /usr/share/fonts/chinese/custom/
[root@suk custom]# ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
[root@suk custom]# ls
cour.ttf fonts.scale
可以看到,运行完命令后,custom目录上多了fonts.scale文件。

2.4 修改相关文件
首先修改/etc/fonts/fonts.conf文件
[root@suk custom]# vi /etc/fonts/fonts.conf
在<!-- Font directory list -->一行下加上上一步生成的文件的路径,如修改后我的机器上是:
<!-- Font directory list -->
<dir>/usr/share/fonts/chinese/custom</dir>
<dir>/usr/share/fonts</dir>
<dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/OTF</dir>
<dir>~/.fonts</dir>
然后修改/etc/X11/xorg.conf文件,同样加上上一步的路径。修改后我的配置如下:
[root@suk custom]# vi /etc/X11/xorg.conf
# used to render fonts.
FontPath "/usr/share/fonts/chinese/custom"
FontPath "unix/:7100"
2.5 注销重新登录
此时就可以选择新安装的字体了。比如在终端中依次选择:
编辑->当前配置文件->常规->字体
在弹出的对话框中选择新字体。

对于其他字体的安装方法同上。









TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-10-16  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 12897
  • 日志数: 410
  • 建立时间: 2007-12-30
  • 更新时间: 2008-08-21

RSS订阅

Open Toolbar