summaryrefslogtreecommitdiff
path: root/otfl-node-res.lua
diff options
context:
space:
mode:
Diffstat (limited to 'otfl-node-res.lua')
-rw-r--r--otfl-node-res.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/otfl-node-res.lua b/otfl-node-res.lua
index c8d815b..b84e5b1 100644
--- a/otfl-node-res.lua
+++ b/otfl-node-res.lua
@@ -59,6 +59,7 @@ 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 rule = nodes.register(new_node("rule"))
function nodes.glyph(fnt,chr)
local n = copy_node(glyph)
@@ -100,6 +101,13 @@ function nodes.textdir(dir)
t.dir = dir
return t
end
+function nodes.rule(w,h,d)
+ local n = copy_node(rule)
+ if w then n.width = w end
+ if h then n.height = h end
+ if d then n.depth = d end
+ return n
+end
statistics.register("cleaned up reserved nodes", function()
return format("%s nodes, %s lists of %s", nodes.cleanup_reserved(tex.count["lastallocatedbox"]))