[luatex] strange behavior of zero-width box

Hartmut Henkel hartmut_henkel at gmx.de
Thu Jun 30 14:08:07 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?

hm, it's ok with old-style Type1 fonts:

\pdfcompresslevel=0
\font\X=cmr10 % {Junicode-Regular:mode=node;salt=1}
\font\Y=cmbxti10 % {Junicode-Regular:mode=node;salt=2}
\leavevmode\X\hbox{1\llap{\Y2}}3
\bye

gives:

BT
/F51 9.96264 Tf 1 0 0 1 91.925 759.927 Tm [(1)]TJ
/F52 9.96264 Tf 1 0 0 1 91.018 759.927 Tm [(2)]TJ
/F51 9.96264 Tf 1 0 0 1 96.907 759.927 Tm [(3)]TJ
1 0 0 1 303.509 105.18 Tm [(1)]TJ
ET

no idea about the salt, will need checking...

Regards, Hartmut

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de


More information about the luatex mailing list