summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-05-15 08:17:17 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2014-05-15 08:17:17 +0200
commit60e5dfe5a271997fe530197bbd810862125fb795 (patch)
tree59ef750362a49f37d129122ebb8d21d7a5e3a798 /src
parent34ee3fabd8fe483e7773b127d9d7fca96379f07d (diff)
downloadluaotfload-60e5dfe5a271997fe530197bbd810862125fb795.tar.gz
[main] choose resolver at runtime
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-database.lua2
-rw-r--r--src/luaotfload-main.lua10
2 files changed, 8 insertions, 4 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index c4075dc..59e2a4d 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -484,6 +484,8 @@ load_names = function (dry_run)
if data then
report ("log", 0, "db",
"Font names database loaded from %s", foundname)
+ report ("term", 3, "db",
+ "Font names database loaded from %s", foundname)
report ("info", 3, "db", "Loading took %0.f ms.",
1000 * (osgettimeofday () - starttime))
diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua
index 82192f8..d8dc1d1 100644
--- a/src/luaotfload-main.lua
+++ b/src/luaotfload-main.lua
@@ -479,7 +479,6 @@ fonts.encodings.known = fonts.encodings.known or { }
local resolve_file = names.crude_file_lookup
--local resolve_file = names.crude_file_lookup_verbose
-local resolve_name = names.resolve_name
local file_resolver = function (specification)
local name = resolve_file (specification.name)
@@ -612,8 +611,7 @@ end
--[[doc--
- The \verb|name:| resolver wraps the database function
- \luafunction{resolve_name}.
+ The \verb|name:| resolver.
--doc]]--
@@ -621,7 +619,11 @@ end
--- generic name resolver.
request_resolvers.name = function (specification)
- local resolved, subfont = resolve_name (specification)
+ local resolver = names.resolve_cached
+ if config.luaotfload.run.resolver == "normal" then
+ resolver = names.resolve_name
+ end
+ local resolved, subfont = resolver (specification)
if resolved then
specification.resolved = resolved
specification.sub = subfont