diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2013-05-16 20:32:10 +0200 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-05-16 20:32:10 +0200 | 
| commit | ee4c3dd630ae4228b5e222f7099055e327785f97 (patch) | |
| tree | 99496157128ac124e98e3532ee6ea39093e9dd60 | |
| parent | 52711d3284f2d0de886fc3ab2d693a2ad69589d7 (diff) | |
| download | luaotfload-ee4c3dd630ae4228b5e222f7099055e327785f97.tar.gz | |
fix behavior of ``aux.slot_of_name()`` for missing glyphs
spotted by Robert
| -rw-r--r-- | luaotfload-auxiliary.lua | 12 | 
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)  | 
