diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-02-22 20:29:46 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-02-22 20:29:46 +0100 |
commit | 7b271baae19db1528fbe6621bdf50af89a5a336b (patch) | |
tree | 4fc24a8f2be20aa90e90f6e1bcb62d69f4946235 /tex/context/base/mkiv/node-ser.lua | |
parent | 67b9965fe473d18f13ed4c40f1e4e008eb870322 (diff) | |
download | context-7b271baae19db1528fbe6621bdf50af89a5a336b.tar.gz |
2019-02-22 19:43:00
Diffstat (limited to 'tex/context/base/mkiv/node-ser.lua')
-rw-r--r-- | tex/context/base/mkiv/node-ser.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/node-ser.lua b/tex/context/base/mkiv/node-ser.lua index 7ed2b8d00..6fc2b7ea4 100644 --- a/tex/context/base/mkiv/node-ser.lua +++ b/tex/context/base/mkiv/node-ser.lua @@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['node-ser'] = { -- beware, some field names will change in a next releases -- of luatex; this is pretty old code that needs an overhaul -local type = type +local type, tostring = type, tostring local concat, tohash, sortedkeys, printtable, serialize = table.concat, table.tohash, table.sortedkeys, table.print, table.serialize local formatters, format, rep = string.formatters, string.format, string.rep @@ -24,16 +24,17 @@ local is_node = nodes.is_node local nodecodes = nodes.nodecodes local subtcodes = nodes.codes -local noadcodes = nodes.noadcodes local getfields = nodes.fields local tonode = nodes.tonode +local tonut = nodes.tonut local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist ----- utfchar = utf.char local f_char = formatters["%U"] +local f_attr = formatters["<%i>"] ----- fontchars = { } table.setmetatableindex(fontchars,function(t,k) fontchars = fonts.hashes.characters return fontchars[k] end) ----- f_char = utilities.strings.chkuni -- formatters["%!chkuni!"] @@ -87,7 +88,7 @@ local ignore = allocate ( tohash { local dimension = allocate ( tohash { "width", "height", "depth", "shift", "stretch", "shrink", - "xoffset", "yoffset", "xadvance", + "xoffset", "yoffset", "surround", "kern", "box_left_width", "box_right_width" @@ -145,6 +146,7 @@ local function totable(n,flat,verbose,noattributes) -- nicest: n,true,true,true if ignore[v] then -- skip elseif noattributes and v == "attr" then + tt[v] = f_attr(tonut(nv)) -- skip elseif v == "prev" then tt[v] = "<node>" |