diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-02-14 16:43:07 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-02-14 16:43:07 +0100 |
commit | 71e0f049996013abcbfd549b516e594e019fb744 (patch) | |
tree | e3197e97a576cbe2e5353e04132a5b28f6d8179e /tex/context/base/mkiv/font-chk.lua | |
parent | e005748401471273a119724acf5e1567f2a04eee (diff) | |
download | context-71e0f049996013abcbfd549b516e594e019fb744.tar.gz |
2018-02-14 16:27:00
Diffstat (limited to 'tex/context/base/mkiv/font-chk.lua')
-rw-r--r-- | tex/context/base/mkiv/font-chk.lua | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/font-chk.lua b/tex/context/base/mkiv/font-chk.lua index 106749078..b8533986f 100644 --- a/tex/context/base/mkiv/font-chk.lua +++ b/tex/context/base/mkiv/font-chk.lua @@ -35,6 +35,7 @@ local fontdata = fonthashes.identifiers local fontcharacters = fonthashes.characters local currentfont = font.current +local addcharacters = font.addcharacters local helpers = fonts.helpers @@ -196,7 +197,7 @@ 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 local cache = { } -- saves some tables but not that impressive local function missingtonode(tfmdata,character) - local commands = character.commands + local commands = character.commands local fake = hpack_node(new_special(commands[1][2])) -- todo: literal fake.width = character.width fake.height = character.height @@ -209,7 +210,11 @@ local function addmissingsymbols(tfmdata) -- we can have an alternative with rul local properties = tfmdata.properties local size = tfmdata.parameters.size local scale = size * bpfactor - local tonode = properties.finalized and missingtonode or nil + local tonode = nil + local collected = { } + if properties.finalized and not addcharacters then + tonode = missingtonode + end for i=1,#variants do local v = variants[i] local tag, r, g, b = v.tag, v.r, v.g, v.b @@ -231,10 +236,19 @@ local function addmissingsymbols(tfmdata) -- we can have an alternative with rul } cache[hash] = char end - addprivate(tfmdata, privatename, char) + local u = addprivate(tfmdata, privatename, char) + if not tonode then + collected[u] = char + end end end end + if #collected > 0 then + addcharacters(properties.id, { + type = "real", + characters = collected, + }) + end end registerotffeature { |