diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-04-13 15:51:39 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-04-13 15:51:39 +0200 |
commit | 25fcad7435f56cdce2658336909f4da6a65589c0 (patch) | |
tree | c23d5d04a7e86c7ddc2ebeca06d3de63ebdc806e /tex/context/base/mkiv/font-chk.lua | |
parent | 1e5d7f41ddede5e6400a2a7762032823d3545df4 (diff) | |
download | context-25fcad7435f56cdce2658336909f4da6a65589c0.tar.gz |
2018-04-13 15:02:00
Diffstat (limited to 'tex/context/base/mkiv/font-chk.lua')
-rw-r--r-- | tex/context/base/mkiv/font-chk.lua | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/tex/context/base/mkiv/font-chk.lua b/tex/context/base/mkiv/font-chk.lua index 3613432c1..4e7bf939b 100644 --- a/tex/context/base/mkiv/font-chk.lua +++ b/tex/context/base/mkiv/font-chk.lua @@ -196,7 +196,10 @@ local variants = allocate { { tag = "yellow", r = .6, g = .6, b = 0 }, } -local pdf_blob = "pdf: q %.6F 0 0 %.6F 0 0 cm %s %s %s rg %s %s %s RG 10 M 1 j 1 J 0.05 w %s Q" +-- bah .. low level pdf ... should be a rule or plugged in + +----- pdf_blob = "pdf: q %.6F 0 0 %.6F 0 0 cm %s %s %s rg %s %s %s RG 10 M 1 j 1 J 0.05 w %s Q" +local pdf_blob = "q %.6F 0 0 %.6F 0 0 cm %s %s %s rg %s %s %s RG 10 M 1 j 1 J 0.05 w %s Q" local cache = { } -- saves some tables but not that impressive @@ -235,8 +238,8 @@ local function addmissingsymbols(tfmdata) -- we can have an alternative with rul width = size*fake.width, height = size*fake.height, depth = size*fake.depth, - -- bah .. low level pdf ... should be a rule or plugged in - commands = { { "special", formatters[pdf_blob](scale,scale,r,g,b,r,g,b,fake.code) } } + -- commands = { { "special", formatters[pdf_blob](scale,scale,r,g,b,r,g,b,fake.code) } } + commands = { { "pdf", formatters[pdf_blob](scale,scale,r,g,b,r,g,b,fake.code) } } } cache[hash] = char end @@ -390,7 +393,6 @@ checkers.getmissing = getmissing do local reported = true - local tracked = false callback.register("glyph_not_found",function(font,char) if font > 0 then @@ -408,7 +410,6 @@ do trackers.register("fonts.missing", function(v) if v then enableaction("processors","fonts.checkers.missing") - tracked = true else disableaction("processors","fonts.checkers.missing") end @@ -419,27 +420,25 @@ do end) logs.registerfinalactions(function() --- if tracked then - local collected, details = getmissing() - if next(collected) then + local collected, details = getmissing() + if next(collected) then + for filename, list in sortedhash(details) do + logs.startfilelogging(report,"missing characters",filename) + for u, v in sortedhash(list) do + report("%4i %U %c %s",v,u,u,chardata[u].description) + end + logs.stopfilelogging() + end + if logs.loggingerrors() then for filename, list in sortedhash(details) do - logs.startfilelogging(report,"missing characters",filename) + logs.starterrorlogging(report,"missing characters",filename) for u, v in sortedhash(list) do report("%4i %U %c %s",v,u,u,chardata[u].description) end - logs.stopfilelogging() - end - if logs.loggingerrors() then - for filename, list in sortedhash(details) do - logs.starterrorlogging(report,"missing characters",filename) - for u, v in sortedhash(list) do - report("%4i %U %c %s",v,u,u,chardata[u].description) - end - logs.stoperrorlogging() - end + logs.stoperrorlogging() end end --- end + end end) end |