summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2012-05-28 12:29:26 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2012-05-28 12:29:26 +0200
commitfe2ef48562cc21bc68caaaa843c13d89c934d286 (patch)
tree7e28738453277b820d22b259667506e4d6f9128c
parentdaf3ac852824313dfa9465e9c722c33799698f80 (diff)
downloadluaotfload-fe2ef48562cc21bc68caaaa843c13d89c934d286.tar.gz
Fix "endless loop in charlist" in some fonts
-rw-r--r--otfl-font-otf.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/otfl-font-otf.lua b/otfl-font-otf.lua
index fe9cd51..b46bc91 100644
--- a/otfl-font-otf.lua
+++ b/otfl-font-otf.lua
@@ -1560,26 +1560,28 @@ function otf.copy_to_tfm(data,cache_id) -- we can save a copy when we reorder th
-- we have them shared because that packs nicer
-- we could prepare the variants and keep 'm in descriptions
if m then
- local variants, parts, c = m.horiz_variants, m.horiz_parts, char
+ local variants, parts, c, uc = m.horiz_variants, m.horiz_parts, char, u
if variants then
for n in gmatch(variants,"[^ ]+") do
local un = unicodes[n]
- if un and u ~= un then
+ if un and uc ~= un then
c.next = un
c = characters[un]
+ uc = un
end
end
c.horiz_variants = parts
elseif parts then
c.horiz_variants = parts
end
- local variants, parts, c = m.vert_variants, m.vert_parts, char
+ local variants, parts, c, uc = m.vert_variants, m.vert_parts, char, u
if variants then
for n in gmatch(variants,"[^ ]+") do
local un = unicodes[n]
- if un and u ~= un then
+ if un and uc ~= un then
c.next = un
c = characters[un]
+ uc = un
end
end -- c is now last in chain
c.vert_variants = parts