summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroux <elie.roux@telecom-bretagne.eu>2010-03-01 10:06:06 +0100
committereroux <elie.roux@telecom-bretagne.eu>2010-03-01 10:06:06 +0100
commitf6ecd9d474e74733d55c2c1e5b1b65777f4e05f3 (patch)
tree6fae2978970b9386ffb8ae3b2db9a05d731e0bc9
parentb25d2dcd703e6674da868fa1c630952599c115df (diff)
downloadluaotfload-f6ecd9d474e74733d55c2c1e5b1b65777f4e05f3.tar.gz
Fixing small bugs
-rw-r--r--mkluatexfontdb.lua17
-rw-r--r--otfl-font-nms.lua9
2 files changed, 13 insertions, 13 deletions
diff --git a/mkluatexfontdb.lua b/mkluatexfontdb.lua
index 6342d2b..a7424b4 100644
--- a/mkluatexfontdb.lua
+++ b/mkluatexfontdb.lua
@@ -29,6 +29,13 @@ local names = fonts.names
names.basename = names.basename or "otfl-names.lua"
names.version = names.version or 2.004
+-- the path to add to TEXMFVAR or TEXMFSYSVAR to get the final directory in
+-- normal cases
+mkluatexfontdb.subtexmfvardir = "/tex/"
+
+-- the directory in which the database will be saved, can be overwritten
+mkluatexfontdb.directory = kpse.expand_var("$TEXMFVAR") .. mkluatexfontdb.subtexmfvardir
+
local log = logs.report
local function help_msg()
@@ -89,7 +96,7 @@ local function do_run_fc_cache(c)
-- TODO: detect if fc-cache is available
end
local toexec = 'fc-cache'
- if system == 'windows' then
+ if fonts.system == 'windows' then
toexec = 'fc-cache.exe' -- TODO: to test on a non-cygwin Windows
end
log('executing %s...\n', toexec)
@@ -133,19 +140,13 @@ local function process_cmdline()
if string.match(arg[0], '-sys') then
mkluatexfontdb.directory = kpse.expand_var("$TEXMFSYSVAR") .. mkluatexfontdb.subtexmfvardir
end
+ mkluatexfontdb.directory = fonts.path_normalize(mkluatexfontdb.directory)
names.log_level = log_level
end
process_cmdline()
do_run_fc_cache(run_fc_cache)
--- the path to add to TEXMFVAR or TEXMFSYSVAR to get the final directory in
--- normal cases
-mkluatexfontdb.subtexmfvardir = "/tex/"
-
--- the directory in which the database will be saved, can be overwritten
-mkluatexfontdb.directory = kpse.expand_var("$TEXMFVAR") .. mkluatexfontdb.subtexmfvardir
-
local function generate(force)
log("generating font names database.")
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 92d0243..65d7f59 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -1,8 +1,3 @@
--- This lua script is made to generate the font database for LuaTeX, in order
--- for it to be able to load a font according to its name, like XeTeX does.
---
--- It is part of the luaotfload bundle, see luaotfload's README for legal
--- notice.
if not modules then modules = { } end modules ['font-nms'] = {
version = 1.002,
comment = "companion to luaotfload.lua",
@@ -174,6 +169,8 @@ else
system = 'unix' -- ?
end
+fonts.system = system
+
-- path normalization:
-- - a\b\c -> a/b/c
-- - a/../b -> b
@@ -190,6 +187,8 @@ local function path_normalize(path)
return path
end
+fonts.path_normalize = path_normalize
+
-- this function scans a directory and populates the list of fonts
-- with all the fonts it finds.
-- - dirname is the name of the directory to scan