diff options
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4200 -> 4202 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/font-inj.lua | 231 | ||||
-rw-r--r-- | tex/context/base/font-lib.mkvi | 8 | ||||
-rw-r--r-- | tex/context/base/font-otn.lua | 37 | ||||
-rw-r--r-- | tex/context/base/font-ots.lua | 40 | ||||
-rw-r--r-- | tex/context/base/lang-dis.lua | 4 | ||||
-rw-r--r-- | tex/context/base/m-newotf.mkiv | 44 | ||||
-rw-r--r-- | tex/context/base/node-fnt.lua | 2 | ||||
-rw-r--r-- | tex/context/base/node-pro.lua | 7 | ||||
-rw-r--r-- | tex/context/base/s-fonts-ligatures.mkiv | 23 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24450 -> 24483 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 255168 -> 255196 bytes | |||
-rw-r--r-- | tex/context/base/typo-lin.lua | 4 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
16 files changed, 256 insertions, 150 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 4a78dabc5..e415389bf 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{2015.08.24 15:05} +\newcontextversion{2015.08.26 09:07} %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 Binary files differindex 17713eaf8..328813c62 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 580154bdc..dd2132720 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.08.24 15:05} +\edef\contextversion{2015.08.26 09:07} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/font-inj.lua b/tex/context/base/font-inj.lua index 62e806f8b..99172a89f 100644 --- a/tex/context/base/font-inj.lua +++ b/tex/context/base/font-inj.lua @@ -8,7 +8,13 @@ if not modules then modules = { } end modules ['font-inj'] = { -- This property based variant is not faster but looks nicer than the attribute one. We -- need to use rawget (which is apbout 4 times slower than a direct access but we cannot --- get/set that one for our purpose! +-- get/set that one for our purpose! This version does a bit more with discretionaries +-- (and Kai has tested it with his collection of weird fonts.) + +-- There is some duplicate code here (especially in the the pre/post/replace branches) but +-- we go for speed. We could store a list of glyph and mark nodes when registering but it's +-- cleaner to have an identification pass here. Also, I need to keep tracing in mind so +-- being too clever here is dangerous. if not nodes.properties then return end @@ -80,8 +86,7 @@ function injections.resetcounts() keepregisteredcounts = false end --- We need to make sure that a possible metatable will not kick in --- unexpectedly. +-- We need to make sure that a possible metatable will not kick in unexpectedly. function injections.reset(n) local p = rawget(properties,n) @@ -251,10 +256,9 @@ function injections.setpair(current,factor,rlmode,r2lflag,spec,injection) -- r2l return x, y, w, h -- no bound end --- this needs checking for rl < 0 but it is unlikely that a r2l script --- uses kernclasses between glyphs so we're probably safe (KE has a --- problematic font where marks interfere with rl < 0 in the previous --- case) +-- This needs checking for rl < 0 but it is unlikely that a r2l script uses kernclasses between +-- glyphs so we're probably safe (KE has a problematic font where marks interfere with rl < 0 in +-- the previous case) function injections.setkern(current,factor,rlmode,x,injection) local dx = factor * x @@ -298,16 +302,16 @@ function injections.setmark(start,base,factor,rlmode,ba,ma,tfmbase,mkmk) -- ba=b if p then local i = rawget(p,"injections") if i then -if i.markmark then - -- out of order mkmk: yes or no or option -else - i.markx = dx - i.marky = dy - i.markdir = rlmode or 0 - i.markbase = nofregisteredmarks - i.markbasenode = base - i.markmark = mkmk -end + if i.markmark then + -- out of order mkmk: yes or no or option + else + i.markx = dx + i.marky = dy + i.markdir = rlmode or 0 + i.markbase = nofregisteredmarks + i.markbasenode = base + i.markmark = mkmk + end else p.injections = { markx = dx, @@ -439,30 +443,32 @@ local function show_result(head) end end --- we could also check for marks here but maybe not all are registered (needs checking) - -local function collect_glyphs_1(head) - local glyphs, nofglyphs = { }, 0 - local marks, nofmarks = { }, 0 +local function collect_glyphs(head,offsets) + local glyphs, glyphi, nofglyphs = { }, { }, 0 + local marks, marki, nofmarks = { }, { }, 0 local nf, tm = nil, nil - for n in traverse_id(glyph_code,head) do -- only needed for relevant fonts - if getsubtype(n) < 256 then - local f = getfont(n) - if f ~= nf then - nf = f - tm = fontdata[nf].resources.marks -- other hash in ctx - end - if tm and tm[getchar(n)] then - nofmarks = nofmarks + 1 - marks[nofmarks] = n - else - nofglyphs = nofglyphs + 1 - glyphs[nofglyphs] = n - end + local n = head + + local function identify(n,what) + local f = getfont(n) + if f ~= nf then + nf = f + tm = fontdata[nf].resources.marks -- other hash in ctx + end + if tm and tm[getchar(n)] then + nofmarks = nofmarks + 1 + marks[nofmarks] = n + marki[nofmarks] = "injections" + else + nofglyphs = nofglyphs + 1 + glyphs[nofglyphs] = n + glyphi[nofglyphs] = what + end + if offsets then -- yoffsets can influence curs steps local p = rawget(properties,n) if p then - local i = rawget(p,"injections") + local i = rawget(p,what) if i then local yoffset = i.yoffset if yoffset and yoffset ~= 0 then @@ -472,38 +478,50 @@ local function collect_glyphs_1(head) end end end - return glyphs, nofglyphs, marks, nofmarks -end -local function collect_glyphs_2(head) - local glyphs, nofglyphs = { }, 0 - local marks, nofmarks = { }, 0 - local nf, tm = nil, nil - for n in traverse_id(glyph_code,head) do - if getsubtype(n) < 256 then - local f = getfont(n) - if f ~= nf then - nf = f - tm = fontdata[nf].resources.marks -- other hash in ctx - end - if tm and tm[getchar(n)] then - nofmarks = nofmarks + 1 - marks[nofmarks] = n - else - nofglyphs = nofglyphs + 1 - glyphs[nofglyphs] = n - end + while n do -- only needed for relevant fonts + local id = getid(n) + if id == glyph_code then + identify(n,"injections") + elseif id == disc_code then + local d = getfield(n,"pre") + if d then + for n in traverse_id(glyph_code,d) do + if getsubtype(n) < 256 then + identify(n,"preinjections") + end + end + end + local d = getfield(n,"post") + if d then + for n in traverse_id(glyph_code,d) do + if getsubtype(n) < 256 then + identify(n,"postinjections") + end + end + end + local d = getfield(n,"replace") + if d then + for n in traverse_id(glyph_code,d) do + if getsubtype(n) < 256 then + identify(n,"replaceinjections") + end + end + end end + n = getnext(n) end - return glyphs, nofglyphs, marks, nofmarks + + return glyphs, glyphi, nofglyphs, marks, marki, nofmarks end -local function inject_marks(marks,nofmarks) +local function inject_marks(marks,marki,nofmarks) for i=1,nofmarks do - local n = marks[i] + local n = marks[i] local pn = rawget(properties,n) if pn then - pn = rawget(pn,"injections") + local ni = marki[i] + local pn = rawget(pn,ni) if pn then local p = pn.markbasenode if p then @@ -512,7 +530,7 @@ local function inject_marks(marks,nofmarks) local rightkern = nil local pp = rawget(properties,p) if pp then - pp = rawget(pp,"injections") + pp = rawget(pp,ni) if pp then rightkern = pp.rightkern end @@ -531,7 +549,6 @@ local function inject_marks(marks,nofmarks) else ox = px - pn.markx - leftkern end --- report_injections("l2r case 1: %p",ox) end else -- we need to deal with fonts that have marks with width @@ -574,14 +591,14 @@ local function inject_marks(marks,nofmarks) end end -local function inject_cursives(glyphs,nofglyphs) +local function inject_cursives(glyphs,glyphi,nofglyphs) local cursiveanchor, lastanchor = nil, nil local minc, maxc, last = 0, 0, nil for i=1,nofglyphs do - local n = glyphs[i] + local n = glyphs[i] local pn = rawget(properties,n) if pn then - pn = rawget(pn,"injections") + pn = rawget(pn,glyphi[i]) end if pn then local cursivex = pn.cursivex @@ -640,7 +657,7 @@ local function inject_cursives(glyphs,nofglyphs) -- if maxc > 0 and not cursiveanchor then -- local ny = getfield(n,"yoffset") -- for i=maxc,minc,-1 do - -- local ti = glyphs[i] + -- local ti = glyphs[i][1] -- ny = ny + properties[ti].cursivedy -- setfield(ti,"yoffset",ny) -- why not add ? -- end @@ -657,23 +674,56 @@ local function inject_cursives(glyphs,nofglyphs) end end -local function inject_kerns(head,list,length) - -- todo: pre/post/replace +local function inject_kerns(head,glist,ilist,length) for i=1,length do - local n = list[i] + local n = glist[i] local pn = rawget(properties,n) if pn then - local i = rawget(pn,"injections") - if i then - local leftkern = i.leftkern - if leftkern and leftkern ~= 0 then - insert_node_before(head,n,newkern(leftkern)) -- type 0/2 - end - local rightkern = i.rightkern - if rightkern and rightkern ~= 0 then - insert_node_after(head,n,newkern(rightkern)) -- type 0/2 - end - end + local dp = nil + local dr = nil + local ni = ilist[i] + if ni == "injections" then + local p = getprev(n) + if p then + local id = getid(p) + if id == disc_code then + dp = getfield(p,"post") + dr = getfield(p,"replace") + end + end + end + if dp then + local i = rawget(pn,"postinjections") + if i then + local leftkern = i.leftkern + if leftkern and leftkern ~= 0 then + local t = find_tail(dp) + insert_node_after(dp,t,newkern(leftkern)) + end + end + end + if dr then + local i = rawget(pn,"replaceinjections") + if i then + local leftkern = i.leftkern + if leftkern and leftkern ~= 0 then + local t = find_tail(dr) + insert_node_after(dr,t,newkern(leftkern)) + end + end + else + local i = rawget(pn,ni) + if i then + local leftkern = i.leftkern + if leftkern and leftkern ~= 0 then + insert_node_before(head,n,newkern(leftkern)) -- type 0/2 + end + local rightkern = i.rightkern + if rightkern and rightkern ~= 0 then + insert_node_after(head,n,newkern(rightkern)) -- type 0/2 + end + end + end end end end @@ -683,23 +733,18 @@ local function inject_everything(head,where) if trace_injections then trace(head,"everything") end - local glyphs, nofglyphs, marks, nofmarks - if nofregisteredpairs > 0 then - glyphs, nofglyphs, marks, nofmarks = collect_glyphs_1(head) - else - glyphs, nofglyphs, marks, nofmarks = collect_glyphs_2(head) - end + local glyphs, glyphi, nofglyphs, marks, marki, nofmarks = collect_glyphs(head,nofregisteredpairs > 0) if nofglyphs > 0 then if nofregisteredcursives > 0 then - inject_cursives(glyphs,nofglyphs) + inject_cursives(glyphs,glyphi,nofglyphs) end if nofregisteredmarks > 0 then -- and nofmarks > 0 - inject_marks(marks,nofmarks) + inject_marks(marks,marki,nofmarks) end - inject_kerns(head,glyphs,nofglyphs) + inject_kerns(head,glyphs,glyphi,nofglyphs) end if nofmarks > 0 then - inject_kerns(head,marks,nofmarks) + inject_kerns(head,marks,marki,nofmarks) end if keepregisteredcounts then keepregisteredcounts = false @@ -862,7 +907,7 @@ local function inject_pairs_only(head,where) end -- local n = head - local p = nil + local p = nil -- disc node when non-nil while n do local id = getid(n) if id == glyph_code then @@ -1052,7 +1097,7 @@ local function inject_pairs_only(head,where) return tonode(head), true end -function injections.handler(head,where) -- optimize for n=1 ? +function injections.handler(head,where) if nofregisteredmarks > 0 or nofregisteredcursives > 0 then return inject_everything(head,where) elseif nofregisteredpairs > 0 then diff --git a/tex/context/base/font-lib.mkvi b/tex/context/base/font-lib.mkvi index b1050f7f5..449a5078e 100644 --- a/tex/context/base/font-lib.mkvi +++ b/tex/context/base/font-lib.mkvi @@ -49,14 +49,12 @@ \registerctxluafile{font-otf}{1.001} % otf main \registerctxluafile{font-otb}{1.001} % otf main base -% \doiffileelse{font-inj.lua} -% {\registerctxluafile{font-inj}{1.001}} % new method (for the moment only local) -% {\registerctxluafile{node-inj}{1.001}} % old method - -\registerctxluafile{font-inj}{1.001} % the old method (lacks some features) +\registerctxluafile{font-inj}{1.001} \registerctxluafile{font-ota}{1.001} % otf analyzers + \registerctxluafile{font-otn}{1.001} % otf main node + \registerctxluafile{font-otd}{1.001} % otf dynamics (does an overload) \registerctxluafile{font-otp}{1.001} % otf pack \registerctxluafile{font-otc}{1.001} % otf context diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua index 769438f47..99e52a3b0 100644 --- a/tex/context/base/font-otn.lua +++ b/tex/context/base/font-otn.lua @@ -664,8 +664,8 @@ local function toligature(kind,lookupname,head,start,stop,char,markflag,discfoun setfield(discnext,"prev",nil) -- also blocks funny assignments setfield(discprev,"next",nil) -- also blocks funny assignments if pre then - setfield(comp,"next",pre) - setfield(pre,"prev",comp) + setfield(discprev,"next",pre) + setfield(pre,"prev",discprev) end pre = comp if post then @@ -689,7 +689,7 @@ local function toligature(kind,lookupname,head,start,stop,char,markflag,discfoun setfield(discfound,"subtype",discretionary_code) base = prev -- restart end - elseif discretionary_code == regular_code then + elseif subtype == regular_code then -- local prev = getfield(base,"prev") -- local next = getfield(base,"next") local copied = copy_node_list(comp) @@ -2568,17 +2568,32 @@ end -- -- * languages that use complex disc nodes --- optimization comes later ... - local function kernrun(disc,run) -- we can assume that prev and next are glyphs + -- + -- we catch <font 1><disc font 2> + -- if trace_kernruns then report_run("kern") -- will be more detailed end - -- - local prev = getprev(disc) -- todo, keep these in the main loop - local next = getnext(disc) -- todo, keep these in the main loop -- - local pre = getfield(disc,"pre") + local prev = getprev(disc) -- todo, keep these in the main loop + local next = getnext(disc) -- todo, keep these in the main loop + -- + local pre = getfield(disc,"pre") + local post = getfield(disc,"post") + local replace = getfield(disc,"replace") + -- + if pre or replace then + if not (prev and getid(prev) == glyph_code and getfont(prev) == currentfont and getsubtype(prev)<256) then + prev = false + end + end + if post or replace then + if not (next and getid(next) == glyph_code and getfont(next) == currentfont and getsubtype(next)<256) then + next = false + end + end + -- if not pre then -- go on elseif prev then @@ -2592,7 +2607,6 @@ local function kernrun(disc,run) -- we can assume that prev and next are glyphs run(pre,"preinjections") end -- - local post = getfield(disc,"post") if not post then -- go on elseif next then @@ -2606,8 +2620,7 @@ local function kernrun(disc,run) -- we can assume that prev and next are glyphs run(post,"postinjections") end -- - local replace = getfield(disc,"replace") - if not replace then + if not replace and prev and next then -- this should be already done by discfound elseif prev and next then local tail = find_node_tail(replace) diff --git a/tex/context/base/font-ots.lua b/tex/context/base/font-ots.lua index 115abb32d..c7497c16f 100644 --- a/tex/context/base/font-ots.lua +++ b/tex/context/base/font-ots.lua @@ -597,8 +597,8 @@ local function toligature(head,start,stop,char,dataset,sequence,markflag,discfou setfield(discnext,"prev",nil) -- also blocks funny assignments setfield(discprev,"next",nil) -- also blocks funny assignments if pre then - setfield(comp,"next",pre) - setfield(pre,"prev",comp) + setfield(discprev,"next",pre) + setfield(pre,"prev",discprev) end pre = comp if post then @@ -622,7 +622,6 @@ local function toligature(head,start,stop,char,dataset,sequence,markflag,discfou setfield(discfound,"subtype",discretionary_code) base = prev -- restart end - -- elseif discretionary_code == regular_code then -- ?? elseif subtype == regular_code then -- local prev = getfield(base,"prev") -- local next = getfield(base,"next") @@ -2271,17 +2270,32 @@ end -- -- * languages that use complex disc nodes --- optimization comes later ... - -local function kernrun(disc,run) -- we can assume that prev and next are glyphs +local function kernrun(disc,run) + -- + -- we catch <font 1><disc font 2> + -- if trace_kernruns then report_run("kern") -- will be more detailed end - -- - local prev = getprev(disc) -- todo, keep these in the main loop - local next = getnext(disc) -- todo, keep these in the main loop -- - local pre = getfield(disc,"pre") + local prev = getprev(disc) -- todo, keep these in the main loop + local next = getnext(disc) -- todo, keep these in the main loop + -- + local pre = getfield(disc,"pre") + local post = getfield(disc,"post") + local replace = getfield(disc,"replace") + -- + if pre or replace then + if not (prev and getid(prev) == glyph_code and getfont(prev) == currentfont and getsubtype(prev)<256) then + prev = false + end + end + if post or replace then + if not (next and getid(next) == glyph_code and getfont(next) == currentfont and getsubtype(next)<256) then + next = false + end + end + -- if not pre then -- go on elseif prev then @@ -2295,7 +2309,6 @@ local function kernrun(disc,run) -- we can assume that prev and next are glyphs run(pre,"preinjections") end -- - local post = getfield(disc,"post") if not post then -- go on elseif next then @@ -2309,8 +2322,7 @@ local function kernrun(disc,run) -- we can assume that prev and next are glyphs run(post,"postinjections") end -- - local replace = getfield(disc,"replace") - if not replace then + if not replace and prev and next then -- this should be already done by discfound elseif prev and next then local tail = find_node_tail(replace) @@ -2331,7 +2343,7 @@ local function kernrun(disc,run) -- we can assume that prev and next are glyphs run(prev,"replaceinjections") setfield(replace,"prev",nest) setfield(prev,"next",disc) - elseif next then + elseif next then local tail = find_node_tail(replace) setfield(tail,"next",next) setfield(next,"prev",tail) diff --git a/tex/context/base/lang-dis.lua b/tex/context/base/lang-dis.lua index 65863a20d..bacd7f04b 100644 --- a/tex/context/base/lang-dis.lua +++ b/tex/context/base/lang-dis.lua @@ -60,7 +60,7 @@ local expanders = { if post and getid(post) == glyph_code and getchar(post) <= 0 then setfield(d,"post",nil) end -setfield(d,"subtype",discretionary_code) -- to be checked + setfield(d,"subtype",discretionary_code) -- to be checked return template end, [disccodes.automatic] = function(d,template) @@ -97,7 +97,7 @@ setfield(d,"subtype",discretionary_code) -- to be checked -- print("lone regular discretionary ignored") end else -setfield(d,"subtype",discretionary_code) + setfield(d,"subtype",discretionary_code) end return template end, diff --git a/tex/context/base/m-newotf.mkiv b/tex/context/base/m-newotf.mkiv index 67a6864a7..5f5e617ff 100644 --- a/tex/context/base/m-newotf.mkiv +++ b/tex/context/base/m-newotf.mkiv @@ -19,9 +19,23 @@ \startluacode local files = { - "font-otr", "font-cff", "font-ttf", "font-dsp", "font-oup", - "font-otl", "font-ots", "font-oto", "font-otd", "font-otc", - "font-osd", "font-map", "font-fbk", "font-gds", + "font-inj-new", -- for me, testing + "node-fnt-new", -- for me, testing + "font-otr", + "font-cff", + "font-ttf", + "font-dsp", + "font-oup", + "font-otl", + "font-ots", + "font-ots-new", -- for me, testing + "font-oto", + "font-otd", + "font-otc", + "font-osd", + "font-map", + "font-fbk", + "font-gds", } local report = logs.reporter("newotf") local findfile = resolvers.findfile @@ -31,10 +45,30 @@ report() for i=1,#files do local foundfile = findfile(addsuffix(files[i],"lua")) - report("loading %a",foundfile) - dofile(foundfile) + if foundfile and foundfile ~= "" then + report("loading %a",foundfile) + dofile(foundfile) + end end report() + + -- needed for testing: + + local nuts = nodes.nuts + local copy_node = nuts.copy + local kern = nuts.pool.register(nuts.pool.kern()) + local setfield = nuts.setfield + + nuts.setattr(kern,attributes.private('fontkern'),1) -- we can have several, attributes are shared + + nodes.injections.installnewkern(function(k) + local c = copy_node(kern) + setfield(c,"kern",k) + return c + end) + + directives.register("nodes.injections.fontkern", function(v) setfield(kern,"subtype",v and 0 or 1) end) + \stopluacode \protect \endinput diff --git a/tex/context/base/node-fnt.lua b/tex/context/base/node-fnt.lua index 93b467f52..9cb9b487d 100644 --- a/tex/context/base/node-fnt.lua +++ b/tex/context/base/node-fnt.lua @@ -264,7 +264,7 @@ function handlers.characters(head) for d in traverse_id(disc_code,nuthead) do -- we could use first_glyph - local r = getfield(n,"replace") -- good enough + local r = getfield(d,"replace") -- good enough if r then for n in traverse_id(glyph_code,r) do if getsubtype(n) < 256 then -- all are 1 diff --git a/tex/context/base/node-pro.lua b/tex/context/base/node-pro.lua index 27e349893..7650c0e50 100644 --- a/tex/context/base/node-pro.lua +++ b/tex/context/base/node-pro.lua @@ -9,7 +9,8 @@ if not modules then modules = { } end modules ['node-pro'] = { local utfchar = utf.char local format, concat = string.format, table.concat -local trace_callbacks = false trackers.register("nodes.callbacks", function(v) trace_callbacks = v end) +local trace_callbacks = false trackers .register("nodes.callbacks", function(v) trace_callbacks = v end) +local force_processors = false directives.register("nodes.processors.force", function(v) force_processors = v end) local report_nodes = logs.reporter("nodes","processors") @@ -77,7 +78,7 @@ processors.enabled = true -- this will become a proper state (like trackers) function processors.pre_linebreak_filter(head,groupcode) -- ,size,packtype,direction -- local first, found = first_glyph(head) -- they really need to be glyphs - local found = has_glyph(head) + local found = force_processors or has_glyph(head) if found then if trace_callbacks then local before = nodes.count(head,true) @@ -105,7 +106,7 @@ local enabled = true function processors.hpack_filter(head,groupcode,size,packtype,direction) if enabled then -- local first, found = first_glyph(head) -- they really need to be glyphs - local found = has_glyph(head) + local found = force_processors or has_glyph(head) if found then if trace_callbacks then local before = nodes.count(head,true) diff --git a/tex/context/base/s-fonts-ligatures.mkiv b/tex/context/base/s-fonts-ligatures.mkiv index 74fab3e58..657d6c069 100644 --- a/tex/context/base/s-fonts-ligatures.mkiv +++ b/tex/context/base/s-fonts-ligatures.mkiv @@ -78,7 +78,7 @@ \starttexdefinition showotfligaturesbanner #1 \bTR[frame=off] - \bTD [nx=\showotfligaturesnx,width=\showotfligatureswidth,align={middle,lohi},height=4ex] + \bTD [nx=\showotfligaturesnx,xwidth=\showotfligatureswidth,align={middle,lohi},height=4ex] \tttf #1 \eTD \eTR @@ -138,7 +138,7 @@ \starttexdefinition showotfligaturesdefaults \bTR - \bTD [nx=\showotfligaturesnx,width=\showotfligatureswidth,align=middle,height=4ex,frame=off] + \bTD [nx=\showotfligaturesnx,xwidth=\showotfligatureswidth,align=middle,height=4ex,frame=off] \start \LigatureFont fb \stop \quad \start \LigatureFont ff \stop \quad \start \LigatureFont fi \stop \quad @@ -192,13 +192,16 @@ \starttext - \startTEXpage[offset=10pt] \showotfligatures[font=lmroman10-regular.otf, features=default] \stopTEXpage - \startTEXpage[offset=10pt] \showotfligatures[font=dejavu-serif.ttf, features=default] \stopTEXpage - \startTEXpage[offset=10pt] \showotfligatures[font=minionpro.otf, features=default] \stopTEXpage - \startTEXpage[offset=10pt] \showotfligatures[font=minionpro.otf, features=smallcaps] \stopTEXpage - \startTEXpage[offset=10pt] \showotfligatures[font=brill.otf, features=default] \stopTEXpage - \startTEXpage[offset=10pt] \showotfligatures[font=gentiumplus-r.ttf, features=default] \stopTEXpage - \startTEXpage[offset=10pt] \showotfligatures[font=cambria, features=default] \stopTEXpage - \startTEXpage[offset=10pt] \showotfligatures[font=garamond, features=default] \stopTEXpage + \definefontfeature[fonttest][default] [mode=node,language=dflt,script=latn,ccmp=yes,liga=yes,kern=yes,mark=yes,mkmk=yes] + \definefontfeature[capstest][smallcaps][mode=node,language=dflt,script=latn,ccmp=yes,liga=yes,kern=yes,mark=yes,mkmk=yes] + + \startTEXpage[offset=10pt] \showotfligatures[font=lmroman10-regular.otf, features=fonttest] \stopTEXpage + \startTEXpage[offset=10pt] \showotfligatures[font=dejavu-serif.ttf, features=fonttest] \stopTEXpage + \startTEXpage[offset=10pt] \showotfligatures[font=minionpro.otf, features=fonttest] \stopTEXpage + \startTEXpage[offset=10pt] \showotfligatures[font=minionpro.otf, features=capstest] \stopTEXpage + \startTEXpage[offset=10pt] \showotfligatures[font=brill.otf, features=fonttest] \stopTEXpage + \startTEXpage[offset=10pt] \showotfligatures[font=gentiumplus-r.ttf, features=fonttest] \stopTEXpage + \startTEXpage[offset=10pt] \showotfligatures[font=cambria, features=fonttest] \stopTEXpage + \startTEXpage[offset=10pt] \showotfligatures[font=ebgaramond12-regular.otf,features=fonttest] \stopTEXpage \stoptext diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 0d8bdc05d..05e61ce47 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 71c435714..18f1af54b 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/typo-lin.lua b/tex/context/base/typo-lin.lua index fcd68da7d..ef7bbe6ac 100644 --- a/tex/context/base/typo-lin.lua +++ b/tex/context/base/typo-lin.lua @@ -136,9 +136,9 @@ function paragraphs.normalize(head,...) head = remove_node(head,head,true) end end - head = insert_before(head,head,anchor) + head = insert_before(head,head,anchor) + shift = shift + width - hsize if reverse then - shift = shift + width - hsize head = insert_before(head,head,new_kern(shift)) insert_after(head,anchor,new_kern(-shift)) else diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 56e5a12bd..ac2c42525 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 : 08/24/15 15:05:23 +-- merge date : 08/26/15 09:07:04 do -- begin closure to overcome local limits and interference |