[luatex] strategy for margin kerning and pre_linebreak_filter?

Patrick Gundlach patrick at gundla.ch
Wed Sep 30 20:08:32 CEST 2009


I have a question concerning margin kerning (\pdfprotrudechars) and  

When I define a font with right_protruding (\rpcode, see font table in  
manual p. 130) and using it as a TeX font, margin kerning is ok.

------------------------ example 1, works ok -------------------------
  local f = define_font("texgyreheros-regular.otf", "12pt")  -- sets  
right_protruding to a value > 0
  local num = font.define(f)
long paragraph with margin kerning (works fine)

------------------------ example 2, does not work as expected --------
  local f = define_font("texgyreheros-regular.otf", "12pt")  -- same  
as above, sets rpcode > 0
  local num = font.define(f)

-- and now in pre_linebreak_filter I set for all glyphs the font code  
to the num above

\tenrm % some dummy font without rpcode
% no font switch to \heros!
long paragraph, the hyphen does not get into the margin! But all other  
glyphs I set the \rpcode for do.

So the problem seems to be that when hyphenating the second paragraph,  
the hyphen will stick inside the paragraph. Am I missing something  
here? See also tracker item #274


More information about the luatex mailing list