summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-16 20:32:10 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-16 20:32:10 +0200
commitee4c3dd630ae4228b5e222f7099055e327785f97 (patch)
tree99496157128ac124e98e3532ee6ea39093e9dd60
parent52711d3284f2d0de886fc3ab2d693a2ad69589d7 (diff)
downloadluaotfload-ee4c3dd630ae4228b5e222f7099055e327785f97.tar.gz
fix behavior of ``aux.slot_of_name()`` for missing glyphs
spotted by Robert
-rw-r--r--luaotfload-auxiliary.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/luaotfload-auxiliary.lua b/luaotfload-auxiliary.lua
index f0d5a04..64fac90 100644
--- a/luaotfload-auxiliary.lua
+++ b/luaotfload-auxiliary.lua
@@ -276,10 +276,14 @@ local slot_of_name = function (font_id, glyphname, unsafe)
local fontdata = identifiers[font_id]
if fontdata then
local unicode = fontdata.resources.unicodes[glyphname]
- if unicode and type(unicode) == "number" then
- return unicode
- else
- return unicode[1] --- for multiple components
+ if unicode then
+ if type(unicode) == "number" then
+ return unicode
+ else
+ return unicode[1] --- for multiple components
+ end
+-- else
+-- --- missing
end
elseif unsafe == true then -- for Robert
return raw_slot_of_name(font_id, glyphname)