diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/font-chk.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/font-chk.lua | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua b/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua index ab145ce4d8f..e18e4b8048a 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/font-chk.lua @@ -9,6 +9,8 @@ if not modules then modules = { } end modules ['font-chk'] = { -- possible optimization: delayed initialization of vectors -- move to the nodes namespace +-- This is old code and I'll make a nicer one for lmtx some day. + local next = next local floor = math.floor @@ -248,11 +250,14 @@ local function addmissingsymbols(tfmdata) -- we can have an alternative with rul end end end - if #collected > 0 then - addcharacters(properties.id, { - type = "real", - characters = collected, - }) + if next(collected) then + local id = properties.id + if id then + addcharacters(properties.id, { + type = "real", + characters = collected, + }) + end end end @@ -268,12 +273,6 @@ registerotffeature { fonts.loggers.add_placeholders = function(id) addmissingsymbols(fontdata[id or true]) end fonts.loggers.category_to_placeholder = mapping -function commands.getplaceholderchar(name) - local id = currentfont() - addmissingsymbols(fontdata[id]) - context(getprivatenode(fontdata[id],name)) -end - -- todo in luatex: option to add characters (just slots, no kerns etc) -- we can do that now so ... |