[XeTeX] XeTeX, fontspec, OTF, and fontdimens

Khaled Hosny khaledhosny at eglug.org
Sun Feb 20 16:14:05 CET 2011


On Sun, Feb 20, 2011 at 08:50:09AM -0600, mskala at ansuz.sooke.bc.ca wrote:
> On Sun, 20 Feb 2011, Peter Dyballa wrote:
> > > Loading fontspec causes it to use Latin Modern and we're back where we
> > > started.
> >
> > XeTeX' Computer Modern default is actually Latin Modern. Without fontspec it
> > loads the PostScript variants of Computer Modern. Latin Modern is constructed
> > as an OpenType font, PostScript based, to act exactly like CM.
> 
> There is clearly some meaningful difference between the two scenarios
> because without fontspec, the interword space is correct - it scales with
> the font but doesn't become stretchable.  With fontspec and not WordSpace,
> the space scales but is stretchable; with fontspec and an appropriate
> WordSpace setting, the space is non-stretchable, but doesn't scale.
> 
> Without fontspec, pdffonts reports the font as:
> 
> name                                 type              emb sub uni object ID
> ------------------------------------ ----------------- --- --- --- ---------
> JFXQIA+CMTT12                        Type 1C           yes yes no       4  0
> 
> With fontspec (no other changes, just loading the package), it looks like:
> 
> name                                 type              emb sub uni object ID
> ------------------------------------ ----------------- --- --- --- ---------
> JXESXO+LMMono12-Regular-Identity-H   CID Type 0C       yes yes yes      5  0
> 
> I wonder if the difference is simply that there are TFM files for
> Postscript Computer Modern and not for OpenType Latin Roman; and in that
> case maybe it could be addressed by creating TFM files for Latin Roman.
> I don't know if XeTeX will look for and load a TFM file in the case of an
> OpenType font, but if it could, maybe that would be a solution. One
> sticking point, of course, would be the 256-character limit of TFM files.

You can always convert OpenType fonts to Type1 + TFM using otftotfm[1],
but you will have to load the fonts the old way (no fontspec).

[1] http://www.lcdf.org/type/otftotfm.1.html

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian


More information about the XeTeX mailing list