From 1588a9673bb14157388a3f808ea0eee32c9d9bbf Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Wed, 20 Jan 2010 13:10:23 +0100 Subject: Bug fixing Fixing a bug when mixing colored and non-colored fonts. --- otfl-font-msc.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/otfl-font-msc.lua b/otfl-font-msc.lua index 491229b..cc16d3d 100644 --- a/otfl-font-msc.lua +++ b/otfl-font-msc.lua @@ -121,7 +121,11 @@ local sbox = node.id('sub_box') local function lookup_next_color(head) for n in node.traverse(head) do if n.id == glyph then - return fonts.ids[n.font].color + if fonts.ids[n.font] and fonts.ids[n.font].color then + return fonts.ids[n.font].color + else + return -1 + end elseif n.id == vlist or n.id == hlist or n.id == sbox then local r = lookup_next_color(n.list) if r == -1 then -- cgit v1.2.3