Use true type font
It is quite simple.I have a box with gentoo 2004.0, gnome 2.6, XFree86-4.3, Kernel 2.6.4.
1) copy all fonts from "Windows/Fonts" in a Windows XP to
/usr/share/fonts/ttf/windows. You may create and use other directory.
2) cd /use/share/fonts/ttf/windows
3) ttmkfdir # create fonts.scale
4) mkfontdir
# create fonts.dir. Not sure if I need it. Seems font.scale = font.dir.
5) add
FontPath "/usr/share/fonts/ttf/windows"
to /etc/X11/XF86Config
I am not sure if I put it in a right place.
I didnot touch any other part of my XF86Config.
The relative part looks like:
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/share/fonts/ttf/windows" #<----------
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
EndSection
Section "Module"
Load"ddc"
Load"dbe"
Load"extmod"
Load"GLcore"
Load"dri"
Load"glx"
Load"fbdevhw"
Load"record"
Load"freetype"
Load"type1"
SubSection "extmod"
Option "omit xfree86-dga"
EndSubSection
Load"synaptics"
EndSection
That is it. After restart X, I get a very long list of fonts that can be used. Mars' passage. :mrgreen: 如果用xft,也很容易. (1)-(4) 不变.
5)
把 /etc/X11/XF86Config 中的 FontPath全部注释掉, 加一句.
FontPath "unix/:7100"
7100是xft用的口.启动xft,可以看到你的xft用那个口.
/etc/init.d/xft restart
ps -fe | grep xft
有的时候会是-1, 端口可以在/etc/init.d/xft中改变. (在/etc/init.d/xft找"-port", 然后改她后面的数,可能有几个. 在gentoo里可以改/etc/conf.d/xfs.)
总之,/etc/X11/XF86Config 要和xft一致.
6) 把 /usr/share/fonts/ttf/windows加进
/etc/X11/fs/config
catalogue = /usr/X11R6/lib/X11/fonts/75dpi,
.......
/usr/share/fonts/ttf/windows#<------------
7) 把启动xfs的命令加入Runlevels启动脚本中.
在gentoo里
rc-update add xfs default
在redhat里用chkconfig.
第一种方法通过XFree86直接显示字体,第二种方法通过Font Server.传说, Font Server可以提供一些更高级的功能, 比如说 抗锯齿(anti-aliased fonts).
我两者都试了, 没看出来有什么太大区别. 可能没找到合适的程序, 也可能眼睛度数太深. aa只有xft支持
页:
[1]