[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Font problem

On Sat, Jan 20, 2001 at 02:12:32PM -0500, Rev. Ferret spake thus:
> Hi, I'm trying to get true type fonts working on X on my laptop.  I
> install the xfs-xtt server that comes on the potato disks.  I used
> mkttfdir to make a fonts.dir in the directory with my tt fonts, I put
> unix/:7100 as a fontpath in my XF86Config, and I added the path to my
> true type fonts in /etc/X11/xfs/config.  I only have the one entry in
> my
> XF86Config for my fontpath, so I know it is serving up fonts.  For
> some
> reason though, it won't serve up the true type fonts?  Am I forgetting
> something?  I tried to make a fonts.scale, but ttmkfdir doesn't seem
> to
> be present in any of the debian packages.  What am I missing?  Where
> did
> I go wrong?  Any help would be greatly appreciated.
> Thanks,
> Steve

Hi Steve,

I recently set up my laptop (mostly potato) to use TrueType fonts, and
took some notes on what I was doing so I could easily add new fonts in
the future. The info in this posting comes directly from my notes, but
much of it originated with various other sources. Particularly helpful
were these two:

XFree86 Font Deuglification Mini HOWTO

TrueType Fonts in Debian mini-HOWTO

Throughout, I use "bash#" as the prompt to denote a command that should
be run as root, and I use "bash$" as the prompt to denote a command that
should be run as a "normal" user.

Note excerpts:

To use TrueType fonts you need to run both the regular font server (xfs)
and a TrueType font server (xfstt). Both are started from /etc/init.d/

The version of xfstt that we're currently running (0.9.10-6) requires
that all of the TrueType fonts (those that have .ttf extension) be
located in /usr/share/fonts/truetype

It also seems to work ok if you want to keep your fonts in other
locations (like under /usr/local) and just make symlinks to the .ttf

NOTE: the 'mkttfdir' tool in the following step is from the fttools
      package on Debian 2.2 (potato)

After copying your .ttf files to /usr/share/fonts/truetype (or linking
to them), you'll need to run
    bash# cd /usr/share/fonts/truetype
    bash# mkttfdir ./
to recreate the fonts.dir file. You'll also want to create a fonts.scale
file (which has the same format as the fonts.scale file mkttfdir just
created, so you can just copy it if you don't already have a "hand
carved" fonts.scale file).
    bash# cp -p fonts.dir fonts.scale

NOTE: If you have customized fonts.scale, do /not/ do the above cp
      step!!!  You'll have to edit fonts.scale by hand.

Currently, it doesn't seem adequate to have a
    Section "Files"
        FontPath   "unix/:7101"
        FontPath   "unix/:7100"
        FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
section in /etc/X11/XF86Config; it seems that each user needs to add the
TrueType font server to the font path explicitely (this all doesn't seem
correct to me, but don't have time to track it down right now). The
kluge is to place the following line at the top of $HOME/.xsession
    xset fp+ unix/:7101

Then you'll need to
    bash# xfstt --sync
or, perhaps even better
    bash# /etc/init.d/xfstt force-reload

NOTE: On Debian 2.2 (potato), the /etc/init.d/xfstt force-reload
      calls does the 'xfstt --sync' step and restarts the

You'll still need to restart X for the client apps to be able to use the
TrueType fonts (I think --> I have not yet found a fullproof way to not,

1) shut down X
2) stop the xfstt daemo
        bash# /etc/init.d/xfstt stop
3) restart the xfs daemon
        bash# /etc/init.d/xfs restart
4) start the xfstt daemon again
        bash# /etc/init.d/xfstt start
5) start X again (via startx)
        bash$ startx -- -bpp 32

root can test the fonts from the TrueType server like this:
    bash# fslsfonts -server unix/:7101
    -ttf-arial black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
    TTUP020B0A040201020202040_Arial Black

users can check that they can see the ttf fonts like this:
    bash$ xlsfonts | grep ttf
    -ttf-arial black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1

The TrueType fonts should now show up in the font selection menus of
programs such as the GIMP or Netscape.

It's not the cleanest configuration, but it works.

Reply to: