diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/node-typ.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/node-typ.lua | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/context/base/node-typ.lua b/Master/texmf-dist/tex/context/base/node-typ.lua index 5ab6b6975f4..684fc94ba6f 100644 --- a/Master/texmf-dist/tex/context/base/node-typ.lua +++ b/Master/texmf-dist/tex/context/base/node-typ.lua @@ -6,22 +6,25 @@ if not modules then modules = { } end modules ['node-typ'] = { license = "see context related readme files" } --- this will be replaced by blob-ini cum suis so typesetting will go away +-- this will be replaced by blob-ini cum suis so typesetters will go away local utfvalues = string.utfvalues -local newglyph = nodes.glyph -local newglue = nodes.glue +local hpack = node.hpack +local vpack = node.vpack -local hpack, vpack = node.hpack, node.vpack +local nodepool = nodes.pool -typesetting = typesetting or { } +local new_glyph = nodepool.glyph +local new_glue = nodepool.glue + +typesetters = typesetters or { } local function tonodes(str,fontid,spacing) -- don't use this local head, prev = nil, nil for s in utfvalues(str) do local next - if spacing and s == 32 then + if spacing and s == 32 then next = newglue(spacing or 64*1024*10) else next = newglyph(fontid or 1,s) @@ -37,17 +40,17 @@ local function tonodes(str,fontid,spacing) -- don't use this return head end -typesetting.tonodes = tonodes +typesetters.tonodes = tonodes -function typesetting.hpack(str,fontid,spacing) +function typesetters.hpack(str,fontid,spacing) return hpack(tonodes(str,fontid,spacing)) end -function typesetting.vpack(str,fontid,spacing) +function typesetters.vpack(str,fontid,spacing) -- vpack is just a hack, and a proper implentation is on the agenda -- as it needs more info etc than currently available return vpack(tonodes(str,fontid,spacing)) end ---~ node.write(typesetting.hpack("Hello World!")) ---~ node.write(typesetting.hpack("Hello World!",1,100*1024*10)) +--~ node.write(typesetters.hpack("Hello World!")) +--~ node.write(typesetters.hpack("Hello World!",1,100*1024*10)) |