From 3234906ac7cb4eac2077af3dff2b3db452514cd0 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 23 Jan 2014 03:20:15 +0200 Subject: beta 2014.01.23 01:55 --- scripts/context/stubs/unix/mtxrunjit | 3 ++ tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4117 -> 4088 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/font-syn.lua | 20 +++++--- tex/context/base/node-met.lua | 53 +++++++++++++++++++++ tex/context/base/status-files.pdf | Bin 24803 -> 24848 bytes tex/context/base/status-lua.pdf | Bin 233044 -> 233054 bytes tex/context/base/typo-tal.lua | 2 +- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 10 files changed, 73 insertions(+), 11 deletions(-) diff --git a/scripts/context/stubs/unix/mtxrunjit b/scripts/context/stubs/unix/mtxrunjit index 171721497..117105aa5 100644 --- a/scripts/context/stubs/unix/mtxrunjit +++ b/scripts/context/stubs/unix/mtxrunjit @@ -1,2 +1,5 @@ #!/bin/sh + luajittex --luaonly $(dirname $0)/mtxrun "$@" + +# luajittex --luaonly ${0%jit} "$@" diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 3283420b4..81839f452 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2014.01.22 01:31} +\newcontextversion{2014.01.23 01:55} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index f878538da..a64d902fc 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 0c7810893..b32173e24 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -28,7 +28,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2014.01.22 01:31} +\edef\contextversion{2014.01.23 01:55} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/font-syn.lua b/tex/context/base/font-syn.lua index 5126739a7..6296f088e 100644 --- a/tex/context/base/font-syn.lua +++ b/tex/context/base/font-syn.lua @@ -346,7 +346,7 @@ filters.dfont = fontloader.info -- pfminfo = fields.pfminfo and ff.pfminfo, -- top_side_bearing = fields.top_side_bearing and ff.top_side_bearing, -- } --- table.setmetatableindex(d,function(t,k) +-- setmetatableindex(d,function(t,k) -- report_names("warning, trying to access field %a in font table of %a",k,name) -- end) -- fontloader.close(ff) @@ -363,16 +363,19 @@ function fontloader.fullinfo(...) local ff = fontloader.open(...) if ff then local d = { } -- ff is userdata so [1] or # fails on it - table.setmetatableindex(d,ff) + setmetatableindex(d,ff) return d else return nil, "error in loading font" end end -if tonumber(status.luatex_version) > 78 or (tonumber(status.luatex_version) == 78 and tonumber(status.luatex_revision) > 0) then - fontloader.fullinfo = fontloader.info -end +-- We don't get the design_* values here as for that the fontloader has to load feature +-- info and therefore we're not much better off than using 'open'. +-- +-- if tonumber(status.luatex_version) > 78 or (tonumber(status.luatex_version) == 78 and tonumber(status.luatex_revision) > 0) then +-- fontloader.fullinfo = fontloader.info +-- end filters.otf = fontloader.fullinfo filters.ttf = fontloader.fullinfo @@ -595,7 +598,7 @@ local function check_name(data,result,filename,modification,suffix,subfont) fullname = fullname or fontname familyname = familyname or fontname -- we do these sparse - local units = result.units_per_em or 1000 + local units = result.units_per_em or 1000 -- can be zero too local minsize = result.design_range_bottom or 0 local maxsize = result.design_range_top or 0 local designsize = result.design_size or 0 @@ -619,7 +622,7 @@ local function check_name(data,result,filename,modification,suffix,subfont) style = style, width = width, variant = variant, - units = units ~= 1000 and unit or nil, + units = units ~= 1000 and units or nil, pfmwidth = pfmwidth ~= 0 and pfmwidth or nil, pfmweight = pfmweight ~= 0 and pfmweight or nil, angle = angle ~= 0 and angle or nil, @@ -628,6 +631,9 @@ local function check_name(data,result,filename,modification,suffix,subfont) designsize = designsize ~= 0 and designsize or nil, modification = modification ~= 0 and modification or nil, } +-- inspect(filename) +-- inspect(result) +-- inspect(specifications[#specifications]) end local function cleanupkeywords() diff --git a/tex/context/base/node-met.lua b/tex/context/base/node-met.lua index c85a53c8e..d52349b4a 100644 --- a/tex/context/base/node-met.lua +++ b/tex/context/base/node-met.lua @@ -332,6 +332,28 @@ function nodes.writable_spec(n) -- not pool return spec end +function nodes.copy_spec(old,free) -- also frees + if not old then + return n_new_node("glue_spec") + else + local new = n_copy_node(old) + if free and old.writable then + free_node(old) + end + return new + end +end + +function nodes.free_spec(old) + if not old then + -- skip + elseif old.writable then + free_node(old) + else + -- skip + end +end + if gonuts then function nodes.reference(n) @@ -668,3 +690,34 @@ end nodes.keys = keys -- [id][subtype] nodes.fields = nodefields -- (n) + +-- one issue solved in flush_node: +-- +-- case glue_spec_node: +-- if (glue_ref_count(p)!=null) { +-- decr(glue_ref_count(p)); +-- return ; +-- /* +-- } else if (! valid_node(p)) { +-- return ; +-- */ +-- /* +-- } else { +-- free_node(p, get_node_size(type(p), subtype(p))); +-- return ; +-- */ +-- } +-- break ; +-- +-- or: +-- +-- case glue_spec_node: +-- if (glue_ref_count(p)!=null) { +-- decr(glue_ref_count(p)); +-- return ; +-- } else if (valid_node(p)) { +-- free_node(p, get_node_size(type(p), subtype(p))); +-- return ; +-- } else { +-- break ; +-- } diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index c983dc6e0..9866327f9 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index f5bbad6c0..121127e94 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/context/base/typo-tal.lua b/tex/context/base/typo-tal.lua index e8c14e3e3..debcedfd3 100644 --- a/tex/context/base/typo-tal.lua +++ b/tex/context/base/typo-tal.lua @@ -179,7 +179,7 @@ function characteralign.handler(originalhead,where) if next and prev and getid(next) == glyph_code and getid(prev) == glyph_code then -- too much checking local width = fontcharacters[getfont(b_start)][separator or period].width -- local spec = getfield(current,"spec") - -- nodes.free(spec) -- hm, we leak but not that many specs + -- free_spec(spec) setfield(current,"spec",new_gluespec(width)) setattr(current,a_character,punctuationspace) if a_start then diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index cfa3937a2..45d810517 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 01/22/14 01:31:43 +-- merge date : 01/23/14 01:55:54 do -- begin closure to overcome local limits and interference -- cgit v1.2.3