summaryrefslogtreecommitdiff
path: root/otfl-font-otc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'otfl-font-otc.lua')
-rw-r--r--otfl-font-otc.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/otfl-font-otc.lua b/otfl-font-otc.lua
index f75da39..1fc1f22 100644
--- a/otfl-font-otc.lua
+++ b/otfl-font-otc.lua
@@ -219,7 +219,9 @@ function otf.name_to_slot(name) -- todo: afm en tfm
if tfmdata and tfmdata.shared then
local otfdata = tfmdata.shared.otfdata
local unicode = otfdata.luatex.unicodes[name]
- if type(unicode) == "number" then
+ if not unicode then
+ return string.byte("?") -- nil
+ elseif type(unicode) == "number" then
return unicode
else
return unicode[1]