[PATCH libXfont] Eliminate calls back to X server or font server functions by name (v2)

Keith Packard keithp at keithp.com
Thu Sep 10 10:44:44 PDT 2015


Emil Velikov <emil.l.velikov at gmail.com> writes:

> Had a long hard look at the Archlinux repos and did not see (m)any
> libxfont users outside of xserver. Would you/others know if they're
> still a thing or they share the same faith as the print server :-)

There really shouldn't be any other than the X font utilities (bdftopcf,
mkfontdir, etc).

I played around with getting rid of libXfont from the X server entirely;
for font files, you really want to just use libfreetype as that already
works for all font files, and that leaves only font server access.

It turns out that fontserver access from the X server has been broken
for several years; I'm wondering if it might not be time to just go
delete that code now...

> As usual I'm thinking of various 'smart' moves that users opt for - in
> particular $LD_PRELOAD=...libXfont.so startx.
> Obviously the LD_PRELOAD is likely to be set in some crazy script, as
> it "made app X work" and it won't be immediately obvious.

That's an awful notion. Seems unlikely, given the number of applications
using libXfont, but as you say, crazy stuff happens.

> Fwiw I'd vote for 2) as it will make it harder for anyone to mix
> and/or match headers between the two version.

Another option I thought of this morning would be to merge the font
utilities into the library sources and ship them together; we wouldn't
need to install anything but the tiny libxfont2.h header with the
fontutil.h functions added there.

> Of course it helps nicely with the LD_PRELOAD 'issue'. Namely:
>
> - Add the ~10 functions from fontutil.h to libxfont2.h
> - Change/add a common prefix (break the API) for all
> - Hide the other ~210 symbols from libXfont.so :-)
>
> Admittedly it will be more work, but it sounds like a nice, robust
> (cough idiot proof :-P) solution. Fwiw I might be able to help a bit,
> if that's the major concern.

It's all yak shaving at this point -- I'm working on moving the X server
to epoll, and that means changing parts of the libXfont API; once I
opened up that can of worms, it's hard to stop before we make it
actually sensible at some level.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150910/bd5ecfab/attachment.sig>


More information about the xorg-devel mailing list