diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-08-11 01:23:08 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-08-11 01:23:08 +0200 |
commit | 1ef7a093aaf03b6327b3da94d47f53760c868c60 (patch) | |
tree | 228e6d4a5005598aaea191b3317c2fa21e22de75 /tex/context/base/mkiv/font-ctx.lua | |
parent | b61d5dd3555e906b21601ff75b3268c0f359283e (diff) | |
download | context-1ef7a093aaf03b6327b3da94d47f53760c868c60.tar.gz |
2018-08-10 16:58:00
Diffstat (limited to 'tex/context/base/mkiv/font-ctx.lua')
-rw-r--r-- | tex/context/base/mkiv/font-ctx.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/font-ctx.lua b/tex/context/base/mkiv/font-ctx.lua index ff9d75060..626ce51f2 100644 --- a/tex/context/base/mkiv/font-ctx.lua +++ b/tex/context/base/mkiv/font-ctx.lua @@ -1898,10 +1898,19 @@ implement { local function nametoslot(name) local t = type(name) if t == "string" then - local slot = unicodes[true][name] + local unic = unicodes[true] + local slot = unic[name] if slot then return slot end + -- + local slot = unic[gsub(name,"_"," ")] or unic[gsub(name,"_","-")] or + unic[gsub(name,"-"," ")] or unic[gsub(name,"-","_")] or + unic[gsub(name," ","_")] or unic[gsub(name," ","-")] + if slot then + return slot + end + -- if not aglunicodes then aglunicodes = encodings.agl.unicodes end @@ -1920,14 +1929,13 @@ local function nametoslot(name) end end - local found = { } local function descriptiontoslot(name) local t = type(name) if t == "string" then -- slow - local list = sortedkeys(chardata) + local list = sortedkeys(chardata) -- can be a cache with weak tables local slot = found[name] local char = characters[true] if slot then |