From fe2ef48562cc21bc68caaaa843c13d89c934d286 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 28 May 2012 12:29:26 +0200 Subject: Fix "endless loop in charlist" in some fonts --- otfl-font-otf.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'otfl-font-otf.lua') 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 -- cgit v1.2.3