[XeTeX] New feature planned for xetex

Jonathan Kew jfkthame at gmail.com
Thu Feb 18 15:38:02 CET 2016


On 18/2/16 14:02, Jiang Jiang wrote:
> Hi Jonathan,
> I suppose not everyone have a chance to build and try this yet. By any
> chance you can provide a PDF test case demonstrating the feature? Then
> perhaps more people can comment.
> - Jiang


OK, I'm attaching three PDFs, all showing the same text set with the AAT 
font:

   "Hoefler Text Italic:
    Smart Swashes=Word Initial Swashes,Word Final Swashes" at 18pt

Here's what they show:

[hoefler-italic-old-1.pdf]
This is what "old" xetex (i.e. the currently-released version) does. 
Note that some lines -- e.g. line 5 in the first paragraph, as well as a 
couple of lines in the middle of the second -- look really bad, with 
excessively loose spacing.

[hoefler-italic-level0.pdf]
This is produced with "new" (unreleased) xetex, with 
\XeTeXinterwordspaceshaping set to zero (disabled). Note all the 
word-initial and word-final swash forms. Hoefler doesn't really want to 
use these all over the place within the lines, but because xetex shapes 
each word in isolation, it doesn't know any better. This is also the 
effect you'd get with old xetex if the font were using OpenType or 
Graphite shaping features, rather than AAT: with those technologies, it 
never even attempts cross-space reshaping.

This serves to illustrate how the poor spacing in the "old" version 
arises. Note that it has the exact same line breaks; that's because old 
xetex is using these measurements for the words, and breaking lines on 
that basis. Later, it allows each line to be re-shaped as a unit (so 
most of the swashes disappear), but then it's too late to fix the line 
breaks.

[hoefler-italic-level2.pdf]
Finally, here's the "good" version, with \XeTeXinterwordspaceshaping=2. 
Now, the final swashes appear only at line ends (as intended by the 
font, and as seen in the old version with the poor spacing), but now the 
line breaks are correct and spacing is much more consistent.

I didn't include a "level 1" PDF, as that's not really useful with a 
font like this.

(You'll also notice that there's letter-spacing being used to justify 
the text in these examples. That's a feature of the AAT font and Core 
Text implementation; you wouldn't see that if this were an OpenType font.)


I'll follow up with an Urdu example, too...

JK

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hoefler-italic-old-1.pdf
Type: application/pdf
Size: 17115 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20160218/e8b98fa9/attachment-0003.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hoefler-italic-level0.pdf
Type: application/pdf
Size: 16669 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20160218/e8b98fa9/attachment-0004.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hoefler-italic-level2.pdf
Type: application/pdf
Size: 16949 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20160218/e8b98fa9/attachment-0005.pdf>


More information about the XeTeX mailing list