LinuxReviws.org --get your your Linux knowledge
> Linux Reviews > Howtos > XFree configuration >

xfs font server

How to get started with using the xfs font server


  1. What is a font server?
  2. Running a xfs font server
  3. xfs with XFree (xf86config)


1. What is a font server?

The benefit of running a font server is speed, fonts are loaded from xfs memory cache instead of disk when needed. The disadvantage is that font servers uses memory, 5M to xxM depending on the number of fonts.

xfs is the default font server included with xfree 4.2.x/4.3.x.

Facts about fonts

Many applications, specially those based on KDE, loads alot of fonts into memory when they are started. Do keep in mind that the more fonts you have installed, the slower applications will start. Even though this delay will be shorter when using xfs, it still remains a fact that the more fonts you have installed, the slower applications start. Response times when using applications (things like fonts list boxes with font previewing) may also seem slower with more fonts. Basically less is more, a small selection of good and usable fonts are preferrable to a large number of ugly and rare-used bloat.

2. Running a xfs font server

The xfs font server is configured by the file

  /etc/X11/fs/config

Add no-listen = tcp if the font server will only serve the box it is running on. When using the box as a font server for a LAN, make sure it's commented # out: #no-listen = tcp

Example for a server:

  #no-listen = tcp
  client-limit = 25
  clone-self = on

clone-self makes xfs start another font server when client-limit is reached.

xfs default -port is 7100.

Make sure you add xfs as a boot (init) service

For more information, read the xfs manpage


On Gentoo Linux, the port is set in

  /etc/conf.d/xfs

by the options

  XFS_PORT="-1"
  SETUP_FONTDIRS="yes"

When using xfs as a stand-alone server on slow boxes SETUP_FONTDIRS="no" is recommended.

Use XFS_PORT="7100" to run xfs as a shared server (and make sure you do not have no-listen = tcp in /etc/X11/fs/config)


3. xfs with XFree (xf86config)

In /etc/X11/XF86Config, add a FontPath to your font server and # comment the FontPath lines that point to local folders. For compatiblity some distributions name the config files XF86Config-4 for XFree 4.x and XF86Config for the old 3.x versions (Mandrake, Redhat).

To use a local xfs server with XFree (no-listen = tcp, XFS_PORT="-1"), add:

  FontPath "unix/:-1"

The format used is:

  transport/hostname:port

Example of using a running on your LAN:

  FontPath "tcp/192.168.0.1:7100"

(7100 is the default port for using tcp with xfs)

Meet new people