[PATCH libXfont] Add a new 'catalogue' FPE, which takes font paths from symlinks in a dir.
Kristian Høgsberg
krh at bitplanet.net
Thu Jun 21 08:01:14 PDT 2007
On 6/21/07, Colin Guthrie <gmane at colin.guthr.ie> wrote:
> Eamon Walsh wrote:
> > Kristian Høgsberg wrote:
> >> Oh, and if nobody objects or suggests improvements within the next
> >> couple of days, I'll commit it an cut a libXfont release. There,
> >> you've been warned.
> >
> > From another mail:
> >
> > > + 75dpi:unscaled:pri=20 \-> /usr/share/X11/fonts/75dpi
> > > + ghostscript:pri=60 \-> /usr/share/fonts/default/ghostscript
> > > + misc:unscaled:pri=10 \-> /usr/share/X11/fonts/misc
> > > + type1:pri=40 \-> /usr/share/X11/fonts/Type1
> > > + type1:pri=50 \-> /usr/share/fonts/default/Type1
> >
> >
> > What is the point of putting the font name (fixed, 75dpi, whatever) in
> > the symlink name. It's evident from the symlink destination.
> >
> > If unscaled is the only option, why not simplify the symlink name to
> > <priority>[unscaled], i.e.
> >
> > 20unscaled \-> /usr/share/X11/fonts/75dpi
> > 60 \-> /usr/share/fonts/default/ghostscript
> > 10unscaled \-> /usr/share/X11/fonts/misc
> > 40 \-> /usr/share/X11/fonts/Type1
> > 50 \-> /usr/share/fonts/default/Type1
> >
> > This would clean things up a lot.
>
> Well what's to say two separate font-providing packages don't pick the
> same priority?
Exactly. I was planning to use the RPM name as the symlink name, so
that the RPM package name space can provide unique names.
> By putting the name in there, you are at least reducing the potential
> for overlap and IMO it gives a quick glance look at the order and fonts
> loaded without having to dereference all the symlinks (although I can't
> fault your logic there!).
>
> I was also a bit confused as to why priority wasn't listed first tho' -
> would mean it could just be processed in alphabetical file order (unless
> I've misread and pri is optional - I thought it was mandatory?)
Right, I considered both. The problem is that I only store the
FontPathElementRec structs per symlink, and they only record the
symlink destination and the attributes. So after I've scanned the
directory I can't really sort on symlink name easily. It's doable, of
course, but it's actually easier to just stick the priority in an
attribute.
Kristian
More information about the xorg
mailing list