|  | Next
Previous
Contents 
 Strictly speaking, it is not absolutely necessary to set up font servers
to use TrueType fonts with Xservers.  If you wish to use 
static files instead of a font server, please see the instructions for
setting up TrueType fonts forghostscript. 
 At this point I assume you have a working /etc/X11/XF86Configfile that loads explicitly specifies each directory in theFontPath.
We will convert it to use thexfsFont Server. 
 
Install XFSIf you have not already done so, install main/binary-*/x11/xfs_*.deb. 
Configure XFSEdit /etc/X11/xfs/configand change thecatalogueto
contain the contents of yourFontList.  You may also wish to
change thedefault-resolutionsvalue. 
 
/etc/X11/xfs/config
 
# paths to search for fonts
catalogue = 
    /usr/X11R6/lib/X11/fonts/100dpi/:unscaled,
    /usr/X11R6/lib/X11/fonts/75dpi/:unscaled,
    /usr/X11R6/lib/X11/fonts/misc/,
    /usr/X11R6/lib/X11/fonts/Speedo/,
    /usr/X11R6/lib/X11/fonts/Type1/,
    /usr/X11R6/lib/X11/fonts/100dpi/,
    /usr/X11R6/lib/X11/fonts/75dpi/
# x1,y1,x2,y2,...
default-resolutions = 100,100,75,75
 
Restart XFSRestart XFSin the usual Debian manner: 
 
root shell
 
# /etc/init.d/xfs restart
 
 
Verify that XFSis workingBefore we change our XF86Configfile, we should verify that thexfsserver is working by listing them through the font server: 
 
user shell
 
$ fslsfonts -server unix/:7100
-adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1
-adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-1
-adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-1
....
 
 
 
Change /etc/X11/XF86Configto usexfsWe're now ready to tell the X server to use the xfsfont server.
We keep one static font path as a fallback position in case of a problem
withxfs.  (We keep "misc" since it containsfixed, the
default font.) 
 
/etc/X11/XF86Config
 
Section "Files"
    FontPath   "unix/:7100"
    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
EndSection
 
 
Restart XRestart Xwithstartx, unless you like living life dangerously.
If that's the case, name me the beneficiary of your unusually large life
insurance policy and restartxdm. 
Verify that the XFSfonts are visibleOnce we have an X session established, we can verify that our server
sees all of the xfsfonts by listing them through theXserver. 
 
user shell
 
$ xlsfonts
-adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1
-adobe-courier-bold-o-normal--0-0-100-100-m-0-iso8859-1
-adobe-courier-bold-o-normal--0-0-75-75-m-0-iso8859-1
....
 
 
 
 At this point I assume you have a working xfsfont server and wish
to add TrueType support viaxfstt. 
 
Install XFSTTIf you have not already done so, install main/binary-*/x11/xfstt_*.deb. 
Installing the TrueType Fonts
Copy your TrueType fonts into the /usr/share/fonts/truetypedirectory.  These files usually have a.ttfextension, and they
should have0444permissions. 
Restart the XFSTTFont ServerRestart the xfsttserver with theforce-reloadflag 
 
root shell
 
# /etc/init.d/xfstt force-reload
 
 
Verify that XFSTTis workingBefore we change our XF86Configfile, we should verify that thexfsttserver is working. Important: the Debian xfsttserver listens to
port 7101, not 7100.  Also, the default permissions will require you
to run this query as root. 
 
user and root shells
 
$ fslsfonts -server unix/:7101
_FSTransSocketUNIXConnect: Can't connect: errno = 111
fslsfonts:  unable to open server "unix/:7101"
# fslsfonts -server unix/:7101
-ttf-arial black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
-ttf-arial mt black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
-ttf-arial narrow-bold-i-normal-bold italic-0-0-0-0-p-0-iso8859-1
 
 
Change /etc/X11/XF86Configto usexfsttWe're now ready to tell the X server to use the xfsttfont server.
We want it to use TrueType fonts in preference to all others. 
 
/etc/X11/XF86Config
 
Section "Files"
    FontPath   "unix/:7101"
    FontPath   "unix/:7100"
    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
EndSection
 
Verify that XFSTTfonts are visibleOnce we have an X session established, we can verify that our server
sees all of the TrueType fonts by listing them.
 
 
 
$ xlsfonts | grep ttf
-ttf-arial black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
-ttf-arial mt black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
-ttf-arial narrow-bold-i-normal-bold italic-0-0-0-0-p-0-iso8859-1
....
 
 
 At this point it should be possible to use a TrueType font in
applications like GIMP,NetscapeorStarOffice.  
Since most TrueType fonts aren't monospaced you probably don't want 
to use one of them withxterm- these programs use monospacing 
the size of the largest character cell. 
 If you are using the xfsttfont server, it's trivial to install
additional TrueType fonts. 
 
Copy the new font(s) into /usr/share/fonts/truetype/Restart xfswith/etc/init.d/xfs restart 
 xfstthas the ability to generate multiple font encodings,
provided that the TrueType font contains the necessary glyphs.
To enable fonts other than iso8859-1/unicode-1, you must manually
edit the/etc/init.d/xfsttscript:
 
 
/etc/init.d/xfstt
 
- start-stop-daemon --start --quiet --exec $XFSTT -- \
      --port $portno --daemon 
+ start-stop-daemon --start --quiet --exec $XFSTT -- \
      --port $portno --encoding iso8859-1,koi8-r,windows-1252,symbol-0 \
      --daemon 
 The recognized encodings in Debian 2.1 are:
 
 
iso8859-1       (Latin 1 - Western Europe)iso8859-2     (Latin 2 - Central and Eastern Europe)iso8859-3     (Latin 3 - Esperanto and Maltese)iso8859-4     (Latin 4 - superceded by Latin 6)iso8859-5     (Cyrillic)iso8859-6     (Arabic)iso8859-7     (Greek)iso8859-8     (Hebrew)iso8859-9     (Latin 5 - Latin 1 with Turkish, not Icelandic)iso8859-10    (Latin 6 - Nordic languages, replaces Latin 4)koi8-r        (Cyrillic)windows-1250  (Central Europe)windows-1251  (Cyrillic)windows-1252windows-1253  (Greek)windows-1254windows-1255windows-1256windows-1257symbol-0wingding-0wingreek-0cp-437        (various IBM code pages)cp-737cp-850cp-851cp-852cp-853cp-855cp-857cp-860cp-861cp-862cp-863cp-864cp-865cp-866cp-869cp-895atari-stunicode-2 The first 128 characters in the iso8859-xencodings is always ASCII.
Thewindows-fonts embrace and extendiso8859-1with additional
characters such as "smart quotes."  (Since these extensions, such as "smart
quotes" are undefined iniso8859-1, they are usually rendered as
question marks.) Excellent source for additional information on character set encodings
are at
 
 
 I used Unix sockets above, but the standard Debian packages also
configure xfsandxfsttto listen to TCP/IP ports 7100 and 
7101, respectively.  Access to these ports should be controlled
by thetrusted-clientsfield in/etc/X11/xfs/config,
but this option is not implemented in XFree86 3.3.2.3a. This means that anyone, anywhere, can connect to your font server.
Since xfs(and presumablyxfsts) "clone" to support
more users there's a trivial denial-of-service attack against these
systems.  It's probably safe to use the font servers on dialup
lines (since you're present to handle problems), but DSL and cable
modem users should use a firewall. 
 Next
Previous
Contents
 |