From 3e100857c96b4796d009fe8b426e79c54c4b8941 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 29 Apr 2013 23:29:12 +0200 Subject: [doc] fix typos/indenting --- luaotfload.dtx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/luaotfload.dtx b/luaotfload.dtx index 5b454bc..e18c205 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -361,7 +361,7 @@ and the derived files % \verb|(|, % \verb|:|, and % \verb|/|. -% As obvious from the last exception, the \verb|file:| lookup will +% As is obvious from the last exception, the \verb|file:| lookup will % not process paths to the font location -- only those % files found when generating the database are addressable this way. % Continue below in the \XETEX section if you need to load your fonts @@ -470,6 +470,7 @@ and the derived files % \end{verbatim} % \end{quote} % +% \noindent % Which fits nicely with the whole set: % % \begin{quote} -- cgit v1.2.3 From 957606b6e33452c93df52fe9490fd6c0c7486c3c Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 29 Apr 2013 23:50:26 +0200 Subject: add option to disable live db updates --- luaotfload-database.lua | 25 ++++++++++++++++++------- tests/pln-tfm.tex | 2 ++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 037ca07..529cdf3 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -79,9 +79,14 @@ names.path = { path = "", } -config = config or { } -config.luaotfload = config.luaotfload or { } -config.luaotfload.resolver = config.luaotfload.resolver or "normal" +config = config or { } +config.luaotfload = config.luaotfload or { } +config.luaotfload.resolver = config.luaotfload.resolver or "normal" +if config.luaotfload.update_live ~= false then + --- this option allows for disabling updates + --- during a TeX run + config.luaotfload.update_live = true +end -- We use the cache.* of ConTeXt (see luat-basics-gen), we can -- use it safely (all checks and directory creations are already done). It @@ -677,7 +682,7 @@ end --- resolve() --- string -> ('a -> 'a) -> 'a list -> 'a reload_db = function (why, caller, ...) - report("log", 1, "db", "reload initiated; reason: “%s”", why) + report("both", 1, "db", "reload initiated; reason: “%s”", why) names.data = update_names() save_names(names.data) fonts_reloaded = true @@ -1392,6 +1397,12 @@ end --- dbobj -> bool -> dbobj update_names = function (fontnames, force) + if config.luaotfload.update_live == false then + report("info", 2, "db", + "skipping database update") + --- skip all db updates + return fontnames + end local starttime = os.gettimeofday() local n_scanned, n_new = 0, 0 --[[ @@ -1399,7 +1410,7 @@ update_names = function (fontnames, force) - “newfontnames” is the final table to return - force is whether we rebuild it from scratch or not ]] - report("info", 2, "db", "Updating the font names database" + report("both", 2, "db", "Updating the font names database" .. (force and " forcefully" or "")) if force then @@ -1409,8 +1420,8 @@ update_names = function (fontnames, force) fontnames = load_names() end if fontnames.version ~= names.version then - report("log", 1, "db", "No font names database or old " - .. "one found; generating new one") + report("both", 1, "db", "No font names database or old " + .. "one found; generating new one") fontnames = fontnames_init(true) end end diff --git a/tests/pln-tfm.tex b/tests/pln-tfm.tex index 26fa738..16ae41a 100644 --- a/tests/pln-tfm.tex +++ b/tests/pln-tfm.tex @@ -3,6 +3,8 @@ \font\antykwatorunska="file:rm-anttr" %% or with an anonymous request, like in þe olde TeX: \font\antykwatorunskabcap=ec-anttbcap +\font\lmromanten={file:ec-lmr10} at 10pt \antykwatorunska foo bar \antykwatorunskabcap baz xyzzy +\lmromanten Donde, está, la biblioteca. Me llamo T-Bone La araña discoteca. \bye -- cgit v1.2.3