[XeTeX] Microtypography?

Jonathan Kew jonathan_kew at sil.org
Thu May 11 10:26:45 CEST 2006

On 10 May 2006, at 11:36 pm, Will Robertson wrote:

> On 11/05/2006, at 4:14 , Geoffrey Alan Washburn wrote:
>> I think protrusion might not be too difficult, but support for
>> expansion/shrinking of glyphs could be quite complex depending upon
>> the
>> rendering API you have available.
> Off the top of my head, I'm pretty sure that the AAT font format can
> support optical protrusion,

Yes, the 'opbd' table is defined for that purpose. And if it were  
present in the font, XeTeX could use it. Try finding a font that has  
one, though....

> and *fairly* sure that OpenType can do it
> as well.

I don't recall seeing this in the OpenType spec, but I'm less  
familiar with that.

> It's firstly a matter of font support (which is true in
> pdfTeX as well)

I had the impression that in pdfTeX, this information is provided  
from within the TeX document (or, equivalently, a LaTeX package,  
etc), in the form of values per character/font. (But as mentioned,  
setting protrusion metrics on a per *character* basis is wrong, in  
the XeTeX world; it would have to be per *glyph*.)

> and secondly a matter of XeTeX support, which would
> be tricky since it uses its own justification algorithm instead of
> ATSUI/<whatever it is Linux uses>.

Actually, when working with ATSUI on OS X, XeTeX uses a hybrid of TeX  
and ATSUI justification. This can be seen if you set a paragraph that  
includes very loose lines in an AAT font such as Hoefler; you'll see  
effects such as variations in letter spacing and ligature  
decomposition (when the stretch becomes excessive), which are  
specified by the AAT 'just' table in the font. To see ATSUI  
justification effects, try this:

% - - - - -
%!TEX TS-program = xetex
\font\x = "Hoefler Text" at 12pt \x
\hsize=2in \tolerance=10000

The five quick brown foxes jump over the lazy dog.
The five quick brown foxes jump over the lazy dog.

% - - - - -

Note how the first (very loose) line appears in the output. (Whether  
this is a good thing is, of course, open to debate.... Knuth wouldn't  
like it!)

There's no equivalent support for the OpenType 'JSTF' at this point,  
though. This whole area is not yet very well developed in XeTeX.


More information about the XeTeX mailing list