diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-03-15 16:04:31 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-03-15 16:04:31 +0100 |
commit | a4e07f30e880ab27c2918f81f136e257475b7729 (patch) | |
tree | 02db002d3001a49777a049f9a98fdc872a5e1ad1 /tex/context/base/mkiv/font-gbn.lua | |
parent | cbc37c39432e0ebe38e0922fc6d14c2955ab3ba2 (diff) | |
download | context-a4e07f30e880ab27c2918f81f136e257475b7729.tar.gz |
2018-03-15 15:36:00
Diffstat (limited to 'tex/context/base/mkiv/font-gbn.lua')
-rw-r--r-- | tex/context/base/mkiv/font-gbn.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/font-gbn.lua b/tex/context/base/mkiv/font-gbn.lua index 1f8df642c..8f1acac65 100644 --- a/tex/context/base/mkiv/font-gbn.lua +++ b/tex/context/base/mkiv/font-gbn.lua @@ -13,6 +13,8 @@ if context then os.exit() end +local next = next + local fonts = fonts local nodes = nodes @@ -71,7 +73,8 @@ function nodes.handlers.setbasemodepass(v) basemodepass = v end -function nodes.handlers.nodepass(head) +-------- nodes.handlers.nodepass(head) +function nodes.handlers.nodepass(head,groupcode,size,packtype,direction) local fontdata = fonts.hashes.identifiers if fontdata then local nuthead = tonut(head) @@ -81,6 +84,7 @@ function nodes.handlers.nodepass(head) local basefont = nil local variants = nil local redundant = nil + local nofused = 0 for n in traverse_id(glyph_code,nuthead) do local font = getfont(n) if font ~= prevfont then @@ -97,6 +101,7 @@ function nodes.handlers.nodepass(head) local processors = shared.processes if processors and #processors > 0 then usedfonts[font] = processors + nofused = nofused + 1 elseif basemodepass then basefont = { n, nil } basefonts[#basefonts+1] = basefont @@ -178,6 +183,7 @@ function nodes.handlers.nodepass(head) local processors = shared.processes if processors and #processors > 0 then usedfonts[font] = processors + nofused = nofused + 1 end end end @@ -189,7 +195,7 @@ function nodes.handlers.nodepass(head) if next(usedfonts) then for font, processors in next, usedfonts do for i=1,#processors do - head = processors[i](head,font,0) or head + head = processors[i](head,font,0,direction,nofused) or head end end end @@ -229,7 +235,7 @@ function nodes.handlers.nodepass(head) end function nodes.handlers.basepass(head) - if not basemodepass then + if basemodepass then head = n_ligaturing(head) head = n_kerning(head) end @@ -241,9 +247,9 @@ local basepass = nodes.handlers.basepass local injectpass = nodes.injections.handler local protectpass = nodes.handlers.protectglyphs -function nodes.simple_font_handler(head) +function nodes.simple_font_handler(head,groupcode,size,packtype,direction) if head then - head = nodepass(head) + head = nodepass(head,groupcode,size,packtype,direction) head = injectpass(head) if not basemodepass then head = basepass(head) |