[XeTeX] XeTeX page on tug.org

Ken Brown kbrow1i at gmail.com
Wed Jun 17 16:31:05 CEST 2009


On 5/29/2009 10:33 AM, François Charette wrote:
> Upon Karl Berry's suggestion, I have assembled a collection of links 
> pertaining to XeTeX. It is now available at
> 
>         http://tug.org/xetex/
> 
> Suggestions for additions and improvement are welcome! You can either 
> send them to me or directly to Karl Berry.

Following up on some private email discussions, I'd like to suggest that 
you include (or link to) instructions for setting up fontconfig on 
unix-like systems with texlive installed, so that xetex will find the 
fonts shipped with texlive.  After some experimentation, I came up with 
the following recipe; I hope people who are knowledgeable about 
fontconfig will correct any mistakes.

-----------------------------

To set up the texlive fonts for system-wide use (assuming you have 
suitable privileges):

1. Create a file /etc/fonts/texlive.conf with contents something like 
the following (suitably adapted to the texlive installation directory):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  <fontconfig>
    <dir>/usr/local/texlive/2009/texmf-dist/fonts/opentype</dir>
    <dir>/usr/local/texlive/2009/texmf-dist/fonts/truetype</dir>
    <dir>/usr/local/texlive/2009/texmf-dist/fonts/type1</dir>
</fontconfig>

2. Create a file /etc/fonts/conf.avail/55-texlive.conf with the 
following contents:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
         <!-- Load texlive customization file -->
         <include ignore_missing="yes">texlive.conf</include>
</fontconfig>

3. Create a symlink to the latter in /etc/fonts/conf.d:

$ cd /etc/fonts/conf.d
$ ln -s ../conf.avail/55-texlive.conf .

4. Run 'fc-cache -s' (or 'fc-cache -sv' if you want to see what's 
happening).

Xetex should now be able to find the texlive fonts.

If you do not have sufficient privileges to carry out the steps above, 
you can instead do the following to make the texlive fonts available to 
you as an individual xetex user:

a. Create a file .fonts.conf in your home directory, with contents like 
those in step 1.

b. Run 'fc-cache' (or 'fc-cache -v').  This step is optional; if you 
don't do it, xetex will do it for you the first time you run it.

---------------------------------------

Final comment: The texlive developers have been discussing the 
possibility of simplifying this task.  The most recent proposal is that 
after xetex is installed, the installer will create the file 
texlive.conf (with paths adjusted to reflect the texlive installation 
directory).  The installer will *not* carry out the steps above, but it 
will print a message pointing the user to instructions.

Ken

P.S. The directories /etc/fonts, /etc/fonts/conf.d, and 
/etc/fonts/conf.avail that I referred to in my instructions are 
appropriate for my system (cygwin) and two linux systems that I know of. 
  I'm hoping that fontconfig is standardized enough that they are 
appropriate for all unix-like systems.  If not, the instructions will 
have to be rewritten to account for this.


More information about the XeTeX mailing list