summaryrefslogtreecommitdiff
path: root/src/luaotfload-main.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2015-03-18 08:08:59 +0100
committerPhilipp Gesang <phg42.2a@gmail.com>2015-03-18 08:08:59 +0100
commitc4c4901173b0f4284534db1b6a3cfe865b05e15c (patch)
treef27d1546977bae78b33180192cc80eecc568bf4c /src/luaotfload-main.lua
parentb966e35c9df3cca2a25baaf68574d0b8d94eef39 (diff)
parentf5dd1ec3517cda47e5a48221d4ff5cfced12ea06 (diff)
downloadluaotfload-c4c4901173b0f4284534db1b6a3cfe865b05e15c.tar.gz
Merge pull request #266 from phi-gamma/master
fontloader fallback
Diffstat (limited to 'src/luaotfload-main.lua')
-rw-r--r--src/luaotfload-main.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua
index a090cce..ee8966c 100644
--- a/src/luaotfload-main.lua
+++ b/src/luaotfload-main.lua
@@ -4,7 +4,7 @@
-- REQUIREMENTS: luatex v.0.79 or later; packages lualibs, luatexbase
-- AUTHOR: Élie Roux, Khaled Hosny, Philipp Gesang
-- VERSION: same as Luaotfload
--- MODIFIED: 2014-08-08 23:14:37+0200
+-- MODIFIED: 2015-03-11 07:49:20+0100
-----------------------------------------------------------------------
--
--- Note:
@@ -101,12 +101,15 @@ luaotfload.log.tex = {
--doc]]--
-local min_luatex_version = 79
+local min_luatex_version = 79 --- i. e. 0.79
+local fontloader_package = "fontloader" --- default: from current Context
if tex.luatexversion < min_luatex_version then
warning ("LuaTeX v%.2f is old, v%.2f or later is recommended.",
tex.luatexversion / 100,
min_luatex_version / 100)
+ warning ("using fallback fontloader -- newer functionality not available")
+ fontloader_package = "tl2014" --- TODO fallback should be configurable too
--- we install a fallback for older versions as a safety
if not node.end_of_math then
local math_t = node.id "math"
@@ -306,9 +309,13 @@ tex.attribute[0] = 0
Now that things are sorted out we can finally load the fontloader.
+ For less current distibutions we ship the code from TL 2014 that should be
+ compatible with Luatex 0.76.
+
--doc]]--
-load_fontloader_module "fontloader"
+load_fontloader_module (fontloader_package)
+
---load_fontloader_module "font-odv.lua" --- <= Devanagari support from Context
if fonts then