diff options
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r-- | otfl-font-nms.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 5a31c56..5431c20 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -35,7 +35,12 @@ end function names.load() local localpath = names.path.localdir .. names.path.basename local systempath = names.path.systemdir .. names.path.basename - local data = dofile(localpath) or dofile(systempath) + local data + if file.isreadable(localpath) then + data = dofile(localpath) + elseif file.isreadable(systempath) then + data = dofile(systempath) + end if data then if trace_loading then logs.report("load font", "loaded font names database: %s", foundname) |