summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-01-11 14:46:36 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2010-01-11 15:31:43 +0200
commit1eb8ec9944195df481acb78e9bcb9e97cfa2c2c0 (patch)
treef7609e3c87e429a6e60ea6bd5852830697ebedff
parent0334ce144789afc921f9e652c4a5eca9debb0bd2 (diff)
downloadluaotfload-1eb8ec9944195df481acb78e9bcb9e97cfa2c2c0.tar.gz
Some logging
-rw-r--r--otfl-fonts.lua19
1 files changed, 15 insertions, 4 deletions
diff --git a/otfl-fonts.lua b/otfl-fonts.lua
index 3152a07..6d9ae18 100644
--- a/otfl-fonts.lua
+++ b/otfl-fonts.lua
@@ -11,10 +11,12 @@ otfl.fonts.module = {
license = "CC0"
}
+otfl.fonts.basename = "otfl-names.lua"
+
kpse.set_program_name("luatex")
-require("l-table.lua")
-require("l-io.lua")
+require("luaextra.lua")
+require("otfl-luat-dum.lua")
local fnames = fnames or { }
fnames.mappings = fnames.mappings or { }
@@ -46,6 +48,8 @@ function otfl.fonts.load(filename,names,force)
mappings[key] = { i.fullname, filename }
end
end
+ else
+ logs.simple("Failed to load %s", filename)
end
end
end
@@ -64,5 +68,12 @@ function otfl.fonts.fontlist()
return l
end
-otfl.fonts.reload(otfl.fonts.fontlist(),fnames)
-io.savedata("otfl-names.lua", table.serialize(fnames, true))
+local function main()
+ local flist = otfl.fonts.fontlist()
+ otfl.fonts.reload(flist,fnames)
+ logs.simple("%s fonts found, %s saved in the database", #flist, #table.keys(fnames.mappings))
+ io.savedata(otfl.fonts.basename, table.serialize(fnames, true))
+ logs.simple("Saved names database in %s\n", otfl.fonts.basename)
+end
+
+main()