summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-enc.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-06-25 15:40:51 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-06-25 15:40:51 +0200
commitb2a2304cbb0c65040d7b118ac9b857d304e333e6 (patch)
treeed5212e37a91ec78c12d9f72ca1186a59c139b40 /tex/context/base/mkiv/font-enc.lua
parentb2276ae7a04a9f9c35403e508670049d8c3e4b3e (diff)
downloadcontext-b2a2304cbb0c65040d7b118ac9b857d304e333e6.tar.gz
2016-06-25 14:42:00
Diffstat (limited to 'tex/context/base/mkiv/font-enc.lua')
-rw-r--r--tex/context/base/mkiv/font-enc.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/font-enc.lua b/tex/context/base/mkiv/font-enc.lua
index 2e8b722de..ba957bdf2 100644
--- a/tex/context/base/mkiv/font-enc.lua
+++ b/tex/context/base/mkiv/font-enc.lua
@@ -20,7 +20,7 @@ them in tables. But we may do so some day, for consistency.</p>
local report_encoding = logs.reporter("fonts","encoding")
-local encodings = { }
+local encodings = fonts.encodings or { }
fonts.encodings = encodings
encodings.version = 1.03
@@ -79,6 +79,7 @@ function encodings.load(filename)
local ok, encoding, size = resolvers.loadbinfile(foundname)
if ok and encoding then
encoding = gsub(encoding,"%%(.-)\n","")
+ local unicoding = fonts.encodings.agl.unicodes
local tag, vec = match(encoding,"/(%w+)%s*%[(.*)%]%s*def")
local i = 0
for ch in gmatch(vec,"/([%a%d%.]+)") do
@@ -89,8 +90,9 @@ function encodings.load(filename)
else
-- duplicate, play safe for tex ligs and take first
end
- if enccodes[ch] then
- unicodes[enccodes[ch]] = i
+ local u = unicoding[ch] or enccodes[ch] -- enccodes have also context names
+ if u then
+ unicodes[u] = i
end
end
i = i + 1