Redhat Font Server Step By Step


Table of Contents

Set a font server in RH 
Use it 
Action 
History 
Setup xfs 
Truetype fonts in XFree86 4.2.0 
Step 1: Preparing the fonts and the directory. 
Step 2: Modifying the config files. 
Step 3: Sit back and enjoy your work. 
Example 
Notes 

Set a font server in RH 

Use it 

export FONTSERVER=tcp/sunny:7100
xset fp+ $FONTSERVER
xset -q

Action 

Client side 

export FONTSERVER=tcp/sunny.acadiau.ca:7100
fsinfo
fslsfonts | do_waitp
xset fp= $FONTSERVER
cat ~/tmp/cc.txt

History 

$ psbn xfs
xfs        665     1  0 Apr30 ?        00:00:00 xfs -droppriv -daemon -port -1
kill -1 665
$ psbn xfs
xfs        665     1  0 Apr30 ?        00:00:00 xfs -droppriv -daemon -port -1

— still there, not restarted

kill 665

— ok, gone

local test 

xfs -droppriv -daemon
% fsinfo -s localhost:7100
name of server: localhost:7100
version number: 2
vendor string:  X Consortium
vendor release number:  6300
maximum request size:   16384 longwords (65536 bytes)
number of catalogues:   1
        all
Number of alternate servers: 0
number of extensions:   0
FONTSERVER=tcp/localhost:7100; export FONTSERVER
fsinfo
fslsfonts | do_waitp
# launch new xterm
xset fp= tcp/localhost:7100
cd ~/tmp
cat cc.txt

— no chinese!

Try other windows, also no chinese!

use xset -q to query the fontpath, all window's fontpath have been changed to tcp/localhost:7100!

So, xset is not only limited to the current xwindow. It operates on the entire x-window system!

So, should really use xset -q to see previous value first!

get it 

fsinfo -s sunny:7100

pre-verify 

cd tmp
cat cc.txt
xset -q
xset fp= /usr/share/zhfont/TTF/,/usr/share/zhfont/TTF/:unscaled,/usr/share/zhfont/X11/,/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/:unscaled,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/75dpi/
xset -q

font verify 

xlsfonts | fcols '$2 " " $3' - -F - | uniq
xfontsel &

OK:

isas fangsong ti
isas song ti
jis fixed
daewoo gothic
daewoo mincho
studio song

NOK:

cclib
hku

check font server 

FONTSERVER=tcp/localhost:7100; export FONTSERVER
fsinfo
fslsfonts

substitute 

xset fp= tcp/localhost:7100

post-verify 

cat cc.txt

— no Chinese any more! reset font path & do again, ok.

— ok in cxterm!

Test on original x font server 

xset fp= unix/:-1
xset -q
FONTSERVER=unix/:-1; export FONTSERVER
fsinfo
fslsfonts

— quite normal

cat cc.txt

— no Chinese any more! reset font path & do again, ok.

Conclusion 

BP solution does not include getting the fonts from X font server.

Change the startup file 

cd /etc/rc.d/init.d
f-sreplace ' -port -1' '' xfs
% /etc/rc.d/init.d/xfs stop
Shutting down X Font Server:                               [  OK  ]
% /etc/rc.d/init.d/xfs start
Starting X Font Server:                                    [  OK  ]
% chkfontpath
Current directories in font path:
1: /usr/X11R6/lib/X11/fonts/75dpi:unscaled
2: /usr/X11R6/lib/X11/fonts/misc:unscaled
3: /usr/X11R6/lib/X11/fonts/75dpi
4: /usr/X11R6/lib/X11/fonts/PEX
5: /usr/X11R6/lib/X11/fonts/Speedo
6: /usr/X11R6/lib/X11/fonts/Type1
7: /usr/X11R6/lib/X11/fonts/encodings
8: /usr/X11R6/lib/X11/fonts/misc
9: /usr/share/fonts/default/Type1
10: /usr/share/fonts/default/ghostscript
11: /usr/share/zhfont/TTF:unscaled
12: /usr/share/zhfont/TTF
13: /usr/share/zhfont/X11
14: /usr/share/zhfont/console