summaryrefslogtreecommitdiff
path: root/luaotfload-legacy-attributes.lua
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-05-12 01:48:25 -0700
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-05-12 01:48:25 -0700
commitf3c5f3f498afae003d3981a2c1c67dd90ddc0375 (patch)
tree31ffb7c42a1f79562cb3272c4a29f3dfe86e6111 /luaotfload-legacy-attributes.lua
parent3548b2bd61510b5688bcf8aaad64662edd92f860 (diff)
parentd8a8649ca9e2f25b028141e7d49e38a2840eb086 (diff)
downloadluaotfload-f3c5f3f498afae003d3981a2c1c67dd90ddc0375.tar.gz
Merge pull request #64 from phi-gamma/master
brute force compatibility with older Luatex
Diffstat (limited to 'luaotfload-legacy-attributes.lua')
-rw-r--r--luaotfload-legacy-attributes.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/luaotfload-legacy-attributes.lua b/luaotfload-legacy-attributes.lua
new file mode 100644
index 0000000..c6130b4
--- /dev/null
+++ b/luaotfload-legacy-attributes.lua
@@ -0,0 +1,27 @@
+-----------------------------------------------------------------------
+-- FILE: otfl-luat-att.lua
+-- USAGE: with old luaotfload
+-- DESCRIPTION: setting attributes abide luatexbase rules
+-- REQUIREMENTS: some old luatex
+-- AUTHOR: Philipp Gesang (Phg), <phg42.2a@gmail.com>
+-- CREATED: 2013-05-10 20:37:19+0200
+-----------------------------------------------------------------------
+--
+
+if not modules then modules = { } end modules ['otfl-luat-att'] = {
+ version = math.pi/42,
+ comment = "companion to luaotfload.lua",
+ author = "Philipp Gesang",
+ copyright = "Luaotfload Development Team",
+ license = "GNU GPL v2"
+}
+
+function attributes.private(name)
+ local attr = "otfl@" .. name
+ local number = luatexbase.attributes[attr]
+ if not number then
+ number = luatexbase.new_attribute(attr)
+ end
+ return number
+end
+