summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-basics-nod.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-01-22 00:51:55 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2016-01-22 00:51:55 +0100
commit7b982d37f58b36e8d8dd2580893e89430c576ca9 (patch)
treef3f5944bace136a2c878c82fd2bc882fc9a5ce42 /src/fontloader/misc/fontloader-basics-nod.lua
parent07cc29d8658360e9e6ddecf7f251e518b9ea99c9 (diff)
parent55799dad5b8a2716aea1cfee28b4ce093e587f8a (diff)
downloadluaotfload-7b982d37f58b36e8d8dd2580893e89430c576ca9.tar.gz
Merge pull request #320 from phi-gamma/master
fixes
Diffstat (limited to 'src/fontloader/misc/fontloader-basics-nod.lua')
-rw-r--r--src/fontloader/misc/fontloader-basics-nod.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/fontloader/misc/fontloader-basics-nod.lua b/src/fontloader/misc/fontloader-basics-nod.lua
index 78f1b17..95a1744 100644
--- a/src/fontloader/misc/fontloader-basics-nod.lua
+++ b/src/fontloader/misc/fontloader-basics-nod.lua
@@ -51,15 +51,11 @@ nodes = { }
nodes.pool = { }
nodes.handlers = { }
-local nodecodes = { }
+local nodecodes = { } for k,v in next, node.types () do nodecodes[string.gsub(v,"_","")] = k end
+local whatcodes = { } for k,v in next, node.whatsits() do whatcodes[string.gsub(v,"_","")] = k end
local glyphcodes = node.subtypes("glyph")
local disccodes = node.subtypes("disc")
-for k, v in next, node.types() do
- v = string.gsub(v,"_","")
- nodecodes[k] = v
- nodecodes[v] = k
-end
for i=0,#glyphcodes do
glyphcodes[glyphcodes[i]] = i
end
@@ -67,6 +63,7 @@ for i=0,#disccodes do
disccodes[disccodes[i]] = i
end
+nodes.whatcodes = whatcodes
nodes.nodecodes = nodecodes
nodes.glyphcodes = glyphcodes
nodes.disccodes = disccodes