Where should the modular X11R7 fonts get installed to?

Mike A. Harris mharris at redhat.com
Sun Nov 6 16:28:09 UTC 2005


Matthew Miller wrote:
> On Sun, Nov 06, 2005 at 10:13:06AM -0500, Mike A. Harris wrote:
> 
>>I'm currently of the opinion that we should install the X.Org
>>fonts into "/usr/share/fonts/X11", to have them installed into
>>an FHS compliant location, but also in their own namespace, thus
>>avoiding conflicts with other packages.
> 
> 
> I think this is nicest. I like it more than the /usr/share/X11/fonts
> alternative, because if one is looking for "what's part of X"? I think one
> is more likely to ask rpm; if one is looking for "where are all the various
> the font files", it's handy for them to be under one obvious place.

I agree, however there's an additional complication involved that
I hadn't thought of before.  In Fedora Core 4 and earlier, the
fontconfig subsystem was only preconfigured to use the following
font directories:

         <dir>/usr/share/fonts</dir>
         <dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
         <dir>/usr/X11R6/lib/X11/fonts/OTF</dir>
         <dir>~/.fonts</dir>

Fontconfig is recursive, meaning it will find all fonts in all
subdirectories of what is listed in fonts.conf.

I believe Owen, or whoever set up our default fonts.conf configuration,
intentionally selected only the above specific /usr/X11R6 font
directories, in order to pick up the scaleable Type1 and OTF fonts
that come with X, intentionally excluding all of the ugly bitmap
fonts and other weirdo fonts from being seen by fontconfig.

If we put all of the fonts into /usr/share/fonts, then fontconfig
will see all of them now, and this might cause you to get a different
font than you expected for a given name, whereas fontconfig would
not have seen them all before.

Another possible problem, is that I'm not sure if fontconfig/Xft
support all of the font types that are supported by the core fonts
system.

Note that these are currently only theoretical problems.  I don't
know if there should be a real concern for these issues or not, as
I haven't tested anything yet.

If someone is interested in testing it however, and seeing the effects,
you can do:

1) Make a backup of /etc/fonts/fonts.conf somewhere safe.

2) Edit /etc/fonts/fonts.conf and remove the 2 existing entries:
         <dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
         <dir>/usr/X11R6/lib/X11/fonts/OTF</dir>

3) Put in a new entry:  <dir>/usr/X11R6/lib/X11/fonts</dir>

4) Run:  fc-cache /usr/share/fonts
          fc-cache /usr/X11R6/lib/X11/fonts

5) Completely reboot your whole system, to ensure that all apps are
    restarted, etc. like they would be after a normal reboot.

6) Log into X, and experiment with various GNOME/KDE applications,
    and see if any fonts have changed, or if anything is now unexpectedly
    ugly by default.

After testing this, please post a reply to this email back to the
list.

If it turns out that having *all* of the X11 supplied fonts visible
to fontconfig is a bad idea, then we can explore other options.  Please
feel free to make suggestions also.

Thanks to everyone who responded so quickly!




More information about the fedora-devel-list mailing list