From c79bb2abad019324e8a1701c0310e09867cf1c1b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 10 May 2013 21:11:34 +0200 Subject: import legacy files --- luaotfload-legacy-attributes.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 luaotfload-legacy-attributes.lua (limited to 'luaotfload-legacy-attributes.lua') 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), +-- 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 + -- cgit v1.2.3