On 28/06/2019 08:32, Ulrike Fischer wrote:
Am Thu, 27 Jun 2019 23:03:09 +0000 schrieb Ross Moore:

there is probably something wrong with XeLaTeX, but I cannot find what.

The difference between xetex and xelatex is the font:

I’m sorry but I don’t understand this as an answer.

It wasn't meant as an answer. I only explained why you get different
results with plain and latex: because they use different default
fonts.

Put another way, the result of the test should not depend upon the initial use 
of  \kern2019sp  at all.
However, if it is commented-out, then  XeTeX does give  n , so the  y  is *not* 
coming from the letter A .

xetex has a different typesetting engine: it doesn't handle chars
but words as units.

See page 31 here http://xml.web.cern.ch/XML/lgc2/xetexmain.pdf.

So I'm not really surprised that you get the y, I was more suprised
that it doesn't happen with legacy fonts - there it seem to switch
back to the "handle characters" mode.

Yes, the bug arises because of how xetex collects a series of characters to be "shaped" by an opentype font, rather than the core tex engine handling each character individually. So at the point when \lastkern is encountered, the letter A has not yet been appended to the current node list being built; it is "pending" in the buffer of characters that will become a whole-word node.

Still, I would regard this as a bug that we ought to fix. I imagine similar primitives like \lastpenalty or \lastskip probably share the same buggy behavior.

JK

Reply via email to