[XeTeX] experimental new xetex version - with margin-kerning support
Jonathan Kew
jonathan at jfkew.plus.com
Mon May 3 01:12:46 CEST 2010
For those who like to live on the cutting (bleeding?) edge, there is a new version of xetex available in the source repository. Version 0.9996.0 is now available from the svn repository at:
http://scripts.sil.org/svn-public/xetex/BRANCHES/microtype
This version supports "character protrusion", also known as margin kerning. The character protrusion feature is enabled by setting the parameter \XeTeXprotrudechars, equivalent to pdftex's \pdfprotrudechars.
The protrusion values are set using \lpcode and \rpcode. For TFM fonts, these work in the same way as the pdftex versions; for non-TFM (i.e. native TrueType/OpenType) fonts, they accept either a Unicode character code (prefixed by the keyword "unicode"), a glyph name (prefixed by "name"), or a glyph number. Thus, in the example:
\font\x = "Charis SIL" at 10pt
\rpcode \x unicode "2C = 100
\rpcode \x name "comma" = 100
\rpcode \x 15 = 100
the three \rpcode lines all have the exact same effect, as the comma glyph in this font has glyph ID 15.
In most cases, setting character protrusion values via Unicode codepoints will be the simplest and most robust approach; glyph names and glyph IDs are provided for cases such as contextual forms that are not directly accessible via Unicode character codes.
Note that LaTeX packages such as pdfcprot and microtype will not automatically work with this feature, but it should be possible to update them to recognize the new xetex version and handle it appropriately without too much difficulty.
Many thanks to Han The Thanh for his work on this!
JK
More information about the XeTeX
mailing list