summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luaotfload/luaotfload-main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/generic/luaotfload/luaotfload-main.lua')
-rw-r--r--macros/luatex/generic/luaotfload/luaotfload-main.lua51
1 files changed, 31 insertions, 20 deletions
diff --git a/macros/luatex/generic/luaotfload/luaotfload-main.lua b/macros/luatex/generic/luaotfload/luaotfload-main.lua
index 65fdc9fc00..35378d91cb 100644
--- a/macros/luatex/generic/luaotfload/luaotfload-main.lua
+++ b/macros/luatex/generic/luaotfload/luaotfload-main.lua
@@ -20,8 +20,8 @@ local authors = "\z
-- version number is used below!
local ProvidesLuaModule = {
name = "luaotfload-main",
- version = "3.11", --TAGVERSION
- date = "2019-11-10", --TAGDATE
+ version = "3.12", --TAGVERSION
+ date = "2020-02-02", --TAGDATE
description = "luaotfload entry point",
author = authors,
copyright = authors,
@@ -44,25 +44,35 @@ luaotfload.fontloader_package = "reference" --- default: from current Con
if not tex or not tex.luatexversion then
error "this program must be run in TeX mode" --- or call tex.initialize() =)
-else
- --- version check
- local major = tex.luatexversion / 100
- local minor = tex.luatexversion % 100
- local revision = tex.luatexrevision --[[ : string ]]
- local revno = tonumber (revision)
- local minimum = luaotfload.min_luatex_version
- local actual = { major, minor, revno or 0 }
- if actual [1] < minimum [1]
+end
+
+--- version check
+local major = tex.luatexversion / 100
+local minor = tex.luatexversion % 100
+local revision = tex.luatexrevision --[[ : string ]]
+local revno = tonumber (revision)
+local minimum = luaotfload.min_luatex_version
+local actual = { major, minor, revno or 0 }
+if actual [1] < minimum [1]
or actual == minimum and actual [2] < minimum [2]
or actual == minimum and actual [2] == minimum [2] and actual [3] < minimum [3]
- then
- texio.write_nl ("term and log",
- string.format ("\tFATAL ERROR\n\z
- \tLuaotfload requires a Luatex version >= %d.%d.%d.\n\z
- \tPlease update your TeX distribution!\n\n",
- (unpack or table.unpack) (minimum)))
- error "version check failed"
- end
+then
+ texio.write_nl ("term and log",
+ string.format ("\tFATAL ERROR\n\z
+ \tLuaotfload requires a Luatex version >= %d.%d.%d.\n\z
+ \tPlease update your TeX distribution!\n\n",
+ (unpack or table.unpack) (minimum)))
+ error "version check failed"
+end
+
+if not utf8 then
+ texio.write_nl("term and log", string.format("\z
+ \tluaotfload: module utf8 is unavailable\n\z
+ \tutf8 is available in Lua 5.3+; engine\'s _VERSION is '%s'\n\z
+ \tThis probably means that the engine is not supported\n\z
+ \n",
+ _VERSION))
+ error "module utf8 is unavailable"
end
if status.safer_option ~= 0 then
@@ -316,12 +326,13 @@ luaotfload.main = function ()
loadmodule "harf-plug"
end
initialize "auxiliary" --- additional high-level functionality
+ loadmodule "fallback" --- ...
loadmodule "multiscript" --- ...
loadmodule "tounicode"
luaotfload.aux.start_rewrite_fontname () --- to be migrated to fontspec
- logreport ("both", 0, "main",
+ logreport ("log", 1, "main",
"initialization completed in %0.3f seconds\n",
osgettimeofday() - starttime)
----inspect (timing_info)