20

The \rpcode values from pdfTeX are properties of font characters, e.g.,

\rpcode\font 50 = 200

sets the right protrusion value for character 50 in the current font to 200. Reading chapter 7 of the luatex reference manual my understanding is that this value then shows up in the character table for this particular character as right_protrusion. However, this is either not the case or I do something wrong, here is a minimal example:

\pdfprotrudechars=2

\rpcode\font 50 = 200
\efcode\font 50 = 333

\directlua{

local function FMItable (name,t)
    print ("---- looking at table ", name, tostring(t))
      for k, v in pairs(t) do
    print("    ", k,"=", tostring(v))
      end
    print("----------------")
end

 FMItable("char 50",font.fonts[font.current()].characters[50])

}
\bye

If run through luatex this generates

luatex rp-test.tex
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 4971) 
 restricted \write18 enabled.
(./rp-test.tex---- looking at table     char 50 table: 02FB5E10
    height  =   422343
    used    =   false
    width   =   327681
    bot_accent  =   0
    italic  =   0
    expansion_factor    =   333
    depth   =   0
    top_accent  =   0
----------------
)
No pages of output.
Transcript written on rp-test.log.

You can see the changed \efcode so I'm getting at the right character table but no index for protrusion. Any idea what I'm doing wrong?

  • 3
    The right protrusion value appears in your example when I add a value for \lpcode: \lpcode\font 50 = 123. I suspect that this is a bug. – Ulrike Fischer Oct 11 '14 at 14:12
  • @UlrikeFischer weird. And it has to be non-zero to work. But if you afterwards change either value (or efcode) nothing changes in the table. Definitely looks like a bug or two. And the order is important, i.e. lpcode has to come first (looks like this initializes the fields) – Frank Mittelbach Oct 11 '14 at 14:50
  • 1
    Yes, and one can change the left_protruding field but this doesn't seem to change the \lpcode. – Ulrike Fischer Oct 11 '14 at 15:27
  • @FrankMittelbach Any news about this? – egreg Jan 3 '15 at 21:39
  • @egreg no ... one should probably raise a formal bug report at some stage – Frank Mittelbach Jan 3 '15 at 22:46
6

This seems to be fixed in the current 0.80 release

This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238) 
 restricted \write18 enabled.
(./gg384.tex---- looking at table       char 50 table: 0x60106f270
        depth   =       0
        used    =       false
        width   =       327681
        expansion_factor        =       333
        right_protruding        =       200
        height  =       422343
----------------
)
No pages of output.

showing

        right_protruding        =       200

is reported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.