diff options
author | Elie Roux <elie.roux@telecom-bretagne.eu> | 2010-05-15 15:13:46 +0300 |
---|---|---|
committer | Elie Roux <elie.roux@telecom-bretagne.eu> | 2010-05-15 15:13:46 +0300 |
commit | 4de81a80467c537db5659c3e2691649b85983ac6 (patch) | |
tree | 40ea9a0bce1d74429576b841695772f766b92fff | |
parent | da6c7629aa7dd37a6c2386bb5ae6b59420c19e78 (diff) | |
download | luaotfload-4de81a80467c537db5659c3e2691649b85983ac6.tar.gz |
Adding an error when fontloader is unable to open a font
-rw-r--r-- | otfl-font-nms.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 98b0a69..1efd90c 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -251,7 +251,11 @@ end local function font_fullinfo(filename, subfont, texmf) local t = { } local f = fontloader.open(filename, subfont) - local m = f and fontloader.to_table(f) + if not f then + logs.report("error: failed to open %s", filename) + return nil + end + local m = fontloader.to_table(f) fontloader.close(f) collectgarbage('collect') -- see http://www.microsoft.com/typography/OTSPEC/features_pt.htm#size @@ -290,7 +294,6 @@ local function font_fullinfo(filename, subfont, texmf) m.design_range_top ~= 0 and m.design_range_top or nil, m.design_range_bottom ~= 0 and m.design_range_bottom or nil, } - return t end |