diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-02-05 20:37:42 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-02-05 20:37:42 +0200 |
commit | f3d46d2fde7530e5d471dd68c8e66e5351409c2a (patch) | |
tree | eb451ed42e76726a396e4acdb04d701b079480fb /otfl-node-res.lua | |
parent | 5f13ffbbe173666a6831ee9d5c300c83703c2fe8 (diff) | |
download | luaotfload-f3d46d2fde7530e5d471dd68c8e66e5351409c2a.tar.gz |
Updating to latest ConTeXt beta (2010.02.03)
Diffstat (limited to 'otfl-node-res.lua')
-rw-r--r-- | otfl-node-res.lua | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/otfl-node-res.lua b/otfl-node-res.lua index 49a1297..5398d84 100644 --- a/otfl-node-res.lua +++ b/otfl-node-res.lua @@ -16,7 +16,14 @@ for debugging <l n='luatex'/> node management.</p> nodes = nodes or { } +nodes.whatsits = { } -- table.swapped(node.whatsits()) + local reserved = { } +local whatsits = nodes.whatsits + +for k, v in pairs(node.whatsits()) do + whatsits[k], whatsits[v] = v, k -- two way +end function nodes.register(n) reserved[#reserved+1] = n @@ -57,13 +64,13 @@ local penalty = nodes.register(new_node("penalty")) local glue = nodes.register(new_node("glue")) local glue_spec = nodes.register(new_node("glue_spec")) local glyph = nodes.register(new_node("glyph",0)) -local textdir = nodes.register(new_node("whatsit",7)) +local textdir = nodes.register(new_node("whatsit",whatsits.dir)) -- 7 local rule = nodes.register(new_node("rule")) -local latelua = nodes.register(new_node("whatsit",35)) -local user_n = nodes.register(new_node("whatsit",44)) user_n.type = 100 -local user_l = nodes.register(new_node("whatsit",44)) user_l.type = 110 -local user_s = nodes.register(new_node("whatsit",44)) user_s.type = 115 -local user_t = nodes.register(new_node("whatsit",44)) user_t.type = 116 +local latelua = nodes.register(new_node("whatsit",whatsits.late_lua)) -- 35 +local user_n = nodes.register(new_node("whatsit",whatsits.user_defined)) user_n.type = 100 -- 44 +local user_l = nodes.register(new_node("whatsit",whatsits.user_defined)) user_l.type = 110 -- 44 +local user_s = nodes.register(new_node("whatsit",whatsits.user_defined)) user_s.type = 115 -- 44 +local user_t = nodes.register(new_node("whatsit",whatsits.user_defined)) user_t.type = 116 -- 44 function nodes.glyph(fnt,chr) local n = copy_node(glyph) |