Latest Tweets

xfig scalable fonts issue on Fedora Core 9 64 bit

The matter

On Fedora Core 9 64 bit GNU/Linux distros, as soon as xfig is executed, some pop-up error messages concerning font selection issues show up. When scaling fonts inside the xfig application, the same pop-up error messages appear:

Can’t find -*-times-medium-r-normal–22-*-*-*-*-*-ISO8859-*, using 6×13

Xfig fonts

According to the xfig documentation, one can choose between 35 different font types. The first font selection-window shown in the next Figure is related to ghost-script fonts, well, as a matter of fact postscript fonts; the second one is related to latex fonts. On Debian GNU/Linux distributions, we need at least these two packages to be installed in order to be capable of running xfig without problems using ghost-script fonts:

xfonts-scalable , gsfonts-x11

xfig font-selection window showing postscript fonts

On Fedora Core, all ghost-script fonts are installed through the ghostscript-fonts package. Despite the fact this package was installed, that issue persisted.

Reproducing the error

In order to figure out what was happening, I made a tar-ball including all fonts available on the Fedora Core. In order to use them on my Debian GNU/Linux, I changed the catalogue XFont Server‘s directive, so as to point at the location where I decompressed them:

# tar cvfj fonts.tar.bz2 /usr/share/fonts/*

# scp host_fedora:fonts.tar.bz2 /home/user

# tar xvfj /home/user/fonts.tar.bz2

# vim /etc/X11/fs/config

# /etc/init.d/xfs restart

$ xset fp unix/:7100

Then, I ran xfig, getting this error:

Can’t find -*-times-medium-r-normal–22-*-*-*-*-*-ISO8859-*, using 6×13

Exactly the same awful issue. Okay, bear in mind I used the X font server so as to change my font path completely in no time, instead of altering my xorg.conf file adding a lot of FontPath directives by hand. It is easy to use and more or less pretty comfortable, so you can just start this X font server and use it thanks to the xset fp command. That’s what I did, precissely.

Where postscript fonts are

According to  my Debian GNU/Linux, all postscript fonts we need so as to run xfig rightly are installed on /usr/share/fonts/X11/Type1. Looking at this directory and comparing it with the same one on Fedora Core 9, one comes to realize there is clearly a huge difference. So, I tried to use this font path as an addition to the /home/user/fonts path I just added through my X font server:

$ xset +fp /usr/share/fonts/X11/Type1

So far so good. As soon as I added this path to my current X Server font path directive, xfig ran perfectly well.

Fixing it

The main problem was to ensure that the Type1 font directory on Fedora Core 9 was exactly the same as the one on my Debian GNU/Linux box. To do so, the best and easiest way would be to run rsync this way:

$ cd /home/user/fonts/default/Type1/ ; rsync -avtHDL /usr/share/fonts/X11/Type1/* .

Then, I created a new tar-ball and I copied it using scp to that Fedora Core computer. There, I ran the command:

$ xset +fp /usr/share/fonts/default/Type1

In order to be capable of using the new fonts immediately, with no need of restarting the X-Server nor running the fc-cache.

Some screen shots

xfig font-isse popup message (without +fp)

Trying to scale a font (again, without +fp)

Links and references

Xfig

Xfont Server