diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua index 1fd08526c3a..a1135d0f321 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-fkr.lua @@ -7,10 +7,12 @@ if not modules then modules = { } end modules ['typo-fkr'] = { } local nuts = nodes.nuts +local tonut = nuts.tonut local getid = nuts.getid local getnext = nuts.getnext +local getchar = nuts.getchar +local getfont = nuts.getfont local getattr = nuts.getattr -local isglyph = nuts.isglyph local nodecodes = nodes.nodecodes local glyph_code = nodecodes.glyph @@ -30,15 +32,20 @@ local a_extrakern = attributes.private("extrafontkern") typesetters.fontkerns = { } function typesetters.fontkerns.handler(head) + local kepthead = head + local head = tonut(head) local current = head local lastfont = nil local lastchar = nil local lastdata = nil + local done = false while current do - local char, font = isglyph(current) - if char then + local id = getid(current) + if id == glyph_code then local a = getattr(current,a_extrakern) if a then + local char = getchar(current) + local font = getfont(current) if font ~= lastfont then if a > 0 and lastchar then if not lastdata then @@ -57,6 +64,7 @@ function typesetters.fontkerns.handler(head) end if kern ~= 0 then head, current = insert_before(head,current,new_kern(kern)) + done = true end lastdata = data else @@ -69,6 +77,7 @@ function typesetters.fontkerns.handler(head) local kern = getkernpair(lastdata,lastchar,char) if kern ~= 0 then head, current = insert_before(head,current,new_kern(kern)) + done = true end end lastchar = char @@ -85,7 +94,7 @@ function typesetters.fontkerns.handler(head) end current = getnext(current) end - return head + return kepthead, done end if context then |