From 0a03da95e41ed2e4e1082ebde9f20461aa6b1842 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 26 May 2015 08:12:01 +0200 Subject: [init] prepare fontloader initialization component --- src/luaotfload-init.lua | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/luaotfload-init.lua (limited to 'src/luaotfload-init.lua') diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua new file mode 100644 index 0000000..034ec57 --- /dev/null +++ b/src/luaotfload-init.lua @@ -0,0 +1,38 @@ +#!/usr/bin/env texlua +----------------------------------------------------------------------- +-- FILE: luaotfload-init.lua +-- DESCRIPTION: Luaotfload font loader initialization +-- REQUIREMENTS: luatex v.0.80 or later; packages lualibs, luatexbase +-- AUTHOR: Philipp Gesang (Phg), +-- VERSION: 1.0 +-- CREATED: 2015-05-26 07:50:54+0200 +----------------------------------------------------------------------- +-- + +--[[doc-- + + Initialization phases: + + - Load Lualibs from package + - Load Fontloader + - as package specified in configuration + - from Context install + - (optional: from raw unpackaged files distributed with + Luaotfload) + + The initialization of the Lualibs may be made configurable in the + future as well allowing to load both the files and the merged package + depending on a configuration setting. However, this would require + separating out the configuration parser into a self-contained + package, which might be problematic due to its current dependency on + the Lualibs itself. + +--doc]]-- + +if not luaotfload then error("this module requires Luaotfload") end + +local load_luaotfload_module = luaotfload.loaders.luaotfload +local load_fontloader_module = luaotfload.loaders.fontloader + + + -- cgit v1.2.3 From 431c25a1200c7d0e8b7fe55173357d29f7247975 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 9 Jun 2015 23:36:37 +0200 Subject: [main,init] separate loading of fontloader and lualibs packages --- src/luaotfload-init.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/luaotfload-init.lua') diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua index 034ec57..4968877 100644 --- a/src/luaotfload-init.lua +++ b/src/luaotfload-init.lua @@ -14,6 +14,7 @@ Initialization phases: - Load Lualibs from package + - Set up the logger routines - Load Fontloader - as package specified in configuration - from Context install @@ -29,10 +30,30 @@ --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" -- cgit v1.2.3