diff options
Diffstat (limited to 'tex/context/base/mkiv/typo-pnc.lua')
-rw-r--r-- | tex/context/base/mkiv/typo-pnc.lua | 77 |
1 files changed, 2 insertions, 75 deletions
diff --git a/tex/context/base/mkiv/typo-pnc.lua b/tex/context/base/mkiv/typo-pnc.lua index e9b947807..786fd7d3f 100644 --- a/tex/context/base/mkiv/typo-pnc.lua +++ b/tex/context/base/mkiv/typo-pnc.lua @@ -68,8 +68,8 @@ local mapping = periodkerns.mapping local factors = periodkerns.factors function periodkerns.handler(head) - for current in nextglyph, head do - if getchar(current) == period then + for current, font, char in nextglyph, head do + if char == period then local a = getattr(current,a_periodkern) if a then local factor = mapping[a] @@ -135,79 +135,6 @@ function periodkerns.handler(head) return head end -if LUATEXVERSION >= 1.080 then - - function periodkerns.handler(head) - for current, font, char in nextglyph, head do - if char == period then - local a = getattr(current,a_periodkern) - if a then - local factor = mapping[a] - if factor then - local prev, next = getboth(current) - if prev and next and getid(prev) == glyph_code and getid(next) == glyph_code then - local pchar = getchar(prev) - local pcode = categories[getchar(prev)] - if pcode == "lu" or pcode == "ll" then - local nchar = getchar(next) - local ncode = categories[getchar(next)] - if ncode == "lu" or ncode == "ll" then - local next2 = getnext(next) - if next2 and getid(next2) == glyph_code and getchar(next2) == period then - -- A.B. - local fontspace, inserted - if factor ~= 0 then - fontspace = parameters[getfont(current)].space -- can be sped up - inserted = factor * fontspace - insert_after(head,current,new_kern(inserted)) - if trace then - report("inserting space at %C . [%p] %C .",pchar,inserted,nchar) - end - end - local next3 = getnext(next2) - if next3 and getid(next3) == glue_code and getsubtype(next3) == spaceskip_code then - local width = getwidth(next3) - local space = fontspace or parameters[getfont(current)].space -- can be sped up - if width > space then -- space + extraspace - local next4 = getnext(next3) - if next4 and getid(next4) == glyph_code then - local fchar = getchar(next4) - if categories[fchar] ~= "lu" then - -- A.B.<glue>X - if trace then - if inserted then - report("reverting space at %C . [%p] %C . [%p->%p] %C",pchar,inserted,nchar,width,space,fchar) - else - report("reverting space at %C . %C . [%p->%p] %C",pchar,nchar,width,space,fchar) - end - end - setwidth(next3,space) - else - if trace then - if inserted then - report("keeping space at %C . [%p] %C . [%p] %C",pchar,inserted,nchar,width,fchar) - else - report("keeping space at %C . %C . [%p] %C",pchar,nchar,width,fchar) - end - end - end - end - end - end - end - end - end - end - end - end - end - end - return head - end - - -end - local enabled = false function periodkerns.set(factor) |