[tex-live] linking with fontconfig (xetex and xdvipdfmx)

Jonathan Kew jonathan_kew at sil.org
Wed Oct 4 10:50:56 CEST 2006


On 4 Oct 2006, at 12:24 am, Karl Berry wrote:

> So here is my next question: what version of fontconfig should we  
> build
> the TL binaries with, to maximize the chance of it working on users'
> systems?

Doesn't matter; anything in the 2.2.x - 2.4.x range seems to be OK.  
See below.

> For example, tug.org has only libfontconfig.so.1[.0.4].  It is a
> supported red hat enterprise release, fully patched, so it's not  
> just a
> matter of being out of date.  But I surmise that linking the binary
> against FC1 might make things fail when the user only has FC2,  
> given the
> major version change.  Or did they actually manage to keep things
> backward compatible?
>
> And I would surmise that linking against FC2 will fail on machines  
> with
> only FC1 installed.

The numbering here is a bit confusing (to me, at least).

AFAICT, all fontconfig releases (so far) are considered some form of  
"fontconfig 1", and this is reflected in package names such as  
"libfontconfig1" seen in some Linux distros. (I don't know what RHEL  
calls the package.) The version on tug.org appears to be 2.2.3; you  
can find these definitions in /usr/lib/fontconfig/fontconfig.h:

   #define FC_MAJOR        2
   #define FC_MINOR        2
   #define FC_REVISION     3

A call to FcGetVersion() confirms that this is the installed library  
version. (Yes, I just checked.)

However, there have been numerous releases in several "series", with  
the 2.2 series being oldish but still widespread at this point on  
older distributions; 2.3 was the current stable series until very  
recently; and 2.4 has just appeared.

I'm not sure if there have been new APIs added through the course of  
these releases, but at least for the basic APIs (that xetex is  
using), they remain binary-compatible. So for example, a binary built  
on my Ubuntu 6.06 system with FC 2.3.2 runs fine on tug.org using FC  
2.2.3. (The reverse should also be true, though I haven't tested it.)

Conclusion: it's fine to build the binaries with fontconfig 2.2.0 or  
newer, which seems to be the first stable release under that package  
name. (There was "fcpackage" before that, and some fontconfig-2.1.x  
dot releases leading up to the first "stable" 2.2 release; I haven't  
looked into compatibility that far back.) Users may see runtime  
performance improvements if they have more recent versions of the  
library, but the binaries should work with any release.

[All this is in the context of GNU/Linux. I assume the same will hold  
on other Unix-ish/X11 systems, provided libfontconfig is dynamically  
linked. On Mac OS X, we don't use fontconfig at all; fonts are  
managed through Apple Type Services instead. On Windows, Akira builds  
binaries that use fontconfig (static-linked, I believe, but the  
situation is different because it's not a normal part of the system's  
font management). A truly "native" Windows version, if/when it  
appears, may use a different approach.]

JK



More information about the tex-live mailing list