[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Use separate module function (e1af804)
Marcel Fabian Krüger
tex at 2krueger.de
Sat Sep 5 03:33:50 CEST 2020
Repository : https://github.com/latex3/luaotfload
On branch : dev
Link : https://github.com/latex3/luaotfload/commit/e1af804d3a880f47c130f3825827574f19859bb0
>---------------------------------------------------------------
commit e1af804d3a880f47c130f3825827574f19859bb0
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Sat Sep 5 01:44:45 2020 +0200
Use separate module function
>---------------------------------------------------------------
e1af804d3a880f47c130f3825827574f19859bb0
src/auto/luaotfload-glyphlist.lua | 2 +-
src/luaotfload-auxiliary.lua | 7 +------
src/luaotfload-colors.lua | 7 +------
src/luaotfload-configuration.lua | 6 +-----
src/luaotfload-database.lua | 6 +-----
src/luaotfload-diagnostics.lua | 7 +------
src/luaotfload-dvi.lua | 6 +-----
src/luaotfload-embolden.lua | 6 +-----
src/luaotfload-fallback.lua | 6 +-----
src/luaotfload-features.lua | 7 +------
src/luaotfload-filelist.lua | 8 +-------
src/luaotfload-harf-define.lua | 6 +-----
src/luaotfload-harf-plug.lua | 6 +-----
src/luaotfload-init.lua | 6 +-----
src/luaotfload-letterspace.lua | 6 +-----
src/luaotfload-loaders.lua | 6 +-----
src/luaotfload-log.lua | 7 +------
src/luaotfload-multiscript.lua | 6 +-----
src/luaotfload-notdef.lua | 6 +-----
src/luaotfload-parsers.lua | 7 +------
src/luaotfload-resolvers.lua | 7 +------
src/luaotfload-scripts.lua | 6 +-----
src/luaotfload-suppress.lua | 6 +-----
src/luaotfload-szss.lua | 6 +-----
src/luaotfload-tool.lua | 4 +---
src/luaotfload-tounicode.lua | 6 +-----
src/luaotfload-unicode.lua | 6 +-----
src/luaotfload.lua | 16 ++++++++++++++--
28 files changed, 41 insertions(+), 140 deletions(-)
diff --git a/src/auto/luaotfload-glyphlist.lua b/src/auto/luaotfload-glyphlist.lua
index 001a1ac..41949db 100644
--- a/src/auto/luaotfload-glyphlist.lua
+++ b/src/auto/luaotfload-glyphlist.lua
@@ -1,4 +1,4 @@
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-glyphlist",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
diff --git a/src/luaotfload-auxiliary.lua b/src/luaotfload-auxiliary.lua
index 5fbda1f..fd2a6fc 100644
--- a/src/luaotfload-auxiliary.lua
+++ b/src/luaotfload-auxiliary.lua
@@ -4,7 +4,7 @@
-- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-auxiliary",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,11 +12,6 @@ local ProvidesLuaModule = {
license = "GPL v2.0"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
-
luaotfload = luaotfload or { }
local log = luaotfload.log
local logreport = log.report
diff --git a/src/luaotfload-colors.lua b/src/luaotfload-colors.lua
index 47ffca4..d91c903 100644
--- a/src/luaotfload-colors.lua
+++ b/src/luaotfload-colors.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / font colors
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-colors",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -13,11 +13,6 @@ local ProvidesLuaModule = {
copyright = "Luaotfload Development Team"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
-
--[[doc--
buggy coloring with the pre_output_filter when expansion is enabled
diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua
index 04c2c11..8344e3a 100644
--- a/src/luaotfload-configuration.lua
+++ b/src/luaotfload-configuration.lua
@@ -5,7 +5,7 @@
-- AUTHOR: Dohyun Kim <nomosnomos at gmail.com>
-------------------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-configuration",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -13,10 +13,6 @@ local ProvidesLuaModule = {
license = "GPL v2.0"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
------------------------------
local status_file = "luaotfload-status"
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index d6c0451..015b10c 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / luaotfload-tool / font database
-----------------------------------------------------------------------
do -- block to avoid to many local variables error
- local ProvidesLuaModule = {
+ assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-database",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ do -- block to avoid to many local variables error
author = "Khaled Hosny, Elie Roux, Philipp Gesang, Marcel Krüger",
copyright = "Luaotfload Development Team",
}
-
- if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
- end
end
--[[doc--
diff --git a/src/luaotfload-diagnostics.lua b/src/luaotfload-diagnostics.lua
index a8102f2..88a71b4 100644
--- a/src/luaotfload-diagnostics.lua
+++ b/src/luaotfload-diagnostics.lua
@@ -5,7 +5,7 @@
-- AUTHOR: Philipp Gesang <phg at phi-gamma.net>
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-diagnostics",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -13,11 +13,6 @@ local ProvidesLuaModule = {
license = "GPL v2.0"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
-
local names = fonts.names
local kpse = require "kpse"
diff --git a/src/luaotfload-dvi.lua b/src/luaotfload-dvi.lua
index 0900c33..23b2199 100644
--- a/src/luaotfload-dvi.lua
+++ b/src/luaotfload-dvi.lua
@@ -4,7 +4,7 @@
-------------------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-dvi",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -14,10 +14,6 @@ local ProvidesLuaModule = {
copyright = "Luaotfload Development Team",
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local getfont = font.getfont
local setfont = node.direct.setfont
local getdisc = node.direct.getdisc
diff --git a/src/luaotfload-embolden.lua b/src/luaotfload-embolden.lua
index 7e304e3..9d24b31 100644
--- a/src/luaotfload-embolden.lua
+++ b/src/luaotfload-embolden.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / embolden
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-embolden",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ local ProvidesLuaModule = {
author = "Marcel Krüger"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local otffeatures = fonts.constructors.newfeatures "otf"
local function enableembolden(tfmdata, _, embolden)
diff --git a/src/luaotfload-fallback.lua b/src/luaotfload-fallback.lua
index 42285cc..5760c00 100644
--- a/src/luaotfload-fallback.lua
+++ b/src/luaotfload-fallback.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / fallback
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-fallback",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ local ProvidesLuaModule = {
author = "Marcel Krüger"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local nodenew = node.direct.new
local getfont = font.getfont
local setfont = node.direct.setfont
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 633396c..aaf11f2 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / font features
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-features",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -13,11 +13,6 @@ local ProvidesLuaModule = {
copyright = "PRAGMA ADE / ConTeXt Development Team",
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
-
local type = type
local next = next
local tonumber = tonumber
diff --git a/src/luaotfload-filelist.lua b/src/luaotfload-filelist.lua
index be6403e..4693678 100644
--- a/src/luaotfload-filelist.lua
+++ b/src/luaotfload-filelist.lua
@@ -4,7 +4,7 @@
-- AUTHOR: Ulrike Fischer, <fischer at troubleshooting-tex.de>
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-filelist",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,12 +12,6 @@ local ProvidesLuaModule = {
license = "GPL v2.0"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
-
-
--[[doc--
luaotfload has tables with files list in many places: In the import scripts,
diff --git a/src/luaotfload-harf-define.lua b/src/luaotfload-harf-define.lua
index b7eb192..233f7c5 100644
--- a/src/luaotfload-harf-define.lua
+++ b/src/luaotfload-harf-define.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / HarfBuzz / font definition
-----------------------------------------------------------------------
do -- block to avoid to many local variables error
- local ProvidesLuaModule = {
+ assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-harf-define",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ do -- block to avoid to many local variables error
author = "Khaled Hosny, Marcel Krüger",
copyright = "Luaotfload Development Team",
}
-
- if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
- end
end
local unpack = string.unpack
diff --git a/src/luaotfload-harf-plug.lua b/src/luaotfload-harf-plug.lua
index 3bffe84..035976f 100644
--- a/src/luaotfload-harf-plug.lua
+++ b/src/luaotfload-harf-plug.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / HarfBuzz / fontloader plugin
-----------------------------------------------------------------------
do -- block to avoid to many local variables error
- local ProvidesLuaModule = {
+ assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-harf-plug",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ do -- block to avoid to many local variables error
author = "Khaled Hosny, Marcel Krüger",
copyright = "Luaotfload Development Team",
}
-
- if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
- end
end
local hb = luaotfload.harfbuzz
diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua
index 772b318..0584c51 100644
--- a/src/luaotfload-init.lua
+++ b/src/luaotfload-init.lua
@@ -5,17 +5,13 @@
-- AUTHOR: Philipp Gesang (Phg), <phg at phi-gamma.net>, Marcel Krüger
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-init",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
description = "luaotfload submodule / initialization",
license = "GPL v2.0"
}
-
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-----------------------------------------------------------------------
diff --git a/src/luaotfload-letterspace.lua b/src/luaotfload-letterspace.lua
index 1e36bbb..bf57486 100644
--- a/src/luaotfload-letterspace.lua
+++ b/src/luaotfload-letterspace.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / letterspacing
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-letterspace",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -13,10 +13,6 @@ local ProvidesLuaModule = {
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL; adapted by Philipp Gesang, Ulrike Fischer, Marcel Krüger"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
--- This code diverged quite a bit from its origin in Context. Please
--- do *not* report bugs on the Context list.
diff --git a/src/luaotfload-loaders.lua b/src/luaotfload-loaders.lua
index fb52b23..febb0c0 100644
--- a/src/luaotfload-loaders.lua
+++ b/src/luaotfload-loaders.lua
@@ -6,17 +6,13 @@
-- AUTHOR: Hans Hagen, Khaled Hosny, Elie Roux, David Carlisle
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-loaders",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
description = "luaotfload submodule / callback handling",
license = "GPL v2.0"
}
-
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-----------------------------------------------------------------------
diff --git a/src/luaotfload-log.lua b/src/luaotfload-log.lua
index 7dd4784..727af86 100644
--- a/src/luaotfload-log.lua
+++ b/src/luaotfload-log.lua
@@ -4,7 +4,7 @@
-------------------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-log",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -14,11 +14,6 @@ local ProvidesLuaModule = {
copyright = "Luaotfload Development Team",
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
-
--[[doc--
The logging system is slow in general, as we always have the function
call overhead even if we aren’t going to output anything. On the other
diff --git a/src/luaotfload-multiscript.lua b/src/luaotfload-multiscript.lua
index 392a572..3661783 100644
--- a/src/luaotfload-multiscript.lua
+++ b/src/luaotfload-multiscript.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / multiscript
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-multiscript",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ local ProvidesLuaModule = {
author = "Marcel Krüger"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local nodenew = node.direct.new
local getfont = font.getfont
local setfont = node.direct.setfont
diff --git a/src/luaotfload-notdef.lua b/src/luaotfload-notdef.lua
index 390d8fe..f75731e 100644
--- a/src/luaotfload-notdef.lua
+++ b/src/luaotfload-notdef.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / notdef
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-notdef",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ local ProvidesLuaModule = {
author = "Marcel Krüger"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local harfbuzz = luaotfload.harfbuzz
local flush_node = node.direct.flush_node
local getfont = font.getfont
diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua
index c42f114..be963bf 100644
--- a/src/luaotfload-parsers.lua
+++ b/src/luaotfload-parsers.lua
@@ -5,7 +5,7 @@
-- AUTHOR: Philipp Gesang (Phg), <phg at phi-gamma.net>, Marcel Krüger
-------------------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-parsers",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -13,11 +13,6 @@ local ProvidesLuaModule = {
license = "GPL v2.0"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
-
local traversal_maxdepth = 42 --- prevent stack overflows
local rawset = rawset
diff --git a/src/luaotfload-resolvers.lua b/src/luaotfload-resolvers.lua
index d60404e..5190ac9 100644
--- a/src/luaotfload-resolvers.lua
+++ b/src/luaotfload-resolvers.lua
@@ -9,7 +9,7 @@
--- The bare fontloader uses a set of simplistic file name resolvers
--- that must be overloaded by the user (i. e. us).
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-resolvers",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -17,11 +17,6 @@ local ProvidesLuaModule = {
license = "GPL v2.0"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
-
if not lualibs then error "this module requires Luaotfload" end
if not luaotfload then error "this module requires Luaotfload" end
diff --git a/src/luaotfload-scripts.lua b/src/luaotfload-scripts.lua
index d48503e..5a67f37 100644
--- a/src/luaotfload-scripts.lua
+++ b/src/luaotfload-scripts.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / script
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-script",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ local ProvidesLuaModule = {
author = "Marcel Krüger"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local canonical_name = {
dflt = "DFLT",
hira = "kana",
diff --git a/src/luaotfload-suppress.lua b/src/luaotfload-suppress.lua
index 7e7b031..b255b4a 100644
--- a/src/luaotfload-suppress.lua
+++ b/src/luaotfload-suppress.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / suppress
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-suppress",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ local ProvidesLuaModule = {
author = "Marcel Krüger"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local direct = node.direct
local otfregister = fonts.constructors.features.otf.register
diff --git a/src/luaotfload-szss.lua b/src/luaotfload-szss.lua
index aac3bd0..b96e335 100644
--- a/src/luaotfload-szss.lua
+++ b/src/luaotfload-szss.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / szss
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-szss",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ local ProvidesLuaModule = {
author = "Marcel Krüger"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local direct = node.direct
local otfregister = fonts.constructors.features.otf.register
diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua
index 7055251..aee52c8 100644
--- a/src/luaotfload-tool.lua
+++ b/src/luaotfload-tool.lua
@@ -15,9 +15,7 @@ local ProvidesLuaModule = {
license = "GPL v2.0"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
+function luaotfload_module(module) end -- We don't log module loading here
luaotfload = luaotfload or { }
diff --git a/src/luaotfload-tounicode.lua b/src/luaotfload-tounicode.lua
index 3e647e0..5f8c778 100644
--- a/src/luaotfload-tounicode.lua
+++ b/src/luaotfload-tounicode.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / tounicode overwrites
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-tounicode",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -13,10 +13,6 @@ local ProvidesLuaModule = {
copyright = "PRAGMA ADE / ConTeXt Development Team",
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local overloads = {
-- rougly based on texglyphlist-g2u.txt
diff --git a/src/luaotfload-unicode.lua b/src/luaotfload-unicode.lua
index 90e134a..c0761f5 100644
--- a/src/luaotfload-unicode.lua
+++ b/src/luaotfload-unicode.lua
@@ -3,7 +3,7 @@
-- DESCRIPTION: part of luaotfload / unicode
-----------------------------------------------------------------------
-local ProvidesLuaModule = {
+assert(luaotfload_module, "This is a part of luaotfload and should not be loaded independently") {
name = "luaotfload-unicode",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
@@ -12,10 +12,6 @@ local ProvidesLuaModule = {
author = "Marcel Krüger"
}
-if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
-end
-
local utf8codes = utf8.codes
local utf8char = utf8.char
local sub = string.sub
diff --git a/src/luaotfload.lua b/src/luaotfload.lua
index 0213ff3..df4de47 100644
--- a/src/luaotfload.lua
+++ b/src/luaotfload.lua
@@ -22,14 +22,25 @@ local ProvidesLuaModule = {
name = "luaotfload",
version = "3.16-dev", --TAGVERSION
date = "2020-09-03", --TAGDATE
- description = "luaotfload entry point",
+ description = "Lua based OpenType font support",
author = authors,
copyright = authors,
license = "GPL v2.0"
}
if luatexbase and luatexbase.provides_module then
- luatexbase.provides_module (ProvidesLuaModule)
+ luatexbase.provides_module (ProvidesLuaModule)
+end
+
+if luaotfload_module == nil then
+ local saved_version = ProvidesLuaModule.version
+ function luaotfload_module(module)
+ if luatexbase and luatexbase.provides_module then
+ luatexbase.provides_module (module)
+ end
+ end
+else
+ error[[luaotfload is reloading itself nested. This can't happen.]]
end
local osgettimeofday = os.gettimeofday
@@ -336,6 +347,7 @@ luaotfload.main = function ()
"initialization completed in %0.3f seconds\n",
osgettimeofday() - starttime)
----inspect (timing_info)
+ luaotfload_module = nil
end
-- vim:tw=79:sw=4:ts=4:et
More information about the latex3-commits
mailing list.