From 60e5dfe5a271997fe530197bbd810862125fb795 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 15 May 2014 08:17:17 +0200 Subject: [main] choose resolver at runtime --- src/luaotfload-database.lua | 2 ++ src/luaotfload-main.lua | 10 ++++++---- 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 -- cgit v1.2.3