[XeTeX] Declaring OTP fonts on Linux

Jonathan Kew jonathan_kew at sil.org
Sat Mar 17 20:38:01 CET 2007


On 17 Mar 2007, at 7:11 pm, Michel Goossens wrote:

> Hello,
>
> I just installed TeXLive 2007 on Linux and wanted to try and run
> xelatex, where I ran fc-cache on the directories where my otf
> files are. However, xetex does not seem the find the file (in my case
> Caslon Pro Regular). Also fc-list has no Jenson in its list,
> although kpsewhich finds the file in question , i.e.,
>> kpsewhich ajensonpro-regular.otf
> /texlive/2007/texmf-commercial/fonts/opentype/adobe/ajensonpro- 
> regular.otf
>
> What is the correct way of telling xetex where otf and ttf files  
> reside
> on Linux? Thanks for your help. mg

XeTeX finds fonts using fontconfig, like many (most?) GUI  
applications in the Linux world. Fontconfig in turn relies on a  
configuration file (usually /etc/fonts/fonts.conf, I think) that  
tells it where the system font directories are.

In most cases, the simplest place for an end user to install fonts is  
~/.fonts, a hidden directory in your home dir; you may even be able  
to do that through a Gnome or KDE utility. That should make the fonts  
available to applications run by a specific user.

To make them available to all users, you'd need to put them in a  
system-wide location, probably something like /usr/share/fonts unless  
your distro is configured very differently from mine.

XeTeX can also find fonts in the texmf tree using kpathsearch, but to  
do this you have to specify them by "[filename]" rather than "real  
font name" in the document. Thus, you'd say something like \font 
\x="[ajensonpro-regular]" rather than \font\x="Adobe Jenson Pro".

I don't generally recommend this, as you lose some of the benefits of  
XeTeX and fontspec.sty (e.g., automatic support for font families and  
optical sizes), and have to do more of the work explicitly. But if  
you want XeTeX to use a font *without* making it available to GUI  
applications in general, it's possible.

JK



More information about the XeTeX mailing list