summaryrefslogtreecommitdiff
path: root/luaotfload-fonts.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-01-12 20:36:27 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2010-01-14 18:58:15 +0200
commitca6917bd3fabfe6e48be5bc9668f6a6c430354b7 (patch)
tree4ecafe393c20eed3fbf723dca97742a9f2afcfb4 /luaotfload-fonts.lua
parentc9e469f076393ee92022377c5c6f9ba875c901d1 (diff)
downloadluaotfload-ca6917bd3fabfe6e48be5bc9668f6a6c430354b7.tar.gz
Save the database under '$TEXMFVAR/tex/'
Diffstat (limited to 'luaotfload-fonts.lua')
-rw-r--r--luaotfload-fonts.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/luaotfload-fonts.lua b/luaotfload-fonts.lua
index ce01b63..5976477 100644
--- a/luaotfload-fonts.lua
+++ b/luaotfload-fonts.lua
@@ -112,12 +112,15 @@ local function generate()
mappings = { },
version = luaotfload.fonts.version
}
-
+ local savepath
scan_os_fonts(fnames)
scan_txmf_tree(fnames)
logs.simple("%s fonts saved in the database", #table.keys(fnames.mappings))
- io.savedata(luaotfload.fonts.basename, table.serialize(fnames, true))
- logs.simple("Saved font names database in %s\n", luaotfload.fonts.basename)
+ savepath = kpse.expand_var("$TEXMFVAR") .. "/tex/"
+ lfs.mkdir(savepath)
+ savepath = savepath .. luaotfload.fonts.basename
+ io.savedata(savepath, table.serialize(fnames, true))
+ logs.simple("Saved font names database in %s\n", savepath)
end
luaotfload.fonts.scan = scan_dir