summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroux <elie.roux@telecom-bretagne.eu>2010-02-26 10:56:38 +0100
committereroux <elie.roux@telecom-bretagne.eu>2010-02-26 10:56:38 +0100
commit74f785ebc6f6459db1bae2ce22fd024765b7c40e (patch)
tree48f410eb60b36b2a7874e6c53648f9ccf4879083
parent20f639783ac4c7591fb39ff95bce690e31583681 (diff)
downloadluaotfload-74f785ebc6f6459db1bae2ce22fd024765b7c40e.tar.gz
making the end of the path (after TEXMFVAR) a variable
as it will change soon...
-rw-r--r--luaotfload-fonts.lua6
-rw-r--r--update-luatex-font-database.lua4
2 files changed, 7 insertions, 3 deletions
diff --git a/luaotfload-fonts.lua b/luaotfload-fonts.lua
index d137d97..d198062 100644
--- a/luaotfload-fonts.lua
+++ b/luaotfload-fonts.lua
@@ -33,8 +33,12 @@ local upper, format, rep = string.upper, string.format, string.rep
-- the file name of the font database
luaotfload.fonts.basename = "otfl-names.lua"
+-- the path to add to TEXMFVAR or TEXMFSYSVAR to get the final directory in
+-- normal cases
+luaotfload.fonts.subtexmfvardir = "/tex/"
+
-- the directory in which the database will be saved, can be overwritten
-luaotfload.fonts.directory = kpse.expand_var("$TEXMFVAR") .. "/tex/"
+luaotfload.fonts.directory = kpse.expand_var("$TEXMFVAR") .. luaotfload.fonts.subtexmfvardir
-- the version of the database, to be checked by the lookup function of
-- luaotfload
diff --git a/update-luatex-font-database.lua b/update-luatex-font-database.lua
index 38a83cb..9a870f5 100644
--- a/update-luatex-font-database.lua
+++ b/update-luatex-font-database.lua
@@ -114,11 +114,11 @@ local function process_cmdline()
elseif v == "no-fc-cache" then
run_fc_cache = 0
elseif v == "sys" then
- luaotfload.fonts.directory = kpse.expand_var("$TEXMFSYSVAR") .. "/tex/"
+ luaotfload.fonts.directory = kpse.expand_var("$TEXMFSYSVAR") .. luaotfload.fonts.subtexmfvardir
end
end
if string.match(arg[0], '-sys') then
- luaotfload.fonts.directory = kpse.expand_var("$TEXMFSYSVAR") .. "/tex/"
+ luaotfload.fonts.directory = kpse.expand_var("$TEXMFSYSVAR") .. luaotfload.fonts.subtexmfvardir
end
luaotfload.fonts.log_level = log_level
end