diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/node-fnt.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/node-fnt.lua | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/node-fnt.lua b/Master/texmf-dist/tex/context/base/node-fnt.lua index 7ceb96f80ad..66cd9916fe5 100644 --- a/Master/texmf-dist/tex/context/base/node-fnt.lua +++ b/Master/texmf-dist/tex/context/base/node-fnt.lua @@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['node-fnt'] = { if not context then os.exit() end -- generic function in node-dum local next, type = next, type -local concat = table.concat +local concat, keys = table.concat, table.keys local nodes, node, fonts = nodes, node, fonts @@ -96,7 +96,9 @@ function handlers.characters(head) end end for n in traverse_id(glyph_code,head) do - local font, attr = n.font, has_attribute(n,0) or 0 -- zero attribute is reserved for fonts in context +-- if n.subtype<256 then + local font = n.font + local attr = has_attribute(n,0) or 0 -- zero attribute is reserved for fonts in context if font ~= prevfont or attr ~= prevattr then if attr > 0 then local used = attrfonts[font] @@ -111,6 +113,8 @@ function handlers.characters(head) if d then used[attr] = d a = a + 1 + else + -- can't happen ... otherwise best use nil/false distinction end end end @@ -121,17 +125,20 @@ function handlers.characters(head) if fp then usedfonts[font] = fp u = u + 1 + else + -- can't happen ... otherwise best use nil/false distinction end end end prevfont = font prevattr = attr end +-- end end if trace_fontrun then report_fonts() - report_fonts("statics : %s",(u > 0 and concat(table.keys(usedfonts)," ")) or "none") - report_fonts("dynamics: %s",(a > 0 and concat(table.keys(attrfonts)," ")) or "none") + report_fonts("statics : %s",(u > 0 and concat(keys(usedfonts)," ")) or "none") + report_fonts("dynamics: %s",(a > 0 and concat(keys(attrfonts)," ")) or "none") report_fonts() end -- we could combine these and just make the attribute nil |