diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/node-ser.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/node-ser.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua b/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua index 7ed2b8d00d8..6fc2b7ea4cf 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/node-ser.lua +++ b/Master/texmf-dist/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>" |