[RFC] xfs catalogues.d

Kristian Høgsberg krh at bitplanet.net
Wed Jun 6 11:57:33 PDT 2007


On 6/6/07, Ademar de Souza Reis Jr. <ademar at mandriva.com.br> wrote:
> On Tue, Jun 05, 2007 at 05:59:28PM -0400, Kristian Høgsberg wrote:
> > On 6/5/07, Ademar de Souza Reis Jr. <ademar at mandriva.com.br> wrote:
> > > Hi there.
> > >
> > > xfs currently has its list of catalogues (font directories)
> > > inside its configuration file (e.g. /usr/lib/X11/fs/config).
> > >
> > > Font directories are added/removed by changing this configuration
> > > file, usually calling an application such as chkconfig. On xfs
> > > upgrades, it's necessary to validate the config file and import
> > > the changes from the old configuration file to the new one.
> > > As we all know, handling a config file automagically is quite
> > > error prone.
> > >
> > > I would like to improve this schema by implementing a dynamic
> > > catalogues.d/ directory where one could just add files containing
> > > the entries (similar to the mechanism used by several known
> > > projects). This way it would be trivial to add/remove entries and
> > > the upgrade scenario would be clean.
> > >
> > > I would also change the chkconfig utility (used by most
> > > Linux distributions, don't know about other OSes) to accept a new
> > > cmdline option to handle the catalogues.d entries.
> > >
> > > The change would keep backward compatibility (catalogues= would
> > > still be accepted inside the config file and chkconfig would
> > > still work the old way by default).
> > >
> > > Comments? In particular, besides chkconfig, how else are
> > > catalogues handled? Is there any other tool to optimize this
> > > task?
> >
> > We've (Fedora) been talking about how to make this less painful, and
> > so far, the simplest and easiest idea we've come up with is to add
> > recursive scanning.  So instead of specifying each individual font
> > dir, we could add a new type of fpe that takes a top level directory
> > and recursively descends into all subdirectories, looking for
> > fonts.dir files.
>
> And how do you plan to control the order in which the
> font-paths are listed, since it apparently matters?

Hm,  I guess you could encode it in the path? For example,

    /usr/share/fonts/10-important-fonts/fonts.dir
    /usr/share/fonts/10-important-fonts/<fonts>
    /usr/share/fonts/20-fonts-that-come-after-those-other-fonts/fonts.dir
    ...
    /usr/share/fonts/90-old-and-ugly-fonts-that-should-be-list-last/fonts.dir

That approach will work for either your original idea or my
recursive-scanning idea.  But either way is good.  As long as we get
some mechanism that allows us to drop in core fonts without rewriting
xfs or xorg config file, I'm happy :)

cheers,
Kristian


More information about the xorg mailing list