summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-oup.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-04-27 01:41:25 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-04-27 01:41:25 +0200
commit762562da00d0ec1d50e6d3c2a701156ab42e6d71 (patch)
tree2dc664caa951963a393b0a2a9c9c85d1db6b8e10 /tex/context/base/mkiv/font-oup.lua
parentf2a20e191bf71094aa21d37dee2ecd2f804dbc56 (diff)
downloadcontext-762562da00d0ec1d50e6d3c2a701156ab42e6d71.tar.gz
2017-04-27 01:06:00
Diffstat (limited to 'tex/context/base/mkiv/font-oup.lua')
-rw-r--r--tex/context/base/mkiv/font-oup.lua44
1 files changed, 24 insertions, 20 deletions
diff --git a/tex/context/base/mkiv/font-oup.lua b/tex/context/base/mkiv/font-oup.lua
index bbc8436b2..75ae08526 100644
--- a/tex/context/base/mkiv/font-oup.lua
+++ b/tex/context/base/mkiv/font-oup.lua
@@ -891,7 +891,7 @@ function readers.rehash(fontdata,hashmethod) -- TODO: combine loops in one
unifymissing(fontdata)
-- stripredundant(fontdata)
else
- fontdata.hashmethod = "unicode"
+ fontdata.hashmethod = "unicodes"
local indices = unifyglyphs(fontdata)
unifyresources(fontdata,indices)
copyduplicates(fontdata)
@@ -908,10 +908,10 @@ function readers.checkhash(fontdata)
elseif hashmethod == "names" and fontdata.names then
unifyresources(fontdata,fontdata.names)
copyduplicates(fontdata)
- fontdata.hashmethod = "unicode"
+ fontdata.hashmethod = "unicodes"
fontdata.names = nil -- no need for it
else
- readers.rehash(fontdata,"unicode")
+ readers.rehash(fontdata,"unicodes")
end
end
@@ -1332,7 +1332,7 @@ function readers.pack(data)
local r = rule.before if r then for i=1,#r do r[i] = pack_boolean(r[i]) end end
local r = rule.after if r then for i=1,#r do r[i] = pack_boolean(r[i]) end end
local r = rule.current if r then for i=1,#r do r[i] = pack_boolean(r[i]) end end
- local r = rule.lookups if r then rule.lookups = pack_mixed (r) end
+ -- local r = rule.lookups if r then rule.lookups = pack_mixed (r) end
local r = rule.replacements if r then rule.replacements = pack_flat (r) end
end
end
@@ -1795,13 +1795,13 @@ function readers.unpack(data)
end
end
end
- local lookups = rule.lookups
- if lookups then
- local tv = tables[lookups]
- if tv then
- rule.lookups = tv
- end
- end
+ -- local lookups = rule.lookups
+ -- if lookups then
+ -- local tv = tables[lookups]
+ -- if tv then
+ -- rule.lookups = tv
+ -- end
+ -- end
local replacements = rule.replacements
if replacements then
local tv = tables[replacements]
@@ -2334,16 +2334,20 @@ function readers.expand(data)
local lookups = rule.lookups or false
local subtype = nil
if lookups then
- -- is now indexed
- for k, v in next, lookups do
- local lookup = sublookups[v]
- if lookup then
- lookups[k] = lookup
- if not subtype then
- subtype = lookup.type
+ for i=1,#lookups do
+ local lookups = lookups[i]
+ if lookups then
+ for k, v in next, lookups do
+ local lookup = sublookups[v]
+ if lookup then
+ lookups[k] = lookup
+ if not subtype then
+ subtype = lookup.type
+ end
+ else
+ -- already expanded
+ end
end
- else
- -- already expanded
end
end
end