[XeTeX] Using legacy Type1 fonts in XeTeX

Jonathan Kew jonathan_kew at sil.org
Tue Aug 22 14:47:45 CEST 2006


On 22 Aug 2006, at 1:33 pm, Jjgod Jiang wrote:

> Hi,
>
> I've been trying to use some Type1 fonts directly via XeTeX,
> but it's seems XeTeX does not support all the features of it,
> I would like to know:
>
> 1. Does XeTeX supports replace ligatures automatically?

No, not with legacy Type 1 fonts (and no TFM files). It supports AFM  
kerning, but not ligatures.

> for example, if I have a font which does have "fi" or "ffi" glyph,
> and the following macro works fine:
>
> \def\getglyph#1{\count255=\XeTeXglyphindex "#1"%
>   \ifnum\count255>0 \XeTeXglyph\count255 \else [#1]\fi}
>   \font\A='[SabonNextLT-Regular]' \A
>
> \getglyph{fi}
>
> (yep, I'm using Linotype Sabon Next for testing, SabonNextLT- 
> Regular.pfb
> and SabonNextLT-Regular.afm is in the current directory)
>
> But writing "fi" literally does not have ligature effect.

Out of interest, does the AFM file specify such ligatures (not just  
list the glyph, but also how it should be composed from "f" and "i")?  
I don't have an example on hand.

(But even if it does, there is no mechanism in XeTeX to use this at  
present. Automatic ligatures are supported via OpenType tables.)

>
> 2. Does XeTeX supports the binary metrics format (.pfm)? or may be
> it's depend on FreeType?

Currently, it only attempts to load an AFM file, not PFM. I was told  
that Freetype may have some problems with attaching PFMs to a font  
face, so I have not added support for these, but it would be a  
trivial patch (just a few extra lines in XeTeXFontInst_FT2.cpp, at  
around line 85) if you want to try it.

JK



More information about the XeTeX mailing list