From 86085b2cc984672d81cb833a99558fce25eb094f Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 18 Jun 2015 19:26:05 +0200 Subject: [parsers] at higher log levels, display information about fontconfig files being read --- src/luaotfload-parsers.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua index 3a4faea..a9acd9f 100644 --- a/src/luaotfload-parsers.lua +++ b/src/luaotfload-parsers.lua @@ -190,6 +190,7 @@ local p_cheapxml = header * root --doc]]-- --- string -> path list local fonts_conf_scanner = function (path) + logreport("both", 5, "db", "Read fontconfig file %s.", path) local fh = ioopen(path, "r") if not fh then logreport("both", 3, "db", "Cannot open fontconfig file %s.", path) @@ -197,12 +198,17 @@ local fonts_conf_scanner = function (path) end local raw = fh:read"*all" fh:close() + logreport("both", 7, "db", + "Reading fontconfig file %s completed (%d bytes).", + path, #raw) + logreport("both", 5, "db", "Scan fontconfig file %s.", path) local confdata = lpegmatch(p_cheapxml, raw) if not confdata then logreport("both", 3, "db", "Cannot scan fontconfig file %s.", path) return end + logreport("both", 7, "db", "Scan of fontconfig file %s completed.", path) return confdata end -- cgit v1.2.3 From 54d4d86d58c301785b9d5859faadd2ad11537bc2 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 18 Jun 2015 22:40:12 +0200 Subject: [parsers] fix tracking of included fontconfig files Addresses issue https://github.com/lualatex/luaotfload/issues/275 There indeed was a check missing for included files. Since a corresponding check for included directories was in effect it probably masked the potential stack blowthrough. --- src/luaotfload-parsers.lua | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua index a9acd9f..a39d2cd 100644 --- a/src/luaotfload-parsers.lua +++ b/src/luaotfload-parsers.lua @@ -298,18 +298,21 @@ read_fonts_conf_indeed = function (start, end if lfsisfile(path) and kpsereadable_file(path) - and not done[path] then - --- we exclude path with texmf in them, as they should - --- be found otherwise - acc = read_fonts_conf_indeed(path, - home, - xdg_config_home, - xdg_data_home, - acc, - done, - dirs_done, - find_files) + if done[path] then + logreport("log", 3, "load", + "skipping file at %s, already included.", opt) + else + done[path] = true + acc = read_fonts_conf_indeed(path, + home, + xdg_config_home, + xdg_data_home, + acc, + done, + dirs_done, + find_files) + end elseif lfsisdir(path) then --- arrow code ahead local config_files = find_files (path, conf_filter) for _, filename in next, config_files do -- cgit v1.2.3 From 7c2e8d69c755e05044a214dcefca164fd62d4727 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 18 Jun 2015 22:55:53 +0200 Subject: [parsers] set hard limit on fontconfig scanner recursion depth --- src/luaotfload-parsers.lua | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua index a39d2cd..2ef32c3 100644 --- a/src/luaotfload-parsers.lua +++ b/src/luaotfload-parsers.lua @@ -17,9 +17,11 @@ if not modules then modules = { } end modules ['luaotfload-parsers'] = { license = "GNU GPL v2.0" } -luaotfload = luaotfload or { } -luaotfload.parsers = luaotfload.parsers or { } -local parsers = luaotfload.parsers +luaotfload = luaotfload or { } +luaotfload.parsers = luaotfload.parsers or { } +local parsers = luaotfload.parsers +parsers.traversal_maxdepth = 42 --- prevent stack overflows +local traversal_maxdepth = parsers.traversal_maxdepth --- TODO could be an option local rawset = rawset @@ -226,8 +228,9 @@ end read_fonts_conf_indeed() -- Scan paths included from fontconfig configuration files recursively. Called with eight arguments. - The first four are + The first five are + · the current recursion depth · the path to the file · the expanded $HOME · the expanded $XDG_CONFIG_HOME @@ -240,12 +243,13 @@ end --doc]]-- ---- string -> string -> string -> string +--- size_t -> string -> string -> string -> string --- -> string list -> string list -> string list --- -> (string -> fun option -> string list) --- -> tab * tab * tab local read_fonts_conf_indeed -read_fonts_conf_indeed = function (start, +read_fonts_conf_indeed = function (depth, + start, home, xdg_config_home, xdg_data_home, @@ -254,6 +258,18 @@ read_fonts_conf_indeed = function (start, dirs_done, find_files) + logreport ("both", 4, "db", + "Fontconfig scanner processing path %s.", + start) + if depth >= traversal_maxdepth then + --- prevent overflow of Lua call stack + logreport ("both", 0, "db", + "Fontconfig scanner hit recursion limit (%d); " + .. "aborting directory traversal.", + traversal_maxdepth) + return acc, done, dirs_done + end + local paths = fonts_conf_scanner(start) if not paths then --- nothing to do return acc, done, dirs_done @@ -301,10 +317,11 @@ read_fonts_conf_indeed = function (start, then if done[path] then logreport("log", 3, "load", - "skipping file at %s, already included.", opt) + "Skipping file at %s, already included.", opt) else done[path] = true - acc = read_fonts_conf_indeed(path, + acc = read_fonts_conf_indeed(depth + 1, + path, home, xdg_config_home, xdg_data_home, @@ -317,7 +334,8 @@ read_fonts_conf_indeed = function (start, local config_files = find_files (path, conf_filter) for _, filename in next, config_files do if not done[filename] then - acc = read_fonts_conf_indeed(filename, + acc = read_fonts_conf_indeed(depth + 1, + filename, home, xdg_config_home, xdg_data_home, @@ -328,7 +346,7 @@ read_fonts_conf_indeed = function (start, end end end --- match “kind” - end --- iterate paths + end --- iterate paths end --inspect(acc) @@ -359,7 +377,8 @@ local read_fonts_conf = function (path_list, find_files) local done = { } ---> set: files inspected local dirs_done = { } ---> set: dirs in list for i=1, #path_list do --- we keep the state between files - acc, done, dirs_done = read_fonts_conf_indeed(path_list[i], + acc, done, dirs_done = read_fonts_conf_indeed(0, + path_list[i], home, xdg_config_home, xdg_data_home, -- cgit v1.2.3 From 4252a41ffc8e6851cd634f3ae38b4ed38b52ff80 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 18 Jun 2015 23:01:44 +0200 Subject: [parsers] check fontconfig includes at another part of the scanner and add more verbose messages --- src/luaotfload-parsers.lua | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua index 2ef32c3..a52b5d4 100644 --- a/src/luaotfload-parsers.lua +++ b/src/luaotfload-parsers.lua @@ -295,6 +295,9 @@ read_fonts_conf_indeed = function (depth, --- distributions (e.g. Context minimals) installed --- separately? if not (stringfind(path, "texmf") or dirs_done[path]) then + logreport ("log", 5, "db", + "New fontconfig path at %s.", + path) acc[#acc+1] = path dirs_done[path] = true end @@ -316,8 +319,8 @@ read_fonts_conf_indeed = function (depth, and kpsereadable_file(path) then if done[path] then - logreport("log", 3, "load", - "Skipping file at %s, already included.", opt) + logreport("log", 3, "db", + "Skipping file at %s, already included.", path) else done[path] = true acc = read_fonts_conf_indeed(depth + 1, @@ -334,15 +337,21 @@ read_fonts_conf_indeed = function (depth, local config_files = find_files (path, conf_filter) for _, filename in next, config_files do if not done[filename] then - acc = read_fonts_conf_indeed(depth + 1, - filename, - home, - xdg_config_home, - xdg_data_home, - acc, - done, - dirs_done, - find_files) + if done[path] then + logreport ("log", 3, "db", + "Skipping file at %s, already included.", path) + else + done[path] = true + acc = read_fonts_conf_indeed(depth + 1, + filename, + home, + xdg_config_home, + xdg_data_home, + acc, + done, + dirs_done, + find_files) + end end end end --- match “kind” -- cgit v1.2.3 From 4a4d051f31809d47dbb382184f8bdbd6d71560ce Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 19 Jun 2015 21:49:05 +0200 Subject: [db,tool] prevent database rebuild when querying version info Reported by /u/ThomasFehige on Github: https://github.com/lualatex/luaotfload/issues/275#issuecomment-113515484 --- src/luaotfload-database.lua | 16 ++++++++++++---- src/luaotfload-tool.lua | 12 ++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua index 099c256..1831ca3 100644 --- a/src/luaotfload-database.lua +++ b/src/luaotfload-database.lua @@ -482,8 +482,8 @@ local fonts_reloaded = false --- limit output when approximate font matching (luaotfload-tool -F) local fuzzy_limit = 1 --- display closest only ---- bool? -> dbobj -load_names = function (dry_run) +--- bool? -> -> bool? -> dbobj option +load_names = function (dry_run, no_rebuild) local starttime = osgettimeofday () local foundname, data = load_lua_file (config.luaotfload.paths.index_path_lua) @@ -519,6 +519,11 @@ load_names = function (dry_run) end end else + if no_rebuild == true then + report ("both", 2, "db", + [[Database does not exist, skipping rebuild though.]]) + return false + end report ("both", 0, "db", [[Font names database not found, generating new one.]]) report ("both", 0, "db", @@ -545,8 +550,11 @@ access_font_index = function () end getmetadata = function () - if not name_index then name_index = load_names() end - return tablefastcopy (name_index.meta) + if not name_index then + name_index = load_names (false, true) + if name_index then return tablefastcopy (name_index.meta) end + end + return false end --- unit -> unit diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua index 36c23bd..e240e4c 100755 --- a/src/luaotfload-tool.lua +++ b/src/luaotfload-tool.lua @@ -288,10 +288,14 @@ local version_msg = function ( ) local var = uname_vars[i] out (" + %8s: %s", var, uname[var]) end - out ("Index: version=%q created=%q modified=%q", - config.luaotfload.status.notes.revision, - meta.created or "ages ago", - meta.modified or "ages ago") + if meta == false then + out("No database metadata available.") + else + out ("Index: version=%q created=%q modified=%q", + config.luaotfload.status.notes.revision, + meta.created or "ages ago", + meta.modified or "ages ago") + end out "" end -- cgit v1.2.3 From 8018408e5e87da1ba46414d4620ac5c21a0b3bdb Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 20 Jun 2015 23:42:50 +0200 Subject: [main, init] move fontloader-specific stuff completely into init --- src/luaotfload-init.lua | 252 +++++++++++++++++++++++++++++++++++++++++++ src/luaotfload-main.lua | 278 +++++------------------------------------------- 2 files changed, 277 insertions(+), 253 deletions(-) diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua index 4968877..22ad704 100644 --- a/src/luaotfload-init.lua +++ b/src/luaotfload-init.lua @@ -57,3 +57,255 @@ local load_fontloader_module = luaotfload.loaders.fontloader load_luaotfload_module "log" +local log = luaotfload.log +local logreport = log.report + +log.set_loglevel (default_log_level) + +--[[doc-- + + \subsection{Preparing the Font Loader} + We treat the fontloader as a black box so behavior is consistent + between formats. + We load the fontloader code directly in the same fashion as the + Plain format \identifier{luatex-fonts} that is part of Context. + How this is executed depends on the presence on the + \emphasis{merged font loader code}. + In \identifier{luaotfload} this is contained in the file + \fileent{luaotfload-merged.lua}. + If this file cannot be found, the original libraries from \CONTEXT + of which the merged code was composed are loaded instead. + Since these files are not shipped with Luaotfload, an installation + of Context is required. + (Since we pull the fontloader directly from the Context minimals, + the necessary Context version is likely to be more recent than that + of other TeX distributions like Texlive.) + The imported font loader will call \luafunction{callback.register} + once while reading \fileent{font-def.lua}. + This is unavoidable unless we modify the imported files, but + harmless if we make it call a dummy instead. + However, this problem might vanish if we decide to do the merging + ourselves, like the \identifier{lualibs} package does. + With this step we would obtain the freedom to load our own + overrides in the process right where they are needed, at the cost + of losing encapsulation. + The decision on how to progress is currently on indefinite hold. + +--doc]]-- + +local starttime = os.gettimeofday () +local trapped_register = callback.register +callback.register = function (id) + logreport ("log", 4, "main", + "Dummy callback.register() invoked on %s.", + id) +end + + +--[[doc-- + + By default, the fontloader requires a number of \emphasis{private + attributes} for internal use. + These must be kept consistent with the attribute handling methods + as provided by \identifier{luatexbase}. + Our strategy is to override the function that allocates new + attributes before we initialize the font loader, making it a + wrapper around \luafunction{luatexbase.new_attribute}.\footnote{% + Many thanks, again, to Hans Hagen for making this part + configurable! + } + The attribute identifiers are prefixed “\fileent{luaotfload@}” to + avoid name clashes. + +--doc]]-- + +do + local new_attribute = luatexbase.new_attribute + local the_attributes = luatexbase.attributes + + attributes = attributes or { } + + attributes.private = function (name) + local attr = "luaotfload@" .. name --- used to be: “otfl@” + local number = the_attributes[attr] + if not number then + number = new_attribute(attr) + end + return number + end +end + +--[[doc-- + + These next lines replicate the behavior of + \fileent{luatex-fonts.lua}. + +--doc]]-- + +local context_environment = { } + +local push_namespaces = function () + logreport ("log", 4, "main", "push namespace for font loader") + local normalglobal = { } + for k, v in next, _G do + normalglobal[k] = v + end + return normalglobal +end + +local pop_namespaces = function (normalglobal, isolate) + if normalglobal then + local _G = _G + local mode = "non-destructive" + if isolate then mode = "destructive" end + logreport ("log", 4, "main", "pop namespace from font loader -- " .. mode) + for k, v in next, _G do + if not normalglobal[k] then + context_environment[k] = v + if isolate then + _G[k] = nil + end + end + end + for k, v in next, normalglobal do + _G[k] = v + end + -- just to be sure: + setmetatable(context_environment,_G) + else + logreport ("both", 0, "main", + "irrecoverable error during pop_namespace: no globals to restore") + os.exit() + end +end + +luaotfload.context_environment = context_environment +luaotfload.push_namespaces = push_namespaces +luaotfload.pop_namespaces = pop_namespaces + +local our_environment = push_namespaces() + +--[[doc-- + + The font loader requires that the attribute with index zero be + zero. We happily oblige. + (Cf. \fileent{luatex-fonts-nod.lua}.) + +--doc]]-- + +tex.attribute[0] = 0 + +--[[doc-- + + Now that things are sorted out we can finally load the fontloader. + + For less current distibutions we ship the code from TL 2014 that should be + compatible with Luatex 0.76. + +--doc]]-- + +load_fontloader_module (luaotfload.fontloader_package) + +---load_fontloader_module "font-odv.lua" --- <= Devanagari support from Context + +if fonts then + + --- The Initialization is highly idiosyncratic. + + if not fonts._merge_loaded_message_done_ then + logreport ("log", 5, "main", [["I am using the merged fontloader here.]]) + logreport ("log", 5, "main", [[ If you run into problems or experience unexpected]]) + logreport ("log", 5, "main", [[ behaviour, and if you have ConTeXt installed you can try]]) + logreport ("log", 5, "main", [[ to delete the file 'fontloader-fontloader.lua' as I might]]) + logreport ("log", 5, "main", [[ then use the possibly updated libraries. The merged]]) + logreport ("log", 5, "main", [[ version is not supported as it is a frozen instance.]]) + logreport ("log", 5, "main", [[ Problems can be reported to the ConTeXt mailing list."]]) + end + fonts._merge_loaded_message_done_ = true + +else--- the loading sequence is known to change, so this might have to + --- be updated with future updates! + --- do not modify it though unless there is a change to the merged + --- package! + load_fontloader_module "l-lua" + load_fontloader_module "l-lpeg" + load_fontloader_module "l-function" + load_fontloader_module "l-string" + load_fontloader_module "l-table" + load_fontloader_module "l-io" + load_fontloader_module "l-file" + load_fontloader_module "l-boolean" + load_fontloader_module "l-math" + load_fontloader_module "util-str" + load_fontloader_module "luatex-basics-gen" + load_fontloader_module "data-con" + load_fontloader_module "luatex-basics-nod" + load_fontloader_module "font-ini" + load_fontloader_module "font-con" + load_fontloader_module "luatex-fonts-enc" + load_fontloader_module "font-cid" + load_fontloader_module "font-map" + load_fontloader_module "luatex-fonts-syn" + load_fontloader_module "luatex-fonts-tfm" + load_fontloader_module "font-oti" + load_fontloader_module "font-otf" + load_fontloader_module "font-otb" + load_fontloader_module "luatex-fonts-inj" --> since 2014-01-07, replaces node-inj.lua + load_fontloader_module "luatex-fonts-ota" + load_fontloader_module "luatex-fonts-otn" --> since 2014-01-07, replaces font-otn.lua + load_fontloader_module "font-otp" --> since 2013-04-23 + load_fontloader_module "luatex-fonts-lua" + load_fontloader_module "font-def" + load_fontloader_module "luatex-fonts-def" + load_fontloader_module "luatex-fonts-ext" + load_fontloader_module "luatex-fonts-cbk" +end --- non-merge fallback scope + +--[[doc-- + + Here we adjust the globals created during font loader + initialization. If the second argument to + \luafunction{pop_namespaces()} is \verb|true| this will restore the + state of \luafunction{_G}, eliminating every global generated since + the last call to \luafunction{push_namespaces()}. At the moment we + see no reason to do this, and since the font loader is considered + an essential part of \identifier{luatex} as well as a very well + organized piece of code, we happily concede it the right to add to + \luafunction{_G} if needed. + +--doc]]-- + +pop_namespaces(our_environment, false)-- true) + +logreport ("both", 1, "main", + "fontloader loaded in %0.3f seconds", os.gettimeofday()-starttime) + +--[[doc-- + + \subsection{Callbacks} + After the fontloader is ready we can restore the callback trap from + \identifier{luatexbase}. + +--doc]]-- + +callback.register = trapped_register + +--[[doc-- + + We do our own callback handling with the means provided by + luatexbase. + Note: \luafunction{pre_linebreak_filter} and + \luafunction{hpack_filter} are coupled in \CONTEXT in the concept + of \emphasis{node processor}. + +--doc]]-- + +luatexbase.add_to_callback("pre_linebreak_filter", + nodes.simple_font_handler, + "luaotfload.node_processor", + 1) +luatexbase.add_to_callback("hpack_filter", + nodes.simple_font_handler, + "luaotfload.node_processor", + 1) + diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index a825dc3..d15e082 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -19,6 +19,10 @@ local luaotfload = luaotfload luaotfload.log = luaotfload.log or { } luaotfload.version = "2.6" luaotfload.loaders = { } +luaotfload.min_luatex_version = 79 --- i. e. 0.79 +----------.fontloader_package = "fontloader" --- default: from current Context +luaotfload.fontloader_package = "slim" + local authors = "\z Hans Hagen,\z @@ -104,16 +108,12 @@ luaotfload.log.tex = { --doc]]-- -local min_luatex_version = 79 --- i. e. 0.79 ---local fontloader_package = "fontloader" --- default: from current Context -local fontloader_package = "slim" - -if tex.luatexversion < min_luatex_version then +if tex.luatexversion < luaotfload.min_luatex_version then warning ("LuaTeX v%.2f is old, v%.2f or later is recommended.", tex.luatexversion / 100, - min_luatex_version / 100) + luaotfload.min_luatex_version / 100) warning ("using fallback fontloader -- newer functionality not available") - fontloader_package = "tl2014" --- TODO fallback should be configurable too + luaotfload.fontloader_package = "tl2014" --- TODO fallback should be configurable too --- we install a fallback for older versions as a safety end @@ -126,9 +126,25 @@ end --doc]]-- +local make_loader_name = function (prefix, name) + local msg = luaotfload.log and luaotfload.log.report or print + if prefix then + msg ("log", 7, "load", + "Composing fontloader name from constitutents %s, %s", + prefix, name) + return prefix .. "-" .. name .. ".lua" + end + msg ("log", 7, "load", + "Loading fontloader file %s literally.", + name) + return name +end + local make_loader = function (prefix) - return prefix and function (name) require (prefix .. "-" .. name .. ".lua") end - or function (name) require (name) end + return function (name) + local modname = make_loader_name (prefix, name) + require (modname) + end end local load_luaotfload_module = make_loader "luaotfload" @@ -143,250 +159,6 @@ load_luaotfload_module "init" --- fontloader initialization local log = luaotfload.log local logreport = log.report -log.set_loglevel (default_log_level) - ---[[doc-- - - \subsection{Preparing the Font Loader} - We treat the fontloader as a black box so behavior is consistent - between formats. - We load the fontloader code directly in the same fashion as the - Plain format \identifier{luatex-fonts} that is part of Context. - How this is executed depends on the presence on the - \emphasis{merged font loader code}. - In \identifier{luaotfload} this is contained in the file - \fileent{luaotfload-merged.lua}. - If this file cannot be found, the original libraries from \CONTEXT - of which the merged code was composed are loaded instead. - Since these files are not shipped with Luaotfload, an installation - of Context is required. - (Since we pull the fontloader directly from the Context minimals, - the necessary Context version is likely to be more recent than that - of other TeX distributions like Texlive.) - The imported font loader will call \luafunction{callback.register} - once while reading \fileent{font-def.lua}. - This is unavoidable unless we modify the imported files, but - harmless if we make it call a dummy instead. - However, this problem might vanish if we decide to do the merging - ourselves, like the \identifier{lualibs} package does. - With this step we would obtain the freedom to load our own - overrides in the process right where they are needed, at the cost - of losing encapsulation. - The decision on how to progress is currently on indefinite hold. - ---doc]]-- - -local starttime = os.gettimeofday () -local trapped_register = callback.register -callback.register = dummy_function - ---[[doc-- - - By default, the fontloader requires a number of \emphasis{private - attributes} for internal use. - These must be kept consistent with the attribute handling methods - as provided by \identifier{luatexbase}. - Our strategy is to override the function that allocates new - attributes before we initialize the font loader, making it a - wrapper around \luafunction{luatexbase.new_attribute}.\footnote{% - Many thanks, again, to Hans Hagen for making this part - configurable! - } - The attribute identifiers are prefixed “\fileent{luaotfload@}” to - avoid name clashes. - ---doc]]-- - -do - local new_attribute = luatexbase.new_attribute - local the_attributes = luatexbase.attributes - - attributes = attributes or { } - - attributes.private = function (name) - local attr = "luaotfload@" .. name --- used to be: “otfl@” - local number = the_attributes[attr] - if not number then - number = new_attribute(attr) - end - return number - end -end - ---[[doc-- - - These next lines replicate the behavior of - \fileent{luatex-fonts.lua}. - ---doc]]-- - -local context_environment = { } - -local push_namespaces = function () - logreport ("log", 1, "main", "push namespace for font loader") - local normalglobal = { } - for k, v in next, _G do - normalglobal[k] = v - end - return normalglobal -end - -local pop_namespaces = function (normalglobal, isolate) - if normalglobal then - local _G = _G - local mode = "non-destructive" - if isolate then mode = "destructive" end - logreport ("log", 1, "main", "pop namespace from font loader -- " .. mode) - for k, v in next, _G do - if not normalglobal[k] then - context_environment[k] = v - if isolate then - _G[k] = nil - end - end - end - for k, v in next, normalglobal do - _G[k] = v - end - -- just to be sure: - setmetatable(context_environment,_G) - else - logreport ("both", 0, "main", - "irrecoverable error during pop_namespace: no globals to restore") - os.exit() - end -end - -luaotfload.context_environment = context_environment -luaotfload.push_namespaces = push_namespaces -luaotfload.pop_namespaces = pop_namespaces - -local our_environment = push_namespaces() - ---[[doc-- - - The font loader requires that the attribute with index zero be - zero. We happily oblige. - (Cf. \fileent{luatex-fonts-nod.lua}.) - ---doc]]-- - -tex.attribute[0] = 0 - ---[[doc-- - - Now that things are sorted out we can finally load the fontloader. - - For less current distibutions we ship the code from TL 2014 that should be - compatible with Luatex 0.76. - ---doc]]-- - -load_fontloader_module (fontloader_package) - ----load_fontloader_module "font-odv.lua" --- <= Devanagari support from Context - -if fonts then - - --- The Initialization is highly idiosyncratic. - - if not fonts._merge_loaded_message_done_ then - logreport ("log", 5, "main", [["I am using the merged fontloader here.]]) - logreport ("log", 5, "main", [[ If you run into problems or experience unexpected]]) - logreport ("log", 5, "main", [[ behaviour, and if you have ConTeXt installed you can try]]) - logreport ("log", 5, "main", [[ to delete the file 'fontloader-fontloader.lua' as I might]]) - logreport ("log", 5, "main", [[ then use the possibly updated libraries. The merged]]) - logreport ("log", 5, "main", [[ version is not supported as it is a frozen instance.]]) - logreport ("log", 5, "main", [[ Problems can be reported to the ConTeXt mailing list."]]) - end - fonts._merge_loaded_message_done_ = true - -else--- the loading sequence is known to change, so this might have to - --- be updated with future updates! - --- do not modify it though unless there is a change to the merged - --- package! - load_fontloader_module "l-lua" - load_fontloader_module "l-lpeg" - load_fontloader_module "l-function" - load_fontloader_module "l-string" - load_fontloader_module "l-table" - load_fontloader_module "l-io" - load_fontloader_module "l-file" - load_fontloader_module "l-boolean" - load_fontloader_module "l-math" - load_fontloader_module "util-str" - load_fontloader_module "luatex-basics-gen" - load_fontloader_module "data-con" - load_fontloader_module "luatex-basics-nod" - load_fontloader_module "font-ini" - load_fontloader_module "font-con" - load_fontloader_module "luatex-fonts-enc" - load_fontloader_module "font-cid" - load_fontloader_module "font-map" - load_fontloader_module "luatex-fonts-syn" - load_fontloader_module "luatex-fonts-tfm" - load_fontloader_module "font-oti" - load_fontloader_module "font-otf" - load_fontloader_module "font-otb" - load_fontloader_module "luatex-fonts-inj" --> since 2014-01-07, replaces node-inj.lua - load_fontloader_module "luatex-fonts-ota" - load_fontloader_module "luatex-fonts-otn" --> since 2014-01-07, replaces font-otn.lua - load_fontloader_module "font-otp" --> since 2013-04-23 - load_fontloader_module "luatex-fonts-lua" - load_fontloader_module "font-def" - load_fontloader_module "luatex-fonts-def" - load_fontloader_module "luatex-fonts-ext" - load_fontloader_module "luatex-fonts-cbk" -end --- non-merge fallback scope - ---[[doc-- - - Here we adjust the globals created during font loader - initialization. If the second argument to - \luafunction{pop_namespaces()} is \verb|true| this will restore the - state of \luafunction{_G}, eliminating every global generated since - the last call to \luafunction{push_namespaces()}. At the moment we - see no reason to do this, and since the font loader is considered - an essential part of \identifier{luatex} as well as a very well - organized piece of code, we happily concede it the right to add to - \luafunction{_G} if needed. - ---doc]]-- - -pop_namespaces(our_environment, false)-- true) - -logreport ("both", 1, "main", - "fontloader loaded in %0.3f seconds", os.gettimeofday()-starttime) - ---[[doc-- - - \subsection{Callbacks} - After the fontloader is ready we can restore the callback trap from - \identifier{luatexbase}. - ---doc]]-- - -callback.register = trapped_register - ---[[doc-- - - We do our own callback handling with the means provided by - luatexbase. - Note: \luafunction{pre_linebreak_filter} and - \luafunction{hpack_filter} are coupled in \CONTEXT in the concept - of \emphasis{node processor}. - ---doc]]-- - -add_to_callback("pre_linebreak_filter", - nodes.simple_font_handler, - "luaotfload.node_processor", - 1) -add_to_callback("hpack_filter", - nodes.simple_font_handler, - "luaotfload.node_processor", - 1) - load_luaotfload_module "override" --- load glyphlist on demand --[[doc-- -- cgit v1.2.3 From ce886921fec191c6d62e2592fda064790bef8e9f Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 20 Jun 2015 23:46:01 +0200 Subject: [init] add stub for module sanitization --- src/luaotfload-init.lua | 8 ++++++++ src/luaotfload-main.lua | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua index 22ad704..8bbb59f 100644 --- a/src/luaotfload-init.lua +++ b/src/luaotfload-init.lua @@ -309,3 +309,11 @@ luatexbase.add_to_callback("hpack_filter", "luaotfload.node_processor", 1) +return { + init = function () + init_prepare () + init_main () + init_cleanup () + end +} + diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index d15e082..6e7a971 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -143,7 +143,7 @@ end local make_loader = function (prefix) return function (name) local modname = make_loader_name (prefix, name) - require (modname) + return require (modname) end end @@ -154,7 +154,7 @@ local load_fontloader_module = make_loader "fontloader" luaotfload.loaders.luaotfload = load_luaotfload_module luaotfload.loaders.fontloader = load_fontloader_module -load_luaotfload_module "init" --- fontloader initialization +luaotfload.init = load_luaotfload_module "init" --- fontloader initialization local log = luaotfload.log local logreport = log.report -- cgit v1.2.3 From f5d3197a4e5f6dee89fcf03e588f0d8cc357dd94 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 20 Jun 2015 23:46:55 +0200 Subject: [init] adapt log messages --- src/luaotfload-init.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua index 8bbb59f..ce29527 100644 --- a/src/luaotfload-init.lua +++ b/src/luaotfload-init.lua @@ -96,7 +96,7 @@ log.set_loglevel (default_log_level) local starttime = os.gettimeofday () local trapped_register = callback.register callback.register = function (id) - logreport ("log", 4, "main", + logreport ("log", 4, "init", "Dummy callback.register() invoked on %s.", id) end @@ -145,7 +145,7 @@ end local context_environment = { } local push_namespaces = function () - logreport ("log", 4, "main", "push namespace for font loader") + logreport ("log", 4, "init", "push namespace for font loader") local normalglobal = { } for k, v in next, _G do normalglobal[k] = v @@ -158,7 +158,7 @@ local pop_namespaces = function (normalglobal, isolate) local _G = _G local mode = "non-destructive" if isolate then mode = "destructive" end - logreport ("log", 4, "main", "pop namespace from font loader -- " .. mode) + logreport ("log", 4, "init", "pop namespace from font loader -- " .. mode) for k, v in next, _G do if not normalglobal[k] then context_environment[k] = v @@ -173,7 +173,7 @@ local pop_namespaces = function (normalglobal, isolate) -- just to be sure: setmetatable(context_environment,_G) else - logreport ("both", 0, "main", + logreport ("both", 0, "init", "irrecoverable error during pop_namespace: no globals to restore") os.exit() end @@ -213,13 +213,13 @@ if fonts then --- The Initialization is highly idiosyncratic. if not fonts._merge_loaded_message_done_ then - logreport ("log", 5, "main", [["I am using the merged fontloader here.]]) - logreport ("log", 5, "main", [[ If you run into problems or experience unexpected]]) - logreport ("log", 5, "main", [[ behaviour, and if you have ConTeXt installed you can try]]) - logreport ("log", 5, "main", [[ to delete the file 'fontloader-fontloader.lua' as I might]]) - logreport ("log", 5, "main", [[ then use the possibly updated libraries. The merged]]) - logreport ("log", 5, "main", [[ version is not supported as it is a frozen instance.]]) - logreport ("log", 5, "main", [[ Problems can be reported to the ConTeXt mailing list."]]) + logreport ("log", 5, "init", [["I am using the merged fontloader here.]]) + logreport ("log", 5, "init", [[ If you run into problems or experience unexpected]]) + logreport ("log", 5, "init", [[ behaviour, and if you have ConTeXt installed you can try]]) + logreport ("log", 5, "init", [[ to delete the file 'fontloader-fontloader.lua' as I might]]) + logreport ("log", 5, "init", [[ then use the possibly updated libraries. The merged]]) + logreport ("log", 5, "init", [[ version is not supported as it is a frozen instance.]]) + logreport ("log", 5, "init", [[ Problems can be reported to the ConTeXt mailing list."]]) end fonts._merge_loaded_message_done_ = true @@ -277,7 +277,7 @@ end --- non-merge fallback scope pop_namespaces(our_environment, false)-- true) -logreport ("both", 1, "main", +logreport ("both", 1, "init", "fontloader loaded in %0.3f seconds", os.gettimeofday()-starttime) --[[doc-- -- cgit v1.2.3 From 6516c934af82a0ade55c27edb4e596abf86f6b45 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 20 Jun 2015 23:52:48 +0200 Subject: [init] move late initialization stage from toplevel into dedicated subroutines --- src/luaotfload-init.lua | 83 ++++++++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua index ce29527..b47e3d4 100644 --- a/src/luaotfload-init.lua +++ b/src/luaotfload-init.lua @@ -261,59 +261,70 @@ else--- the loading sequence is known to change, so this might have to load_fontloader_module "luatex-fonts-cbk" end --- non-merge fallback scope ---[[doc-- +local init_cleanup = function () + --- reinstate all the stuff we had to move out of the way to + --- accomodate the loader - Here we adjust the globals created during font loader - initialization. If the second argument to - \luafunction{pop_namespaces()} is \verb|true| this will restore the - state of \luafunction{_G}, eliminating every global generated since - the last call to \luafunction{push_namespaces()}. At the moment we - see no reason to do this, and since the font loader is considered - an essential part of \identifier{luatex} as well as a very well - organized piece of code, we happily concede it the right to add to - \luafunction{_G} if needed. + --[[doc-- ---doc]]-- + Here we adjust the globals created during font loader + initialization. If the second argument to + \luafunction{pop_namespaces()} is \verb|true| this will restore the + state of \luafunction{_G}, eliminating every global generated since + the last call to \luafunction{push_namespaces()}. At the moment we + see no reason to do this, and since the font loader is considered + an essential part of \identifier{luatex} as well as a very well + organized piece of code, we happily concede it the right to add to + \luafunction{_G} if needed. -pop_namespaces(our_environment, false)-- true) + --doc]]-- -logreport ("both", 1, "init", - "fontloader loaded in %0.3f seconds", os.gettimeofday()-starttime) + pop_namespaces(our_environment, false)-- true) ---[[doc-- + --[[doc-- - \subsection{Callbacks} - After the fontloader is ready we can restore the callback trap from - \identifier{luatexbase}. + \subsection{Callbacks} + After the fontloader is ready we can restore the callback trap + from \identifier{luatexbase}. ---doc]]-- + --doc]]-- -callback.register = trapped_register + callback.register = trapped_register +end --- [init_cleanup] ---[[doc-- +local init_post = function () + --- hook for actions that need to take place after the fontloader is + --- installed - We do our own callback handling with the means provided by - luatexbase. - Note: \luafunction{pre_linebreak_filter} and - \luafunction{hpack_filter} are coupled in \CONTEXT in the concept - of \emphasis{node processor}. - ---doc]]-- + --[[doc-- -luatexbase.add_to_callback("pre_linebreak_filter", - nodes.simple_font_handler, - "luaotfload.node_processor", - 1) -luatexbase.add_to_callback("hpack_filter", - nodes.simple_font_handler, - "luaotfload.node_processor", - 1) + we do our own callback handling with the means provided by + luatexbase. + note: \luafunction{pre_linebreak_filter} and + \luafunction{hpack_filter} are coupled in \context in the + concept of \emphasis{node processor}. + + --doc]]-- + + luatexbase.add_to_callback("pre_linebreak_filter", + nodes.simple_font_handler, + "luaotfload.node_processor", + 1) + luatexbase.add_to_callback("hpack_filter", + nodes.simple_font_handler, + "luaotfload.node_processor", + 1) +end --- [init_post] return { init = function () init_prepare () init_main () init_cleanup () + logreport ("both", 1, "init", + "fontloader loaded in %0.3f seconds", + os.gettimeofday()-starttime) + init_post () end } -- cgit v1.2.3 From 890a4727b8a5ee779254ed84da90f498acbe48a9 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 21 Jun 2015 00:17:17 +0200 Subject: [main, init] partition initialization into a series of routines --- src/luaotfload-init.lua | 201 ++++++++++++++++++++++++++---------------------- src/luaotfload-main.lua | 1 + 2 files changed, 111 insertions(+), 91 deletions(-) diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua index b47e3d4..c3e870d 100644 --- a/src/luaotfload-init.lua +++ b/src/luaotfload-init.lua @@ -30,37 +30,8 @@ --doc]]-- -config = config or { } -local config = config -config.luaotfload = config.luaotfload or { } - -config.lualibs = config.lualibs or { } -config.lualibs.verbose = false -config.lualibs.prefer_merged = true -config.lualibs.load_extended = true - -require "lualibs" - -if not lualibs then error("this module requires Luaotfload") end -if not luaotfload then error("this module requires Luaotfload") end - -local load_luaotfload_module = luaotfload.loaders.luaotfload -local load_fontloader_module = luaotfload.loaders.fontloader - ---[[doc-- - - The logger needs to be in place prior to loading the fontloader due - to order of initialization being crucial for the logger functions - that are swapped. - ---doc]]-- - -load_luaotfload_module "log" - -local log = luaotfload.log -local logreport = log.report - -log.set_loglevel (default_log_level) +local log --- filled in after loading the log module +local logreport --- filled in after loading the log module --[[doc-- @@ -93,16 +64,45 @@ log.set_loglevel (default_log_level) --doc]]-- -local starttime = os.gettimeofday () -local trapped_register = callback.register -callback.register = function (id) - logreport ("log", 4, "init", - "Dummy callback.register() invoked on %s.", - id) -end +local init_pre = function () ---[[doc-- + local store = { } + config = config or { } --- global + config.luaotfload = config.luaotfload or { } + config.lualibs = config.lualibs or { } + config.lualibs.verbose = false + config.lualibs.prefer_merged = true + config.lualibs.load_extended = true + + require "lualibs" + + if not lualibs then error "this module requires Luaotfload" end + if not luaotfload then error "this module requires Luaotfload" end + + --[[doc-- + + The logger needs to be in place prior to loading the fontloader due + to order of initialization being crucial for the logger functions + that are swapped. + + --doc]]-- + + luaotfload.loaders.luaotfload "log" + log = luaotfload.log + logreport = log.report + log.set_loglevel (default_log_level) + + logreport ("log", 4, "init", "Concealing callback.register().") + store.trapped_register = callback.register + + callback.register = function (id) + logreport ("log", 4, "init", + "Dummy callback.register() invoked on %s.", + id) + end + + --[[doc-- By default, the fontloader requires a number of \emphasis{private attributes} for internal use. @@ -117,23 +117,22 @@ end The attribute identifiers are prefixed “\fileent{luaotfload@}” to avoid name clashes. ---doc]]-- + --doc]]-- -do - local new_attribute = luatexbase.new_attribute - local the_attributes = luatexbase.attributes + local new_attribute = luatexbase.new_attribute + local the_attributes = luatexbase.attributes - attributes = attributes or { } + attributes = attributes or { } --- this writes a global, sorry - attributes.private = function (name) - local attr = "luaotfload@" .. name --- used to be: “otfl@” - local number = the_attributes[attr] - if not number then - number = new_attribute(attr) - end - return number - end -end + attributes.private = function (name) + local attr = "luaotfload@" .. name --- used to be: “otfl@” + local number = the_attributes[attr] + if not number then number = new_attribute(attr) end + return number + end + + return store +end --- [init_pre] --[[doc-- @@ -142,8 +141,6 @@ end --doc]]-- -local context_environment = { } - local push_namespaces = function () logreport ("log", 4, "init", "push namespace for font loader") local normalglobal = { } @@ -153,7 +150,9 @@ local push_namespaces = function () return normalglobal end -local pop_namespaces = function (normalglobal, isolate) +local pop_namespaces = function (normalglobal, + isolate, + context_environment) if normalglobal then local _G = _G local mode = "non-destructive" @@ -171,59 +170,71 @@ local pop_namespaces = function (normalglobal, isolate) _G[k] = v end -- just to be sure: - setmetatable(context_environment,_G) + setmetatable(context_environment, _G) else logreport ("both", 0, "init", "irrecoverable error during pop_namespace: no globals to restore") - os.exit() + os.exit () end end -luaotfload.context_environment = context_environment -luaotfload.push_namespaces = push_namespaces -luaotfload.pop_namespaces = pop_namespaces +local init_adapt = function () -local our_environment = push_namespaces() + luaotfload.context_environment = { } + luaotfload.push_namespaces = push_namespaces + luaotfload.pop_namespaces = pop_namespaces ---[[doc-- + local our_environment = push_namespaces () - The font loader requires that the attribute with index zero be - zero. We happily oblige. - (Cf. \fileent{luatex-fonts-nod.lua}.) + --[[doc-- ---doc]]-- + The font loader requires that the attribute with index zero be + zero. We happily oblige. + (Cf. \fileent{luatex-fonts-nod.lua}.) -tex.attribute[0] = 0 + --doc]]-- ---[[doc-- + tex.attribute[0] = 0 - Now that things are sorted out we can finally load the fontloader. + return our_environment - For less current distibutions we ship the code from TL 2014 that should be - compatible with Luatex 0.76. +end --- [init_adapt] ---doc]]-- +local init_main = function () + + local load_fontloader_module = luaotfload.loaders.fontloader + + --[[doc-- + + Now that things are sorted out we can finally load the + fontloader. -load_fontloader_module (luaotfload.fontloader_package) + For less current distibutions we ship the code from TL 2014 that + should be compatible with Luatex 0.76. + + --doc]]-- ----load_fontloader_module "font-odv.lua" --- <= Devanagari support from Context + load_fontloader_module (luaotfload.fontloader_package) -if fonts then + ---load_fontloader_module "font-odv.lua" --- <= Devanagari support from Context + + if fonts then --- The Initialization is highly idiosyncratic. if not fonts._merge_loaded_message_done_ then - logreport ("log", 5, "init", [["I am using the merged fontloader here.]]) - logreport ("log", 5, "init", [[ If you run into problems or experience unexpected]]) - logreport ("log", 5, "init", [[ behaviour, and if you have ConTeXt installed you can try]]) - logreport ("log", 5, "init", [[ to delete the file 'fontloader-fontloader.lua' as I might]]) - logreport ("log", 5, "init", [[ then use the possibly updated libraries. The merged]]) - logreport ("log", 5, "init", [[ version is not supported as it is a frozen instance.]]) - logreport ("log", 5, "init", [[ Problems can be reported to the ConTeXt mailing list."]]) + logreport ("log", 5, "init", [["I am using the merged fontloader here.]]) + logreport ("log", 5, "init", [[ If you run into problems or experience unexpected]]) + logreport ("log", 5, "init", [[ behaviour, and if you have ConTeXt installed you can try]]) + logreport ("log", 5, "init", [[ to delete the file 'fontloader-fontloader.lua' as I might]]) + logreport ("log", 5, "init", [[ then use the possibly updated libraries. The merged]]) + logreport ("log", 5, "init", [[ version is not supported as it is a frozen instance.]]) + logreport ("log", 5, "init", [[ Problems can be reported to the ConTeXt mailing list."]]) end fonts._merge_loaded_message_done_ = true -else--- the loading sequence is known to change, so this might have to + else + --- the loading sequence is known to change, so this might have to --- be updated with future updates! --- do not modify it though unless there is a change to the merged --- package! @@ -259,9 +270,11 @@ else--- the loading sequence is known to change, so this might have to load_fontloader_module "luatex-fonts-def" load_fontloader_module "luatex-fonts-ext" load_fontloader_module "luatex-fonts-cbk" -end --- non-merge fallback scope + end --- non-merge fallback scope + +end --- [init_main] -local init_cleanup = function () +local init_cleanup = function (store) --- reinstate all the stuff we had to move out of the way to --- accomodate the loader @@ -279,7 +292,9 @@ local init_cleanup = function () --doc]]-- - pop_namespaces(our_environment, false)-- true) + luaotfload.pop_namespaces (store.our_environment, + false, + luaotfload.context_environment) --[[doc-- @@ -289,7 +304,9 @@ local init_cleanup = function () --doc]]-- - callback.register = trapped_register + logreport ("log", 4, "init", + "Restoring original callback.register().") + callback.register = store.trapped_register end --- [init_cleanup] local init_post = function () @@ -318,12 +335,14 @@ end --- [init_post] return { init = function () - init_prepare () + local starttime = os.gettimeofday () + local store = init_pre () + store.our_environment = init_adapt () init_main () - init_cleanup () + init_cleanup (store) logreport ("both", 1, "init", "fontloader loaded in %0.3f seconds", - os.gettimeofday()-starttime) + os.gettimeofday() - starttime) init_post () end } diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index 6e7a971..d44d767 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -155,6 +155,7 @@ luaotfload.loaders.luaotfload = load_luaotfload_module luaotfload.loaders.fontloader = load_fontloader_module luaotfload.init = load_luaotfload_module "init" --- fontloader initialization +luaotfload.init.init () local log = luaotfload.log local logreport = log.report -- cgit v1.2.3 From e8a56b051a32ed4c468c9325048ded01002a841a Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 21 Jun 2015 00:19:32 +0200 Subject: [init] remove annyoing banner --- src/luaotfload-init.lua | 17 +---------------- src/luaotfload-main.lua | 4 ++-- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua index c3e870d..feff4cc 100644 --- a/src/luaotfload-init.lua +++ b/src/luaotfload-init.lua @@ -218,22 +218,7 @@ local init_main = function () ---load_fontloader_module "font-odv.lua" --- <= Devanagari support from Context - if fonts then - - --- The Initialization is highly idiosyncratic. - - if not fonts._merge_loaded_message_done_ then - logreport ("log", 5, "init", [["I am using the merged fontloader here.]]) - logreport ("log", 5, "init", [[ If you run into problems or experience unexpected]]) - logreport ("log", 5, "init", [[ behaviour, and if you have ConTeXt installed you can try]]) - logreport ("log", 5, "init", [[ to delete the file 'fontloader-fontloader.lua' as I might]]) - logreport ("log", 5, "init", [[ then use the possibly updated libraries. The merged]]) - logreport ("log", 5, "init", [[ version is not supported as it is a frozen instance.]]) - logreport ("log", 5, "init", [[ Problems can be reported to the ConTeXt mailing list."]]) - end - fonts._merge_loaded_message_done_ = true - - else + if not fonts then --- the loading sequence is known to change, so this might have to --- be updated with future updates! --- do not modify it though unless there is a change to the merged diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index d44d767..e8f05d6 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -20,8 +20,8 @@ luaotfload.log = luaotfload.log or { } luaotfload.version = "2.6" luaotfload.loaders = { } luaotfload.min_luatex_version = 79 --- i. e. 0.79 -----------.fontloader_package = "fontloader" --- default: from current Context -luaotfload.fontloader_package = "slim" +luaotfload.fontloader_package = "fontloader" --- default: from current Context +----------.fontloader_package = "slim" local authors = "\z -- cgit v1.2.3