[XeTeX] Latin Modern in XeTeX?

Jonathan Kew jonathan_kew at sil.org
Thu Jun 10 11:05:22 CEST 2004

On 10 Jun 2004, at 3:37 am, Will Robertson wrote:

> Hi
> First off, great work with XeTeX so far! I'm quite in awe that it now 
> supports both ATSUI & OpenType; better than Mac OS X itself.

Thanks! :-)

> I'm having some difficulty using the Latin Modern fonts (for 
> comparison with the otf ones I'm --- slowly! --- still attempting to 
> create). I assume this is because the tfm files are set up for 
> multiple encodings and XeTeX doesn't know which one to choose. (I'm 
> not particularly knowledgeable about the methods TeX uses to select 
> fonts; I only know the commands!)
> ------SAMPLE FILE------
> %&personallatex
> \documentclass{article}
> \usepackage[T1]{fontenc}
> \usepackage{lmodern}
> \setlength{\parindent}{0pt}
> \def\pangram{\bigskip{Pack my box with five dozen liquor jugs}\par}
> \font\cmrtex=cmr10 at 10pt
> \begin{document}
> \fbox{LMR10: \pangram}\par
> \fbox{\cmrtex CMR10: \pangram}
> \end{document}
> ------END------
> Is there something trivial I'm overlooking?
> Another phrasing of the question I suppose is:
> How I may use the \font command to choose a LM font, since the tfm 
> files are labelled differently to the pfb files?

XeTeX doesn't know anything about .pfb files; is that your basic 
problem? When xdv2pdf reads psfonts.map to help it locate font files, 
it takes the base name of the .pfbs listed there and looks for a .otf 

If you have the LM fonts installed in OS X such that standard Mac 
applications can see them, then it ought to be possible to use them; in 
that situation, it doesn't care what font format they are, as it simply 
uses Apple Type Services APIs to access them. You might need entries in 
psfonts.map to specify the "real" font name that corresponds to a given 
tfm name, without listing a downloadable file.

Whether the encoding will be right, though, is anyone's guess! The 
whole world of legacy font and input encodings is something that's 
rather foreign to XeTeX; it is a Unicode system at heart. I've tried to 
set things up so that a good deal of legacy TeX stuff can still work, 
but there are limitations.

OK, what is really needed is a document I've been thinking about, but 
haven't had time to actually write yet: "How XeTeX works with legacy 
fonts". Some day...........


More information about the XeTeX mailing list