diff options
-rw-r--r-- | src/luaotfload-init.lua | 38 | ||||
-rw-r--r-- | src/luaotfload-main.lua | 62 |
2 files changed, 74 insertions, 26 deletions
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), <phg@phi-gamma.net> +-- 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 + + + diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index e6bb782..b12e3b7 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -1,10 +1,10 @@ ----------------------------------------------------------------------- -- FILE: luaotfload-main.lua --- DESCRIPTION: Luatex fontloader initialization +-- DESCRIPTION: Luaotfload initialization -- REQUIREMENTS: luatex v.0.80 or later; packages lualibs, luatexbase -- AUTHOR: Élie Roux, Khaled Hosny, Philipp Gesang -- VERSION: same as Luaotfload --- MODIFIED: 2015-03-29 12:41:09+0200 +-- MODIFIED: 2015-05-26 07:51:29+0200 ----------------------------------------------------------------------- -- --- Note: @@ -13,15 +13,35 @@ --- version 2.4 to 2.5. Thus, the comments are still in TeX (Latex) --- markup. -if not modules then modules = { } end modules ["luaotfload-main"] = { - version = "2.6", - comment = "fontloader initialization", - author = "Hans Hagen, Khaled Hosny, Elie Roux, Philipp Gesang", - copyright = "PRAGMA ADE / ConTeXt Development Team", - license = "GNU General Public License v. 2.0" -} +local initial_log_level = 0 + +luaotfload = luaotfload or { } +local luaotfload = luaotfload +luaotfload.log = luaotfload.log or { } +luaotfload.version = "2.6" +luaotfload.loaders = { } + +local authors = "\z + Hans Hagen,\z + Khaled Hosny,\z + Elie Roux,\z + Will Robertson,\z + Philipp Gesang,\z + Dohyun Kim,\z + Reuben Thomas\z +" +luaotfload.module = { + name = "luaotfload-main", + version = 2.60001, + date = "2015/05/26", + description = "OpenType layout system.", + author = authors, + copyright = authors, + license = "GPL v2.0" +} + --[[doc-- This file initializes the system and loads the font loader. To @@ -43,23 +63,6 @@ if not modules then modules = { } end modules ["luaotfload-main"] = { --doc]]-- -local initial_log_level = 0 - -luaotfload = luaotfload or { } -local luaotfload = luaotfload -luaotfload.log = luaotfload.log or { } -luaotfload.version = "2.6" -- FIXME version belongs in common init - -luaotfload.module = { - name = "luaotfload-main", - version = 2.60000, - date = "2015/03/29", - description = "OpenType layout system.", - author = "Elie Roux & Hans Hagen", - copyright = "Elie Roux", - license = "GPL v2.0" -} - local luatexbase = luatexbase local setmetatable = setmetatable @@ -89,6 +92,8 @@ luaotfload.log.tex = { --[[doc-- + XXX remove + We set the minimum version requirement for \LUATEX to v0.76, because the font loader requires recent features like direct attribute indexing and \luafunction{node.end_of_math()} that aren’t @@ -140,6 +145,9 @@ local load_luaotfload_module = make_loader "luaotfload" ----- load_luaotfload_module = make_loader "luatex" --=> for Luatex-Plain local load_fontloader_module = make_loader "fontloader" +luaotfload.loaders.luaotfload = load_luaotfload_module +luaotfload.loaders.fontloader = load_fontloader_module + load_luaotfload_module "log" --- log messages local log = luaotfload.log @@ -149,6 +157,8 @@ log.set_loglevel (default_log_level) --[[doc-- + XXX remove + Before \TeX Live 2013 version, \LUATEX had a bug that made ofm fonts fail when called with their extension. There was a side-effect making ofm totally unloadable when luaotfload was present. The following |