[arch-general] Unable to add fonts to X

D. R. Evans doc.evans at gmail.com
Thu Apr 26 18:45:18 EDT 2012


Sławomir Szczyrba said the following at 04/25/2012 02:14 PM :

> 
> What says fc-list?
> 

I'll spare you the entire output (unless you really want it). It includes
these lines:

Courier New
N7DR:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,thường,Arrunta
Computer Modern N7DR:style=Medium

which are the two fonts I'm trying to add to X.

I decided just to try to add the Type1 font first. Once that's working I can
do the TTF font.

> Well, here's a hard way (just tested)
> 
> As root :
> - copy afm & pfb files to /usr/share/fonts/Type1

There is no /usr/share/fonts/Type1. Is is OK to just create it and then
perform the other steps? Will X automatically look in /usr/share/fonts/Type1
if I create that directory?

> - copy afm & pfb files to /usr/share/fonts/Type1
> - backup fonts.scale & fonts.dir
> - run mkfontscale
> - run mkfontdir

I did these steps, after creating /usr/share/fonts/Type1.

fonts.dir looks like this:

10
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

Then I execute, as root:
  xset fp rehash

Then I ran
  "xlsfonts | grep n7dr"
but still got no hits :-(

I don't know if it's relevant, but I see that the output from xlsfonts is MUCH
longer when I run the command as root than when I run as an ordinary user. But
neither root nor the ordinary user see the n7dr fonts.

I see that there is a space in the names in the fonts.dir file. For example,
one of the lines is:
N7DR_SFTT1000.pfb -misc-computer modern
n7dr-medium-r-normal--0-0-0-0-p-0-adobe-standard

That doesn't look right. Surely it should say ...computer-modern-n7dr...
shouldn't it? I don't know how the name is generated (presumably that's part
of mkfontscale?) but it looks to me like the generated name is invalid.

Looking back at my original posting, I see that *all* the font names in the
fonts.scale and fonts.dir files contain spaces. Perhaps that's been the
problem all the time. What do you think? Perhaps it's a bug in mkfontscale?

  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/20120426/0c3b4a07/attachment-0001.asc>


More information about the arch-general mailing list