X Font Server / FontCache

While searching to solve some fonts issue, I tried:


# /usr/sbin/fonts-config -d
 ... ]
executing: /usr/bin/xset fp rehash 
executing: /sbin/checkproc /usr/bin/xfs
X Font Server not used.

# /usr/bin/xset q
 ... ]
Font cache:
  Server does not have the FontCache Extension

“X Font Server not used” and “Server does not have the FontCache Extension”, should I worry ?

BUMP

Confused: Should the Font Cache be setup and running on a normal (default) 11.2 desktop session ?

I usually use :


fc-cache -fv

to rebuild the font cache.

Did it, went fine:


~> fc-cache -fv
/usr/share/fonts: caching, new cache contents: 0 fonts, 9 dirs
/usr/share/fonts/100dpi: caching, new cache contents: 398 fonts, 0 dirs
/usr/share/fonts/75dpi: caching, new cache contents: 398 fonts, 0 dirs
/usr/share/fonts/Speedo: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/Type1: caching, new cache contents: 29 fonts, 0 dirs
/usr/share/fonts/URW: caching, new cache contents: 43 fonts, 0 dirs
/usr/share/fonts/cyrillic: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/misc: caching, new cache contents: 136 fonts, 0 dirs
/usr/share/fonts/truetype: caching, new cache contents: 80 fonts, 0 dirs
/usr/X11R6/lib/X11/fonts: skipping, no such directory
/opt/kde3/share/fonts: caching, new cache contents: 1 fonts, 1 dirs
/opt/kde3/share/fonts/override: caching, new cache contents: 0 fonts, 0 dirs
/usr/local/share/fonts: caching, new cache contents: 0 fonts, 10 dirs
/usr/local/share/fonts/a: caching, new cache contents: 6 fonts, 0 dirs
/usr/local/share/fonts/c: caching, new cache contents: 6 fonts, 0 dirs
/usr/local/share/fonts/g: caching, new cache contents: 4 fonts, 0 dirs
/usr/local/share/fonts/i: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/l: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/m: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/s: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/t: caching, new cache contents: 10 fonts, 0 dirs
/usr/local/share/fonts/v: caching, new cache contents: 4 fonts, 0 dirs
/usr/local/share/fonts/w: caching, new cache contents: 2 fonts, 0 dirs
/home/amigaphil/.fonts: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/misc: skipping, looped directory detected
/usr/share/fonts/75dpi: skipping, looped directory detected
/usr/share/fonts/Type1: skipping, looped directory detected
/usr/share/fonts/Speedo: skipping, looped directory detected
/usr/share/fonts/truetype: skipping, looped directory detected
/usr/share/fonts/encodings: skipping, looped directory detected
/usr/share/fonts/encodings/large: skipping, looped directory detected
/usr/share/fonts/100dpi: skipping, looped directory detected
/usr/share/fonts/cyrillic: skipping, looped directory detected
/opt/kde3/share/fonts/override: skipping, looped directory detected
/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/fonts: caching, new cache contents: 8 fonts, 0 dirs
/usr/local/share/fonts/a: skipping, looped directory detected
/usr/local/share/fonts/c: skipping, looped directory detected
/usr/local/share/fonts/g: skipping, looped directory detected
/usr/local/share/fonts/i: skipping, looped directory detected
/usr/local/share/fonts/l: skipping, looped directory detected
/usr/local/share/fonts/m: skipping, looped directory detected
/usr/local/share/fonts/s: skipping, looped directory detected
/usr/local/share/fonts/t: skipping, looped directory detected
/usr/local/share/fonts/v: skipping, looped directory detected
/usr/local/share/fonts/w: skipping, looped directory detected
/var/cache/fontconfig: not cleaning unwritable cache directory
/home/amigaphil/.fontconfig: cleaning cache directory
/home/amigaphil/.fontconfig: invalid cache file: b4f48f7a111ce7d7fed5fea8a27d061e-x86.cache-2
/home/amigaphil/.fontconfig: invalid cache file: c0019af57c4a2b1c148dd6f7ed754bb4-x86.cache-2
/home/amigaphil/.fontconfig: invalid cache file: c938cb1e82ff5ba1829a2dab18b1c8a9-x86.cache-2
fc-cache: succeeded

but it has not made any changes regarding the fonts problem I have.

I find however these interesting:

/usr/X11R6/lib/X11/fonts: skipping, no such directory

There is no fonts directory in /usr/X11R6/lib/X11 (openSUSE 11.2). I think this path was inherited from 11.1, but why is it still scanned now?

Then there are those many “skipping, looped directory detected”. Sound like the fonts dir are cached twice ???

Maybe because that path is still in the Files section of your /etc/X11/xorg.conf. But it’s not a problem if a font directory is missing, it is just skipped. You shouldn’t bother about that warning. You can safely remove FontPath lines pointing to non existing directories from /etc/X11/xorg.conf if any.

I would assume that you did restart X after rebuilding the font cache.

The font path “/usr/X11R6/lib/X11/fonts” is not in xorg.conf, but I found it in /etc/fonts/fonts.conf :


	<dir>/usr/share/fonts</dir>
	<dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/opt/kde3/share/fonts</dir> <dir>/usr/local/share/fonts</dir>
	<dir>~/.fonts</dir>

A comment in fonts.conf also say :


	DO NOT EDIT THIS FILE.
	IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.

So I made another attempt to try to reconstruct a somehow messed-up font database.

From runlevel 3, as root, I tried:

/usr/sbin/fonts-config --force --verbose --debug >/home/amigaphil/fontsconfig.out

then reboot. (The output is 402 Kb long, so I won’t paste it here.)

  • I had some error messages (I should have had redirected STDERR as well) that said something like:

Couldn't determine full name for hrscc.pfa
Couldn't determine weight for hrscc.pfa
Couldn't determine family name for hrscc.pfa
...

Missing fonts ?

  • In the fontsconfig.out file, I can see that none of the MS TT fonts I have in /usr/local/share/fonts have been scanned. Probably because that path is not in xorg.conf and that fonts.conf is ignored (?)

  • In the end, nothing seems to have changed. fonts.conf is not rewritten (I can see the same font paths).

  1. Does the FireFox rendering engine rely on X to render the fonts in a web page ?

  2. Should I better move all the TT fonts from /usr/local/share/fonts to /usr/share/fonts/truetype and try again ?

  3. /usr/sbin/fonts-config is


Creating cache files for fontconfig ..................................................
exit status of fc-cache: 0
exit status of fc-cache: 0
exit status of fc-cache: 0

but:


# /usr/bin/xset fc s
server does not have extension for fc option

Should the X server HAVE that extension ? (Or is it unrelated ?)

Firefox can only use fonts that are available to X. So, I would say yes.

  1. Should I better move all the TT fonts from /usr/local/share/fonts to /usr/share/fonts/truetype and try again ?

Make sure that your /usr/local/share/fonts directory includes accurate index files or better recreate them with tools like ttmkfdir or mkfontscale (see manual pages).

I don’t know enough about fonts-config. I’ve managed so far to avoid touching /etc/fonts/fonts.conf too much. Normally you’re supposed to put your own changes - like adding font alias - in /etc/fonts/local.conf.
It is always possible (and easier) to add font paths in /etc/X11/xorg.conf. They should be parsed last (after fonts.conf).

/usr/bin/xset fc s

server does not have extension for fc option

Should the X server HAVE that extension ? (Or is it unrelated ?)

Do you mean : xset fp ?

cat /var/log/Xorg.0.log shows the font path (among other things).

xlsfonts shows the available fonts.