<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 13, 2014 at 12:48 PM, Ulrike Fischer <span dir="ltr"><<a href="mailto:luatex@nililand.de" target="_blank">luatex@nililand.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Am Sun, 12 Oct 2014 13:38:47 +0200 schrieb Hans Hagen:<br>
<span class=""><br>
<br>
>> in essense it looks as if \rpcode is not ending up in the char table<br>
>> unless \lpcode for the same char is set first (and non-zero)<br>
<br>
</span><span class="">> \starttext<br>
><br>
> \directlua{<br>
>      function fonts.constructors.aftercopyingcharacters(target,original)<br>
>          target.cache = "renew"<br>
>      end<br>
> }<br>
><br>
> \pdfprotrudechars=1<br>
><br>
> \font\foo = LMRoman10-Regular*default,quality at 12.3pt<br>
><br>
> \foo<br>
><br>
> \lpcode\foo 45 = 2000\relax<br>
> \rpcode\foo 45 = 2000\relax<br>
> \efcode\foo 45 = 4000\relax<br>
><br>
> \directlua{<br>
>      print("data at tex end")<br>
>      inspect(font.fonts              [font.current()].characters[45])<br>
>      print("original passed data")<br>
>      inspect(fonts.hashes.identifiers[font.current()].characters[45])<br>
> }<br>
><br>
> test<br>
><br>
> \stoptext<br>
<br>
<br>
</span>When I comment the \lpcode line in this code it shows the same<br>
problem that Frank mentioned at the begin: the right_protrusion<br>
value is missing in the table.<br>
<span class=""><font color="#888888"><br>
<br>
<br>
--<br>
Ulrike Fischer<br>
<a href="http://www.troubleshooting-tex.de/" target="_blank">http://www.troubleshooting-tex.de/</a><br>
<br>
</font></span></blockquote></div>hm  I see in the code<br><br><div><br></div>  if (get_charinfo_lp(co) != 0) {<div class="gmail_extra">        lua_pushstring(L, "left_protruding");</div><div class="gmail_extra">        lua_pushnumber(L, get_charinfo_lp(co));</div><div class="gmail_extra">        lua_rawset(L, -3);</div><div class="gmail_extra">    }</div><div class="gmail_extra"><br></div><div class="gmail_extra">    if (get_charinfo_lp(co) != 0) {</div><div class="gmail_extra">        lua_pushstring(L, "right_protruding");</div><div class="gmail_extra">        lua_pushnumber(L, get_charinfo_rp(co));</div><div class="gmail_extra">        lua_rawset(L, -3);</div><div class="gmail_extra">    }</div><div class="gmail_extra"><br></div><div class="gmail_extra">but I guess from pdftex.web that it should be </div><div class="gmail_extra"><br></div><div class="gmail_extra">  if (get_charinfo_lp(co) != 0) {<div class="gmail_extra">        lua_pushstring(L, "left_protruding");</div><div class="gmail_extra">        lua_pushnumber(L, get_charinfo_lp(co));</div><div class="gmail_extra">        lua_rawset(L, -3);</div><div class="gmail_extra">    }</div><div class="gmail_extra"><br></div><div class="gmail_extra">    if (get_charinfo_rp(co) != 0) {</div><div class="gmail_extra">        lua_pushstring(L, "right_protruding");</div><div class="gmail_extra">        lua_pushnumber(L, get_charinfo_rp(co));</div><div class="gmail_extra">        lua_rawset(L, -3);</div><div class="gmail_extra">    }</div><div><br></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">directlua{</div><div class="gmail_extra">    function fonts.constructors.aftercopyingcharacters(target,original)</div><div class="gmail_extra">        target.cache = "renew"</div><div class="gmail_extra">    end</div><div class="gmail_extra">}</div><div class="gmail_extra"><br></div><div class="gmail_extra">\pdfprotrudechars=1</div><div class="gmail_extra"><br></div><div class="gmail_extra">\font\foo = file:lmroman12-regular </div><div class="gmail_extra">\foo</div><div class="gmail_extra"><br></div><div class="gmail_extra">%\lpcode\foo 45 = 2000\relax</div><div class="gmail_extra">\rpcode\foo 45 = 2000\relax</div><div class="gmail_extra">\efcode\foo 45 = 4000\relax</div><div class="gmail_extra"><br></div><div class="gmail_extra">\directlua{</div><div class="gmail_extra">    print("data at tex end")</div><div class="gmail_extra">    inspect(font.fonts              [font.current()].characters[45])</div><div class="gmail_extra">    print("original passed data")</div><div class="gmail_extra">    inspect(fonts.hashes.identifiers[font.current()].characters[45])</div><div class="gmail_extra">}</div><div class="gmail_extra"><br></div><div class="gmail_extra">test</div><div class="gmail_extra">\bye</div><div><br></div><div><br></div><div><div>data at tex end</div><div>table={</div><div> ["bot_accent"]=0,</div><div> ["depth"]=0,</div><div> ["expansion_factor"]=4000,</div><div> ["height"]=191103,</div><div> ["index"]=64,</div><div> ["italic"]=0,</div><div> ["right_protruding"]=2000,</div><div> ["top_accent"]=0,</div><div> ["used"]=false,</div><div> ["width"]=256377,</div><div>}</div><div>original passed data</div><div>table={</div><div> ["height"]=191102.976,</div><div> ["index"]=64,</div><div> ["width"]=256376.832,</div><div>}</div></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Committed revision 5063, luatex experimental.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">--</div>luigi<br>
</div></div>