summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-06-25 01:55:47 -0700
committerPhilipp Gesang <phg42.2a@gmail.com>2013-06-25 01:55:47 -0700
commitd83870c2e97cbae23a1d011f0fd0e2994a893e3b (patch)
tree69ceeab2c7e378a8bb983e8956ef19e3e75a8ad9
parent1caf2aa7b019b687e9b97e3a7a2d6ab55070f577 (diff)
parent7a480de4b77e6238fb1c937f772e6cd2a3be5655 (diff)
downloadluaotfload-d83870c2e97cbae23a1d011f0fd0e2994a893e3b.tar.gz
Merge pull request #101 from phi-gamma/master
fix issue #100
-rw-r--r--luaotfload-database.lua1
-rwxr-xr-xluaotfload-tool.lua15
2 files changed, 8 insertions, 8 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index 4c45d21..484decf 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -453,6 +453,7 @@ the texmf or filesystem.
--doc]]--
local verify_font_file = function (basename)
+ if not names.data then names.data = load_names() end
local filenames = names.data.filenames
local idx = filenames.base[basename]
if not idx then
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua
index 3eef577..f1302a7 100755
--- a/luaotfload-tool.lua
+++ b/luaotfload-tool.lua
@@ -43,9 +43,12 @@ if _G.getfenv then
return require(oldscript)
end
+local stringexplode = string.explode
local stringformat = string.format
-local texiowrite_nl = texio.write_nl
local stringlower = string.lower
+local tableconcat = table.concat
+local texiowrite_nl = texio.write_nl
+
local C, Ct, P = lpeg.C, lpeg.Ct, lpeg.P
local lpegmatch = lpeg.match
@@ -103,17 +106,17 @@ config.lualibs.verbose = false
config.lualibs.prefer_merged = true
config.lualibs.load_extended = false
-require"lualibs"
+require "lualibs"
--- prepare directories: the cache function in Luatex-Fonts
--- checks for writable directory only on startup, so everything
--- has to be laid out before we load basics-gen
-local cachepath = kpse.expand_var"$TEXMFVAR"
+local cachepath = kpse.expand_var "$TEXMFVAR"
if not lfs.isdir(cachepath) then
dir.mkdirs(cachepath)
if not lfs.isdir(cachepath) then
- texiowrite(stringformat(
+ texiowrite_nl(stringformat(
"ERROR could not create directory %s", cachepath))
end
end
@@ -412,10 +415,6 @@ local comma = P","
local noncomma = 1-comma
local split_comma = Ct((C(noncomma^1) + comma)^1)
-local texiowrite_nl = texio.write_nl
-local tableconcat = table.concat
-local stringexplode = string.explode
-
local separator = "\t" --- could be “,” for csv
local format_fields format_fields = function (fields, acc, n)