summaryrefslogtreecommitdiff
path: root/src/luaotfload-main.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-09-27 18:50:22 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2015-09-27 18:50:22 +0200
commit145203842d83591fc9e67322472994c481d5aadc (patch)
tree8e603deceff8f4aa944c1b4228c969aed96457e6 /src/luaotfload-main.lua
parent974d9c6a280e42d01eb4a7c810900f9b4855e919 (diff)
downloadluaotfload-145203842d83591fc9e67322472994c481d5aadc.tar.gz
[main] move toplevel statements into init routine
Diffstat (limited to 'src/luaotfload-main.lua')
-rw-r--r--src/luaotfload-main.lua17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua
index 73f9a75..9e57dbf 100644
--- a/src/luaotfload-main.lua
+++ b/src/luaotfload-main.lua
@@ -139,26 +139,21 @@ local load_fontloader_module = make_loader "fontloader"
luaotfload.loaders.luaotfload = load_luaotfload_module
luaotfload.loaders.fontloader = load_fontloader_module
-luaotfload.init = load_luaotfload_module "init" --- fontloader initialization
-
-local store = luaotfload.init.early ()
-local log = luaotfload.log
-local logreport = log.report
-
--[[doc--
Now we load the modules written for \identifier{luaotfload}.
--doc]]--
-luaotfload.init.main (store)
-
luaotfload.main = function ()
local starttime = os.gettimeofday ()
+ local init = load_luaotfload_module "init" --- fontloader initialization
+ local store = init.early () --- injects the log module too
+ local logreport = luaotfload.log.report
local tmp = load_luaotfload_module "parsers" --- fonts.conf and syntax
if not tmp.init () then
- logreport ("log", 0, "load", "Failed to install the parsers.")
+ logreport ("log", 0, "load", "Failed to install the parsers module.")
end
local tmp = load_luaotfload_module "configuration" --- configuration options
@@ -166,6 +161,10 @@ luaotfload.main = function ()
logreport ("log", 0, "load", "Configuration unsuccessful.")
end
+ if not init.main (store) then
+ logreport ("log", 0, "load", "Main fontloader initialization failed.")
+ end
+
luaotfload.loaders = load_luaotfload_module "loaders" --- Font loading; callbacks
if not luaotfload.loaders.install () then
logreport ("log", 0, "load", "Callback and loader initialization failed.")