summaryrefslogtreecommitdiff
path: root/luaotfload-legacy-attributes.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-11 16:14:36 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-11 16:14:36 +0200
commit3da43df46bb3ddc265ddedcf6bbb732d788ab269 (patch)
tree4c836735fb8e2c7d7c0d7a61521a4a2b60cb8680 /luaotfload-legacy-attributes.lua
parent0004b213f99a77411c03811e3324c9a1e934e31a (diff)
parent78b43966b0e7f28137d971b3f6921beca473e966 (diff)
downloadluaotfload-3da43df46bb3ddc265ddedcf6bbb732d788ab269.tar.gz
Merge ../luaotfload-compat
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
+