[luatex] an issue with \rpcode

luigi scarso luigi.scarso at gmail.com
Mon Oct 13 14:13:31 CEST 2014


On Mon, Oct 13, 2014 at 12:48 PM, Ulrike Fischer <luatex at nililand.de> wrote:

> Am Sun, 12 Oct 2014 13:38:47 +0200 schrieb Hans Hagen:
>
>
> >> in essense it looks as if \rpcode is not ending up in the char table
> >> unless \lpcode for the same char is set first (and non-zero)
>
> > \starttext
> >
> > \directlua{
> >      function fonts.constructors.aftercopyingcharacters(target,original)
> >          target.cache = "renew"
> >      end
> > }
> >
> > \pdfprotrudechars=1
> >
> > \font\foo = LMRoman10-Regular*default,quality at 12.3pt
> >
> > \foo
> >
> > \lpcode\foo 45 = 2000\relax
> > \rpcode\foo 45 = 2000\relax
> > \efcode\foo 45 = 4000\relax
> >
> > \directlua{
> >      print("data at tex end")
> >      inspect(font.fonts              [font.current()].characters[45])
> >      print("original passed data")
> >      inspect(fonts.hashes.identifiers[font.current()].characters[45])
> > }
> >
> > test
> >
> > \stoptext
>
>
> When I comment the \lpcode line in this code it shows the same
> problem that Frank mentioned at the begin: the right_protrusion
> value is missing in the table.
>
>
>
> --
> Ulrike Fischer
> http://www.troubleshooting-tex.de/
>
> hm  I see in the code


  if (get_charinfo_lp(co) != 0) {
        lua_pushstring(L, "left_protruding");
        lua_pushnumber(L, get_charinfo_lp(co));
        lua_rawset(L, -3);
    }

    if (get_charinfo_lp(co) != 0) {
        lua_pushstring(L, "right_protruding");
        lua_pushnumber(L, get_charinfo_rp(co));
        lua_rawset(L, -3);
    }

but I guess from pdftex.web that it should be

  if (get_charinfo_lp(co) != 0) {
        lua_pushstring(L, "left_protruding");
        lua_pushnumber(L, get_charinfo_lp(co));
        lua_rawset(L, -3);
    }

    if (get_charinfo_rp(co) != 0) {
        lua_pushstring(L, "right_protruding");
        lua_pushnumber(L, get_charinfo_rp(co));
        lua_rawset(L, -3);
    }


directlua{
    function fonts.constructors.aftercopyingcharacters(target,original)
        target.cache = "renew"
    end
}

\pdfprotrudechars=1

\font\foo = file:lmroman12-regular
\foo

%\lpcode\foo 45 = 2000\relax
\rpcode\foo 45 = 2000\relax
\efcode\foo 45 = 4000\relax

\directlua{
    print("data at tex end")
    inspect(font.fonts              [font.current()].characters[45])
    print("original passed data")
    inspect(fonts.hashes.identifiers[font.current()].characters[45])
}

test
\bye


data at tex end
table={
 ["bot_accent"]=0,
 ["depth"]=0,
 ["expansion_factor"]=4000,
 ["height"]=191103,
 ["index"]=64,
 ["italic"]=0,
 ["right_protruding"]=2000,
 ["top_accent"]=0,
 ["used"]=false,
 ["width"]=256377,
}
original passed data
table={
 ["height"]=191102.976,
 ["index"]=64,
 ["width"]=256376.832,
}





Committed revision 5063, luatex experimental.

--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20141013/28ce9f1f/attachment.html>


More information about the luatex mailing list