[XeTeX] Latin Modern in XeTeX?

Jonathan Kew jonathan_kew at sil.org
Thu Jun 10 13:40:04 CEST 2004

On 10 Jun 2004, at 10:42 am, Will Robertson wrote:

> On 10 Jun 2004, at 6:35 PM, Jonathan Kew wrote:
>> 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 
>> equivalent.
> Oh I get it now! (Mind flashes back to finding all of the `normal' pfb 
> fonts converted to opentype...duh, how obvious.) May I ask what 
> program you used to perform these conversions?

I ran a Python script in FontLab 4.6 to read the .pfb files and (in 
some cases) rearrange the glyph list, and then generate the 
.otf-packaged version of the font, along with a glyph names file; then 
used ftxdumperfuser (from the Apple Font Tools suite) to put the glyph 
names into the font's 'post' table so that xdv2pdf can apply .enc files 
if necessary.

> Meanwhile, with a vanilla fontforged otf of lmr10.pfb in a /font/otf/ 
> directory, as well as in a /font/otf/xetex/public/lm/ one, xelatex 
> gives me the following error:
> (/Users/will/Library/texmf/tex/latex/lm/t1lmr.fd) [1] (./lm.aux)
> *** format 3 'post' table; cannot reencode font cork-lmr10  )

Yup. Figures. xdv2pdf can't actually interpret the Type1 data to find 
glyphs by name; in order to do encoding stuff it needs a 'post' table 
that lists the glyphs (format 3 doesn't). See above.

You need that as-yet-unwritten document on XeTeX and fonts and 
encodings and all that mess.........!

> So there looks to be some funny encoding going on. More investigation 
> is required! I guess first I gotta work out how to make xelatex to 
> look at the other encodings available.
> On a slightly different topic: one of my problems was that I was 
> trying to typeset the Latin Modern fonts next to the CM ones to 
> compare them, but I didn't know how to get them: \font\lmrpfb=lmr10 at 
> 10pt didn't work because the tfm files were not the same name in order 
> to cater for different encoding schemes. I solved this using the 
> LaTeX2e command \DeclareFixedFont{\lmrpfb}{T1}{lmr}{m}{n}{10} --- 
> anyone know of a way to do it in plain (Xe)TeX alone?

Seems like you should be able to do it; whatever you're doing in LaTeX 
must ultimately result in a \font command at the TeX level. I don't 
know how that's constructed from your declaration, though.

If there's a mismatch between the TFM name and the internal font name 
that Apple Type Services sees (look in FontBook), you can use the 
psfonts.map entry to deal with this.


More information about the XeTeX mailing list