[luatex] strange behavior of zero-width box

Taco Hoekwater taco at elvenkind.com
Thu Jun 30 06:55:05 CEST 2011



On 06/30/11 03:18, Dohyun Kim wrote:
> Hi,
> 
> \font\X={Junicode-Regular:mode=node;salt=1}
> \font\Y={Junicode-Regular:mode=node;salt=2}
> \leavevmode\X\hbox{1\llap{\Y2}}3
> \bye
> 
> On compiling the above code with luatex-plain,
> I get a pdf in which "2" is overwritten on "3".  This is not correct, of course.
> 
> Now if I insert "\kern-52sp" (why 52sp? I don't know.)
> between "1" and "\llap", that is
> 
> \leavevmode\X\hbox{1\kern-52sp\llap{\Y2}}3
> 
> then "2" is correctly overwitten over "1".
> 
> I am not sure whether this problem comes from luatex engine
> or from luatex-plain macro.  So I'm posting here.

This seems to be an engine problem. Luatex does not output a text
matrix in between the '1' and '2' in the wrong case:

  1 0 0 1 91.925 714.792 Tm [<0014>]TJ
  [<0015>]TJ
  1 0 0 1 96.576 714.792 Tm [<0016>]TJ

It looks to me like that is because that matrix would be identical to
the first one.

The version with 52sp difference produces either

  1 0 0 1 91.925 702.837 Tm [<0014>]TJ
  1 0 0 1 91.924 702.837 Tm [<0015>]TJ
  1 0 0 1 96.575 702.837 Tm [<0016>]TJ

or

  1 0 0 1 91.925 702.837 Tm [<0014>]TJ
  1 0 0 1 91.926 702.837 Tm [<0015>]TJ
  1 0 0 1 96.575 702.837 Tm [<0016>]TJ

depending on the sign of the \kern. Hartmut?

Best wishes,
Taco






More information about the luatex mailing list