summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmkluatexfontdb.lua2
-rw-r--r--otfl-font-nms.lua20
2 files changed, 11 insertions, 11 deletions
diff --git a/mkluatexfontdb.lua b/mkluatexfontdb.lua
index 2cc67c9..bc90d39 100755
--- a/mkluatexfontdb.lua
+++ b/mkluatexfontdb.lua
@@ -39,7 +39,7 @@ Valid options:
The output database file is named otfl-fonts.lua and is placed under:
%s"
-]], name, names.path.localdir))
+]], name, names.path.dir))
end
local function version_msg()
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 06c6dad..4417613 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -14,8 +14,8 @@ local names_dir = "luatex-cache/generic/names"
names.version = 2.010 -- not the same as in context
names.data = nil
names.path = {
- basename = "otfl-names.lua",
- localdir = file.join(kpse.expand_var("$TEXMFVAR"), names_dir),
+ basename = "otfl-names.lua",
+ dir = file.join(kpse.expand_var("$TEXMFVAR"), names_dir),
}
local success = pcall(require, "luatexbase.modutils")
@@ -63,7 +63,7 @@ local function make_name(path)
end
local function load_names()
- local path = file.join(names.path.localdir, names.path.basename)
+ local path = file.join(names.path.dir, names.path.basename)
local luaname, lucname = make_name(path)
local foundname
local data
@@ -729,17 +729,17 @@ local function update_names(fontnames, force)
end
local function save_names(fontnames)
- local savepath = names.path.localdir
- if not lfs.isdir(savepath) then
- dir.mkdirs(savepath)
+ local path = names.path.dir
+ if not lfs.isdir(path) then
+ dir.mkdirs(path)
end
- savepath = file.join(savepath, names.path.basename)
- if file.iswritable(savepath) then
- local luaname, lucname = make_name(savepath)
+ path = file.join(path, names.path.basename)
+ if file.iswritable(path) then
+ local luaname, lucname = make_name(path)
table.tofile(luaname, fontnames, true)
caches.compile(fontnames,luaname,lucname)
logs.info("Font names database saved")
- return savepath
+ return path
else
logs.info("Failed to save names database")
return nil