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

Keith Packard keithp at keithp.com
Thu Sep 10 20:06:24 PDT 2015


Alan Coopersmith <alan.coopersmith at oracle.com> writes:

> mkfontdir is now a wrapper around mkfontscale which doesn't use libXfont,
> just libfontenc & libfreetype.

Oh, nice. I hadn't realized that.

> bdftopcf could probably be similarly rewritten to use FreeType directly.

We'd have to provide pcfWriteFont for it, presumably by moving it from
libXfont, along with a bunch of font file writing functions that it uses.

> As far as I know, and as far as grep for "xfont" in configure.ac can find,
> only xfs & the X servers really still need libXfont.   (We used to call
> into libXfont from drivers, but xserver commit a00066d2916b6910429 moved
> to providing equivalent API from the X server instead.)

So, fixing bdftopcf to use FreeType for reading the BDF file, and then
copying pcfWriteFont into it would mean that libXfont2 wouldn't need to
provide any of the file writing functions. That would get us down to
just fontutil.h's functions along with the new libXfont2.h file for use
by the X and font servers.

If I recall correctly, libXfont still loses some XLFD font properties
when reading bitmap fonts using FreeType; when I did some investigation
around this a few years ago I remember thinking that it wouldn't be a
lot of work to throw all of the bitmap font file handling from libXfont
away and use FreeType for all local font reading.

-- 
-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/cab2674d/attachment.sig>


More information about the xorg-devel mailing list