[arch-general] Unable to add fonts to X

D. R. Evans doc.evans at gmail.com
Mon Apr 23 19:34:35 EDT 2012


I couldn't find a more appropriate place to ask this question. Please feel
free to point me to such a place if one exists.

----

Using a completely up-to-date 32-bit arch system, I am trying to make some
fonts available to X.

My understanding of the process is:

1. Put the fonts in a directory.
2. Since these are scalable fonts, run mkfontscale in the directory.
3. Run mkfontdir in the directory.
4. run xset +fp <directory name>

So what I did:

0. Created the directory ~/.fonts.
1. Put the fonts in ~/.fonts.

At this point the contents of the directory looks like this (sorry about
the wrapping):

lrwxrwxrwx  1 n7dr users   39 Apr 22 17:08 CourierNewPSMTN7DR.ttf ->
/home/n7dr/fonts/CourierNewPSMTN7DR.ttf
lrwxrwxrwx  1 n7dr users   34 Apr 22 17:08 N7DR_SFTT1000.afm ->
/home/n7dr/fonts/N7DR_SFTT1000.afm
lrwxrwxrwx  1 n7dr users   34 Apr 22 17:08 N7DR_SFTT1000.pfb ->
/home/n7dr/fonts/N7DR_SFTT1000.pfb

2. Ran mkfontscale in ~/.fonts.

This created the file fonts.scale, which had the following contents:

33
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-adobe-standard
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-ascii-0
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-ibm-cp437
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-ibm-cp850
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-ibm-cp852
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-ibm-cp866
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso10646-1
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-1
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-10
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-13
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-15
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-2
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-3
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-4
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-5
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-8
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-iso8859-9
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-koi8-e
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-koi8-r
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-koi8-ru
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-koi8-u
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-koi8-uni
CourierNewPSMTN7DR.ttf -monotype-courier new
n7dr-medium-r-normal--0-0-0-0-m-0-microsoft-cp1252
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-adobe-standard
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-ascii-0
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-iso10646-1
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-iso8859-1
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-iso8859-15
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-iso8859-9
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-koi8-r
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-koi8-ru
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-koi8-u
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-microsoft-cp1252

3. Ran mkfontdir in ~/.fonts.

This created the file fonts.dir, which was identical to fonts.scale.

4. One piece of documentation I read said that X automatically includes
~/.fonts in its path, but running
  xset q
did not include ~/.fonts in the directory list.

So I ran:
  xset +fp /home/n7dr/.fonts

But now we come to the problem. This command returns:

xset:  bad font path element (#37), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax

But:
a. the directory obviously exists, and it has permissions rwx for the user.
b. The directory contains the file fonts.dir
c. The syntax looks OK.

So what is xset complaining about?

(I suspect that the problem lies in the *contents* of fonts.dir, since if I
create a dummy version of the file, I don't receive the error. But since
the file was automatically created, I don't know what might be wrong, nor
how to correct it. Maybe my suspicion is wrong, though.)

  Doc

-- 
Web:  http://www.sff.net/people/N7DR

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20120423/8a10b36b/attachment-0001.asc>


More information about the arch-general mailing list