Linux 版 (精华区)
发信人: clx (楚留香), 信区: Unix
标 题: Font & Font server
发信站: 紫 丁 香 (Sat Jun 27 14:06:32 1998), 转信
Font & Font server
应用程式取得字形的流程
Font Path 的设定
安装新字形於新目录下
Font Server 的设定
--------------------------------------------------------------------------------
应用程式取得字形的流程
(1)application => (2)fonts.alias => (3)fonts.dir => (4)font's file
说明:
当我们於命令列输入(# cxterm -fh hanzigb16st -fn 8x16&)时, 系统会先到/usr/lib/X11/fonts/chinese目录中的fonts.alias档案中, 寻找有没有hanzigb16st的资料列, 若有的话, 你会找到相对应的完整X-Font表示式; -isas-song
ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0 然後在到fonts.dir中, 便可找到相对应的X-Font之实际档案名称,gb16st.pcf, 然後字形便顺利的被显现出来。这是整个过程。
如果在fonts.alias中找不到, 系统会自动到fonts.dir中寻找, 若是仍找不到或对应的档案不存在, 便会有错误的讯息出现。
例如:
# cxterm -fh wohong -fn 8x16 &
# cxterm: unable to open font "wohong"
cxterm: unable to locate a suitable Chinese font
流程:
(1)cxterm -fh hanzigb16st -fn 8x16&
^^^^^^^^^^^^^^^
//
(2)fonts.alias:
hanzigb16st -isas-song ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
^^^^^^^^^^^ /||\ ||
||===============|| ||
||
(3)fonts.dir: \||/
gb16st.pcf -isas-song ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0
/||\ ||
\|================================|/
(4)/usr/lib/X11/fonts/chinese
gb16st.pcf
[BACK]
--------------------------------------------------------------------------------
Font Path 的设定
加入新的 font path
PATH : 加入 /usr/lib/X11/fonts/chinese 於 Font Path 中
xset +fp /usr/lib/X11/fonts/chinese
Font Server: 加入 xfs.nthu.edu.tw(font server) 於 Font Path 中
xset +fp tcp/xfs.nthu.edu.tw:7100/all
删除已有的 Font Path
PATH:
xset -fp /usr/lib/X11/fonts/chinese
Font Server:
xset -fp tcp/xfs.nthu.edu.tw:7100/all
更新
若 Font Path 的资料有更动, 则须作此动作
xset fp rehash
查看 Font Path 设定
xset -q
[BACK]
--------------------------------------------------------------------------------
安装新字形於新目录下
先将字形放置於适当的目录下, 如/usr/lib/X11/fonts/newfonts
# mkdir /usr/lib/X11/fonts/newfonts
# cp newfonts /usr/lib/X11/fonts/newfonts
重新建立 font.dir 档案
先切换目录至/usr/lib/X11/fonts/newfonts, 再执行
# mkfontdir
再将该字形目录加入FontPath中
# xset +fp /usr/lib/X11/fonts/newfonts
注意事项:
若要将字形(如中文字)安装於已有之目录(如/usr/lib/X11/fonts/chinese)
时,同样需要作mkfontdir的动作, 而最後再更新即可(如# xset fp rehash)。
[BACK]
--------------------------------------------------------------------------------
Font Server 的设定
(1)修改 /usr/lib/X11/fs/config , 如下
# font server configuration file
# $XConsortium: config.cpp,v 1.7 91/08/22 11:39:59 rws Exp $
clone-self = on
use-syslog = off
port=7000
catalogue = /usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/
,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,
/usr/X11R6/lib/X11/fonts/100dpi/,/usr/lib/X11/fonts/chinese/
error-file = /usr/X11R6/lib/X11/fs/fs-errors
# in decipoints
default-point-size = 120
default-resolutions = 75,75,100,100
(2) 启动 Font Server
/usr/bin/X11/xfs &
或者
/usr/bin/X11/xfs -config /usr/lib/X11/fs/conifg -port 7000&
[BACK]
--
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: 202.118.244.16]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.582毫秒