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

Re: Understanding Font Paths

On Wed, Jan 01, 2003 at 03:31:45PM +0000, Alan Chandler wrote:
> I am running kde under debian unstable and something weird has suddenly 
> happened to the fonts in konsole.

Heh, I wrote all the below before even seeing this actual question!
Which font are you trying to use?  the xfonts-konsole one?  It doesn't
seem to be in sid ATM, so I guess it's one of Karolina's or Ralf's
packages.  I'd ask them about it directly or on d-kde...One thought tho,
have you added /usr/share/fonts/ (where you say it drops the fonts) to
your XF86Config-4?

> Before starting, I should state that I "think" I am running the Xserver 
> without an additional font server (ie neither xfs or xfs-xtt, not xfstt), as 
> I can't quite understand why I should need it .  I presume that the 
> libfreetype module loaded by the x-server should suffice.[So if someone can 
> explain why ought to use pne of the above font servers I would be interested 
> to listen]

AFAIK, this is correct.  XFree86 4.0 introduced support for TrueType
fonts, so a font server is useless for 99% of users.  If you have a
bunch of machines, it might be useful to share fonts amongst them, but
aside from that, 'no'.

> Anyway, I have started to look at the various packages and config files that 
> seem to be in use and as far as I can see, I have at least four copies of 
> some x fonts (particularly the truetype ones) stored on my system
> /usr/X11R6/lib/X11/fonts (with /usr/lib/X11/fonts via symlink)

Contains fonts from the xfonts-* packages, AFAIK.

> /var/lib/defoma/x-ttcidfont-conf.d/dirs

On my system, the files in here are mostly symlinks to
/usr/share/fonts/truetype/, and thus take up virtually no space.  AIUI,
the x-ttcidfont-conf package symlinks all your truetype fonts into here
so you can just point X, or ghostscript or whatever at just *one*
directory, instead of a whole bunch.  I point X at this to catch all the
truetype fonts I might install.

> /var/lib/defoma/gs.d/dirs/fonts (not sure this is not just ghostscript - but 
> there are truetype fonts in this directory)

Hmmm...on my system, ghostscript owns this...There is a gsfonts-x11 that
claims to let X use ghostscript fonts...

Oh, wait.  It's all symlinks too.  I guess it's central location for
ghostscript to find all it's fonts...Again, it takes up no space since
it's all symlinks.

> and
> /usr/share/fonts.

This contains actual fonts for me.  All from msttfcorefonts, AFAICT.

> Why the separate places, and which one is correct.

Just for simplicity I guess.  xfonts-* packages dump their fonts in
/usr/X11R6/lib/X11/fonts, everything else goes in /usr/share/fonts/.
The others are just symlink farms to simplify things.  FWIW, I have the
following FontPath lines:
FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath        "/usr/X11R6/lib/X11/fonts/misc/"
FontPath        "/usr/lib/X11/fonts/misc"
FontPath        "/usr/lib/X11/fonts/cyrillic"
FontPath        "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath        "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath        "/usr/lib/X11/fonts/Type1"
FontPath        "/usr/lib/X11/fonts/Speedo"

> My /etc/X11/XFConfig-4 has the following in it
> Section "Files"
>   FontPath      "/usr/lib/X11/fonts/misc"
>   FontPath      "/usr/lib/X11/fonts/100dpi:unscaled"
>   FontPath      "/usr/lib/X11/fonts/75dpi:unscaled"
>   FontPath      "/usr/lib/X11/fonts/Type1"
>   FontPath      "/usr/lib/X11/fonts/Speedo"
>   FontPath      "/usr/X11R6/lib/X11/fonts/100dpi"
>   FontPath      "/usr/X11R6/lib/X11/fonts/TrueType"
>   FontPath      "/usr/X11R6/lib/X11/fonts/Speedo"
>   FontPath      "/usr/X11R6/lib/X11/fonts/Type1"
>   FontPath      "/usr/X11R6/lib/X11/fonts/misc"
>         # if the local font server has problems, we can fall back on these
> EndSection
> Since this part of the the file is controlled by debconf - why has it not 
> added the /var/lib/defoma/x-ttcidfont-conf.d/dirs lines into XFConfig-4.

I'm not sure, but I think there's a policy that packages are not allowed
to fiddle with each other's configuration files like that.
x-ttcidfont-conf does tell you (as a debconf notice, IIRC) to add
/var/lib/defoma/x-ttcidfont-conf.d/dirs to your XF86Config-4 file

> As you can see /usr/share/fonts does not figure - however, the package 
> xfonts-konsole puts its fonts into the top level of /usr/share/fonts  (in a 
> compressed form?) and then there are type1 and truetype subdirectories with 
> further directories underneath.

Hmmm...sounds like a package bug or such, I'd imagine some sort of
hierarchy is intended in /usr/share/fonts/...

> Now in /etc/fonts/fonts.conf there is a list of directories that includes 
> /usr/share/fonts but NOT /var/lib/defoma/x-ttcidfont-conf.d/dirs

Ah...fontconfig is brand spanking new, and only entered sid a little
while ago (weeks).  It should probably integrate with x-ttcidfont-conf
more neatly.  Maybe file a wishlist bug against it?

> On top of all of this, there is a kde font installer.  It seems to know about 
> fonts - but I have no idea what it is actually manipulating)

I've heard of that, but I've never used it.  It probably doesn't know
about Debian's neat (though inconsistently used, by the looks of things)
font system, so it may or may not work well.  Debian does have enormous
number of Free and non-Free fonts within the distribution (non-Free is
not part of Debian, blah, blah, blah) though, so you may or may not be
bothered to use it...

> I am very confused - could do with some enlightenment.

Yeah, me too.  I thought I understood it fairly well, but writing all
has just made me realise how 'interesting' the whole thing is. :)  This
is just what I've gleaned from reading various lists and docs though, so
I might be completely off-base...


Attachment: pgpfywxtiy1Ms.pgp
Description: PGP signature

Reply to: