summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-syn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/font-syn.lua')
-rw-r--r--tex/context/base/mkiv/font-syn.lua21
1 files changed, 13 insertions, 8 deletions
diff --git a/tex/context/base/mkiv/font-syn.lua b/tex/context/base/mkiv/font-syn.lua
index dfe32b57b..18c25fbfd 100644
--- a/tex/context/base/mkiv/font-syn.lua
+++ b/tex/context/base/mkiv/font-syn.lua
@@ -515,15 +515,20 @@ local function cleanname(name)
end
local function cleanfilename(fullname,defaultsuffix)
- local path, name, suffix = splitname(fullname)
- name = gsub(lower(name),"[^%a%d]","")
- if suffix and suffix ~= "" then
- return name .. ".".. suffix
- elseif defaultsuffix and defaultsuffix ~= "" then
- return name .. ".".. defaultsuffix
- else
- return name
+ if fullname then
+ local path, name, suffix = splitname(fullname)
+ if name then
+ name = gsub(lower(name),"[^%a%d]","")
+ if suffix and suffix ~= "" then
+ return name .. ".".. suffix
+ elseif defaultsuffix and defaultsuffix ~= "" then
+ return name .. ".".. defaultsuffix
+ else
+ return name
+ end
+ end
end
+ return "badfontname"
end
local sorter = function(a,b)