diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-05-03 19:55:03 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-05-03 19:55:03 +0200 |
commit | 542fc9edfb02a4e0cbde369e16dd66227cba95fc (patch) | |
tree | ce17977eb0e28a7f214f699a9baf79301c199809 | |
parent | a02abd16b0ffc8a21270297008e766917e25670b (diff) | |
download | luaotfload-542fc9edfb02a4e0cbde369e16dd66227cba95fc.tar.gz |
make cache flushing work with new cache file
-rw-r--r-- | luaotfload-database.lua | 2 | ||||
-rwxr-xr-x | luaotfload-tool.lua | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua index aaba55a..6f95208 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -116,6 +116,7 @@ Auxiliary functions local report = logs.names_report +--- string -> string local sanitize_string = function (str) if str ~= nil then return utf8gsub(utf8lower(str), "[^%a%d]", "") @@ -1537,6 +1538,7 @@ end --- export functionality to the namespace “fonts.names” names.flush_cache = flush_cache +names.save_lookups = save_lookups names.load = load_names names.save = save_names names.scan = scan_external_dir diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index bb935cf..0833842 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -253,11 +253,10 @@ actions.generate = function (job) end actions.flush = function (job) - local success, fontnames = names.flush_cache() + local success, lookups = names.flush_cache() if success then - local savedname = names.save(fontnames) - logs.names_report("info", 2, "cache", - "Cache emptied", #fontnames.mappings) + local savedname = names.save_lookups() + logs.names_report("info", 2, "cache", "Cache emptied") if savedname then return true, true end |