summaryrefslogtreecommitdiff
path: root/otfl-font-nms.lua
diff options
context:
space:
mode:
authorWill Robertson <wspr81@gmail.com>2010-05-19 13:44:13 +0930
committerWill Robertson <wspr81@gmail.com>2010-05-19 18:13:32 +0930
commit55a331a875ae93b4294e6e24686005f47b315fb6 (patch)
treeab05b4c8c38620c875bf2fa0c5a38e7aed455420 /otfl-font-nms.lua
parentc00cff0a14599a8f4db203aa0e845881bc8019b1 (diff)
downloadluaotfload-55a331a875ae93b4294e6e24686005f47b315fb6.tar.gz
don't fail if the extension is missing
(this isn't impossible, but probably only if we're using fc-list in Mac OS X...)
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r--otfl-font-nms.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index a3723eb..888c6da 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -549,7 +549,8 @@ local function read_fcdata(data)
local list = { }
for line in data:lines() do
line = line:gsub(": ", "")
- local ext = lower(match(line,"^.+%.([^/\\]-)$"))
+ local ext = match(line,"^.+%.([^/\\]-)$") or ""
+ ext = lower(ext)
if ext == "otf" or ext == "ttf" or ext == "ttc" or ext == "dfont" then
list[#list+1] = path_normalize(line:gsub(": ", ""))
end