FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 04-25-2012, 08:14 PM
Sławomir Szczyrba
 
Default Unable to add fonts to X

Dnia Wed, 25 Apr 2012 12:40:23 -0600
"D. R. Evans" <doc.evans@gmail.com> napisał(a):

> I did not at any point change the contents of /home/n7dr/.fonts, so it
> still looks like this:
>
> total 16
> drwxr-xr-x 2 n7dr users 4096 Apr 23 17:12 .
> drwx------ 34 n7dr users 4096 Apr 25 12:14 ..
> lrwxrwxrwx 1 n7dr users 39 Apr 22 17:08 CourierNewPSMTN7DR.ttf ->
> /home/n7dr/fonts/CourierNewPSMTN7DR.ttf
> -rwxrwxrwx 1 n7dr users 2896 Apr 23 17:13 fonts.dir
> -rwxrwxrwx 1 n7dr users 2896 Apr 23 17:12 fonts.scale
> 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
>
> Sorry about the wrapping in that output; Thunderbird no longer seems to
> support changing the wrap column for anindividual e-mail :-(
>
> Doc
>

What says fc-list?

Well, here's a hard way (just tested)

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

(ttf fonts - same procedure, /usr/share/fonts/TTF )

- run xset fp rehash

( besides this, You can always convert this font to ttf :/ )

Regards,
Slawek
--
________ 30 zdań, ktore może powiedzieć kobieta nagiemu mężczyźnie :
_/ __/ __/ 17. Przynajmniej długo to nie zajmie.
\__ \__ \_________________________________________________ ______________
/___/___/ Sławomir Szczyrba steev(AT)hot.pl
 
Old 04-26-2012, 10:45 PM
"D. R. Evans"
 
Default Unable to add fonts to X

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,No rmalny,Обычный,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
 
Old 04-27-2012, 04:17 AM
Sławomir Szczyrba
 
Default Unable to add fonts to X

Dnia Thu, 26 Apr 2012 16:45:18 -0600
"D. R. Evans" <doc.evans@gmail.com> napisał(a):

[...]
> 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.
>
No, spaces area acceptable.

What says 'xset -q | grep "Font Path" -A1' ?

> Doc

Regards,
Slawek
--
________ Zapewne wspaniałego wynalazku o nazwie Active Desktop też
_/ __/ __/ nie masz? Pogrążam się w szczerym bólu ;-) -- Pszemol
\__ \__ \_________________________________________________ ______________
/___/___/ Sławomir Szczyrba steev(AT)hot.pl
 
Old 05-02-2012, 06:48 PM
"D. R. Evans"
 
Default Unable to add fonts to X

D. R. Evans said the following at 04/26/2012 04:45 PM :

>
> 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 rebooted, and now this font is present and usable by X! Yay!

So I tried the same with the TTF font:

I added the .ttf file to /usr/share/fonts/TTF (which already exists and
contains some .ttf fonts), then ran mkfontscale and mkfontdir (as root,
obviously).

I checked the paths with
xset q (as ordinary user)

----

Font Path:

/usr/share/fonts/misc/,/usr/share/fonts/75dpi/,/usr/share/fonts/100dpi/,/usr/share/fonts/Type1/

----

So /usr/share/fonts/TTF isn't in my font path.

So I tried:

xset +fp /usr/share/fonts/TTF

And got:

----
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

----

The directory /usr/share/fonts/TTF does exist, its permissions look OK (any
user can read it and all the files in it), and there is a fonts.dir file.

So we're halfway (having added the Type 1 font) but that one didn't require me
to add a new font directory, which is the step that always seem to cause
trouble. I could try moving the .ttf font to /usr/share/fonts/misc, I suppose,
but that seems like a kludge. I wish that xset provided a more informative
error message.

Doc

--
Web: http://www.sff.net/people/N7DR
 
Old 05-07-2012, 10:44 PM
"D. R. Evans"
 
Default Unable to add fonts to X

D. R. Evans said the following at 05/02/2012 12:48 PM :

>
> So /usr/share/fonts/TTF isn't in my font path.
>
> So I tried:
>
> xset +fp /usr/share/fonts/TTF
>
> And got:
>
> ----
> 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
>
> ----
>
> The directory /usr/share/fonts/TTF does exist, its permissions look OK (any
> user can read it and all the files in it), and there is a fonts.dir file.
>
> So we're halfway (having added the Type 1 font) but that one didn't require me
> to add a new font directory, which is the step that always seem to cause
> trouble. I could try moving the .ttf font to /usr/share/fonts/misc, I suppose,
> but that seems like a kludge. I wish that xset provided a more informative
> error message.

Is there some complete and current documentation about X and fonts in arch
somewhere?

There seem to be extensive discussions about fontconfig, but nothing I've seen
explains whether that has anything to do with X, so it's horribly confusing to
someone trying to understand how fonts are supposed to work.

Neither can I find any explanation of why "xset +fp" is giving error #37, even
though the fonts.dir file looks fine.

I never thought that simply adding a font could be so difficult. Perhaps I am
simply doing something wrong, but I have no idea what.

Doc

--
Web: http://www.sff.net/people/N7DR
 
Old 09-28-2012, 03:53 PM
j.c.coleman
 
Default Unable to add fonts to X

Did you have any luck solving this? I am having a very similar problem.
Fonts that loaded at one time, no longer load.

JC
 
Old 09-29-2012, 10:05 PM
Martn Cigorraga
 
Default Unable to add fonts to X

On Fri, Sep 28, 2012 at 12:53 PM, j.c.coleman <jccoleman3@gmail.com> wrote:

>
>
> Did you have any luck solving this? I am having a very similar problem.
> Fonts that loaded at one time, no longer load.
>
> JC
>
>
>
What was the original problem?
 

Thread Tools




All times are GMT. The time now is 10:05 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org