diff options
| author | Will Robertson <wspr81@gmail.com> | 2010-05-19 13:44:13 +0930 |
|---|---|---|
| committer | Will Robertson <wspr81@gmail.com> | 2010-05-19 18:13:32 +0930 |
| commit | 55a331a875ae93b4294e6e24686005f47b315fb6 (patch) | |
| tree | ab05b4c8c38620c875bf2fa0c5a38e7aed455420 | |
| parent | c00cff0a14599a8f4db203aa0e845881bc8019b1 (diff) | |
| download | luaotfload-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...)
| -rw-r--r-- | otfl-font-nms.lua | 3 |
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 |
