summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-18 22:21:33 +0000
committerKarl Berry <karl@freefriends.org>2013-05-18 22:21:33 +0000
commit2472c585a2dee03ef4665514cb651e5976fd134a (patch)
treecb0475ebdca2ed9ee248dd809f6bcce1671a0afb /Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua
parent542dd7f24e76ac20da26d1c4d7ceb69baa248133 (diff)
luaotfload (18may13)
git-svn-id: svn://tug.org/texlive/trunk@30561 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua29
1 files changed, 7 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua
index 60a7977bce5..0e4687493c6 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua
@@ -202,8 +202,10 @@ local fontnames_init = function (keep_cache) --- returns dbobj
}
end
-local make_name = function (path)
- return filereplacesuffix(path, "lua"), filereplacesuffix(path, "luc")
+--- string -> (string * string)
+local make_savenames = function (path)
+ return filereplacesuffix(path, "lua"),
+ filereplacesuffix(path, "luc")
end
--- When loading a lua file we try its binary complement first, which
@@ -249,7 +251,6 @@ local resolve
local resolve_cached
local save_names
local save_lookups
-local scan_external_dir
local update_names
--- state of the database
@@ -1494,7 +1495,7 @@ save_lookups = function ( )
local lookups = names.lookups
local path = ensure_names_path()
if fileiswritable(path) then
- local luaname, lucname = make_name(names.path.lookup_path)
+ local luaname, lucname = make_savenames(names.path.lookup_path)
if luaname then
tabletofile(luaname, lookups, true)
if lucname and type(caches.compile) == "function" then
@@ -1515,7 +1516,7 @@ save_names = function (fontnames)
if not fontnames then fontnames = names.data end
local path = ensure_names_path()
if fileiswritable(path) then
- local luaname, lucname = make_name(names.path.path)
+ local luaname, lucname = make_savenames(names.path.path)
if luaname then
--tabletofile(luaname, fontnames, true, { reduce=true })
tabletofile(luaname, fontnames, true)
@@ -1652,31 +1653,15 @@ local show_cache = function ( )
return true
end
---- is this used anywhere? we decided to comment it for the
---- time being.
---- https://github.com/lualatex/luaotfload/pull/61
---scan_external_dir = function (dir)
--- local old_names, new_names
--- if fonts_loaded then
--- old_names = names.data
--- else
--- old_names = load_names()
--- end
--- new_names = tablecopy(old_names)
--- local n_scanned, n_new = scan_dir(dir, old_names, new_names)
--- names.data = new_names
--- return n_scanned, n_new
---end
-
-----------------------------------------------------------------------
--- export functionality to the namespace “fonts.names”
-----------------------------------------------------------------------
+names.scan_dir = scan_dir
names.flush_lookup_cache = flush_lookup_cache
names.save_lookups = save_lookups
names.load = load_names
names.save = save_names
------.scan = scan_external_dir
names.update = update_names
names.crude_file_lookup = crude_file_lookup
names.crude_file_lookup_verbose = crude_file_lookup_verbose