diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-10-01 16:40:17 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-10-01 16:40:17 +0200 |
commit | 80743fc19190334d3a0d4c86538663b98695a573 (patch) | |
tree | 7a94f73a318e0362bacc2596ac8fc6201ed1d1b6 /tex/context/base/mkiv/font-otc.lua | |
parent | 164a98ac4e58ae88de0a83d1eb60583827f4fbab (diff) | |
download | context-80743fc19190334d3a0d4c86538663b98695a573.tar.gz |
2017-10-01 14:38:00
Diffstat (limited to 'tex/context/base/mkiv/font-otc.lua')
-rw-r--r-- | tex/context/base/mkiv/font-otc.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/font-otc.lua b/tex/context/base/mkiv/font-otc.lua index 8059ad272..2bad62d60 100644 --- a/tex/context/base/mkiv/font-otc.lua +++ b/tex/context/base/mkiv/font-otc.lua @@ -11,6 +11,7 @@ local type, next = type, next local lpegmatch = lpeg.match local utfbyte, utflen, utfsplit = utf.byte, utf.len, utf.split local match = string.match +local sortedhash = table.sortedhash -- we assume that the other otf stuff is loaded already @@ -449,7 +450,7 @@ local function addfeature(data,feature,specifications) local lookups = rule.lookups or false local subtype = nil if lookups and sublookups then - for k, v in next, lookups do + for k, v in sortedhash(lookups) do local t = type(v) if t == "table" then -- already ok @@ -501,7 +502,8 @@ local function addfeature(data,feature,specifications) replacements, -- 7 subtype, -- 8 } - for unic in next, sequence[start] do +-- for unic in next, sequence[start] do + for unic in sortedhash(sequence[start]) do local cu = coverage[unic] if not cu then coverage[unic] = rulehash -- can now be done cleaner i think @@ -551,9 +553,9 @@ local function addfeature(data,feature,specifications) local s = sequences[i] local f = s.features if f then - for k in next, f do + for k in sortedhash(f) do -- next, f do if k == position then - index = i + index = i break end end @@ -1103,7 +1105,6 @@ local function blockligatures(str) after[i] = { after[i] } end end - else before = nil current = utfsplit(ti) @@ -1123,7 +1124,9 @@ local function blockligatures(str) lookups = { 1 }, -- not shared ! } revert[new] = { + -- before = before, current = { one, zwj }, + -- after = { two, unpack(after) }, after = { two }, lookups = { 1 }, -- not shared ! } |