From f5566ab29fc08e71f6da12003ae49c48461bb70a Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 16 Jul 2017 12:33:09 +0200 Subject: 2017-07-16 12:14:00 --- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/font-chk.lua | 4 ++-- tex/context/base/mkiv/font-con.lua | 29 +++++++---------------------- tex/context/base/mkiv/font-ext.lua | 11 ----------- tex/context/base/mkiv/font-ots.lua | 13 +++++++++++-- tex/context/base/mkiv/status-files.pdf | Bin 25746 -> 25727 bytes tex/context/base/mkiv/status-lua.pdf | Bin 426034 -> 426070 bytes tex/context/interface/mkiv/i-context.pdf | Bin 848182 -> 848082 bytes tex/context/interface/mkiv/i-readme.pdf | Bin 60775 -> 60775 bytes 12 files changed, 24 insertions(+), 41 deletions(-) (limited to 'tex/context') diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index e22f6c377..ef89a2e2b 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2017.07.14 19:35} +\newcontextversion{2017.07.16 12:08} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii index 9b7f9c968..c8c537e1f 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2017.07.14 19:35} +\edef\contextversion{2017.07.16 12:08} %D For those who want to use this: diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 92d217d35..73554a80f 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2017.07.14 19:35} +\newcontextversion{2017.07.16 12:08} %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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 056ba3d32..e20b29168 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -41,7 +41,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2017.07.14 19:35} +\edef\contextversion{2017.07.16 12:08} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/font-chk.lua b/tex/context/base/mkiv/font-chk.lua index d9e88c91e..5630892fe 100644 --- a/tex/context/base/mkiv/font-chk.lua +++ b/tex/context/base/mkiv/font-chk.lua @@ -52,7 +52,7 @@ local implement = interfaces.implement local glyph_code = nodes.nodecodes.glyph -local new_special = nodes.pool.special +local new_special = nodes.pool.special -- todo: literal local hpack_node = node.hpack local nuts = nodes.nuts @@ -186,7 +186,7 @@ local cache = { } -- saves some tables but not that impressive local function missingtonode(tfmdata,character) local commands = character.commands - local fake = hpack_node(new_special(commands[1][2])) + local fake = hpack_node(new_special(commands[1][2])) -- todo: literal fake.width = character.width fake.height = character.height fake.depth = character.depth diff --git a/tex/context/base/mkiv/font-con.lua b/tex/context/base/mkiv/font-con.lua index 1b986b6a6..327a75537 100644 --- a/tex/context/base/mkiv/font-con.lua +++ b/tex/context/base/mkiv/font-con.lua @@ -404,15 +404,9 @@ function constructors.scale(tfmdata,specification) -- expansion (hz) local expansion = parameters.expansion if expansion then - target.stretch = expansion.stretch - target.shrink = expansion.shrink - target.step = expansion.step - target.auto_expand = expansion.auto - end - -- protrusion - local protrusion = parameters.protrusion - if protrusion then - target.auto_protrude = protrusion.auto + target.stretch = expansion.stretch + target.shrink = expansion.shrink + target.step = expansion.step end -- widening local extendfactor = parameters.extendfactor or 0 @@ -438,7 +432,7 @@ function constructors.scale(tfmdata,specification) targetparameters.scaledpoints = askedscaledpoints -- local isvirtual = properties.virtualized or tfmdata.type == "virtual" - local hasquality = target.auto_expand or target.auto_protrude + local hasquality = parameters.expansion or parameters.protrusion local hasitalics = properties.hasitalics local autoitalicamount = properties.autoitalicamount local stackmath = not properties.nostackmath @@ -852,16 +846,9 @@ function constructors.finalize(tfmdata) -- if not parameters.expansion then parameters.expansion = { - stretch = tfmdata.stretch or 0, - shrink = tfmdata.shrink or 0, - step = tfmdata.step or 0, - auto = tfmdata.auto_expand or false, - } - end - -- - if not parameters.protrusion then - parameters.protrusion = { - auto = auto_protrude + stretch = tfmdata.stretch or 0, + shrink = tfmdata.shrink or 0, + step = tfmdata.step or 0, } end -- @@ -965,8 +952,6 @@ function constructors.finalize(tfmdata) tfmdata.stretch = nil tfmdata.shrink = nil tfmdata.step = nil - tfmdata.auto_expand = nil - tfmdata.auto_protrude = nil tfmdata.extend = nil tfmdata.slant = nil tfmdata.units = nil diff --git a/tex/context/base/mkiv/font-ext.lua b/tex/context/base/mkiv/font-ext.lua index d541521fb..d008cf235 100644 --- a/tex/context/base/mkiv/font-ext.lua +++ b/tex/context/base/mkiv/font-ext.lua @@ -122,7 +122,6 @@ local function initializeexpansion(tfmdata,value) shrink = 10 * shrink, step = 10 * step, factor = factor, - auto = true, } local data = characters and characters.data for i, chr in next, tfmdata.characters do @@ -397,15 +396,6 @@ local function map_opbd_onto_protrusion(tfmdata,value,opbd) end end end - local parameters = tfmdata.parameters - local protrusion = tfmdata.protrusion - if not protrusion then - parameters.protrusion = { - auto = true - } - else - protrusion.auto = true - end end -- The opbd test is just there because it was discussed on the context development list. However, @@ -435,7 +425,6 @@ local function initializeprotrusion(tfmdata,value) factor = factor, left = left, right = right, - auto = true, } for i, chr in next, tfmdata.characters do local v, pl, pr = vector[i], nil, nil diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua index 26659721f..54cacc543 100644 --- a/tex/context/base/mkiv/font-ots.lua +++ b/tex/context/base/mkiv/font-ots.lua @@ -148,11 +148,16 @@ local trace_compruns = false registertracker("otf.compruns", function local trace_testruns = false registertracker("otf.testruns", function(v) trace_testruns = v end) local forcediscretionaries = false +local forcepairadvance = false -- for testing directives.register("otf.forcediscretionaries",function(v) forcediscretionaries = v end) +directives.register("otf.forcepairadvance",function(v) + forcepairadvance = v +end) + local report_direct = logs.reporter("fonts","otf direct") local report_subchain = logs.reporter("fonts","otf subchain") local report_chain = logs.reporter("fonts","otf chain") @@ -886,6 +891,8 @@ function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,step,i,inje logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p) as %s",pref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h,injection or "injections") end start = snext -- cf spec + elseif forcepairadvance then + start = snext -- for testing end return head, start, true elseif krn ~= 0 then @@ -1463,7 +1470,7 @@ function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlm break elseif step.format == "pair" then local a, b = krn[1], krn[2] - if a then + if a == true then -- zero elseif a then local x, y, w, h = setpair(start,factor,rlmode,sequence.flags[4],a,"injections") -- currentlookups flags? @@ -1482,6 +1489,8 @@ function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlm logprocess("%s: shifting second of pair %s and %s by (%p,%p) and correction (%p,%p)",cref(dataset,sequence),gref(startchar),gref(nextchar),x,y,w,h) end start = snext -- cf spec + elseif forcepairadvance then + start = snext -- for testing end return head, start, true elseif krn ~= 0 then @@ -5332,7 +5341,7 @@ local function spaceinitializer(tfmdata,value) -- attr right[k] = v[3] else local one = v[1] - if one then + if one and one ~= true then right[k] = one[3] end end diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index 83c6b914d..46f3be41e 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 9950ca3a6..d29dcd024 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf index 22a0fdd48..f2b57f4a7 100644 Binary files a/tex/context/interface/mkiv/i-context.pdf and b/tex/context/interface/mkiv/i-context.pdf differ diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf index 3c36718a9..4d3ea3867 100644 Binary files a/tex/context/interface/mkiv/i-readme.pdf and b/tex/context/interface/mkiv/i-readme.pdf differ -- cgit v1.2.3