summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/context-version.pdfbin4254 -> 4259 bytes
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-ext.lua32
-rw-r--r--tex/context/base/mkiv/font-osd.lua157
-rw-r--r--tex/context/base/mkiv/meta-ini.mkiv6
-rw-r--r--tex/context/base/mkiv/mlib-ctx.lua14
-rw-r--r--tex/context/base/mkiv/mlib-pdf.lua9
-rw-r--r--tex/context/base/mkiv/mlib-pps.lua53
-rw-r--r--tex/context/base/mkiv/mlib-pps.mkiv13
-rw-r--r--tex/context/base/mkiv/mlib-run.lua56
-rw-r--r--tex/context/base/mkiv/mult-fun.lua2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9243 -> 9126 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin368801 -> 368957 bytes
-rw-r--r--tex/context/fonts/mkiv/type-imp-libertinus.mkiv82
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin774584 -> 774457 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60792 -> 60792 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua143
18 files changed, 379 insertions, 192 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 69fc2e6c2..372d2f1cc 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index aaf7f7186..91d6a5598 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{2016.08.19 00:30}
+\newcontextversion{2016.08.20 13:39}
%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 b49ed822b..8e4dcf8ea 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.08.19 00:30}
+\edef\contextversion{2016.08.20 13:39}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-ext.lua b/tex/context/base/mkiv/font-ext.lua
index cadce625c..2fc85c266 100644
--- a/tex/context/base/mkiv/font-ext.lua
+++ b/tex/context/base/mkiv/font-ext.lua
@@ -1084,3 +1084,35 @@ implement {
end
end
}
+
+-- relatively new:
+
+do
+
+ local extraprivates = { }
+
+ function fonts.helpers.addextraprivate(name,f)
+ extraprivates[#extraprivates+1] = { name, f }
+ end
+
+ local function addextraprivates(tfmdata)
+ for i=1,#extraprivates do
+ local e = extraprivates[i]
+ local c = e[2](tfmdata)
+ if c then
+ fonts.helpers.addprivate(tfmdata, e[1], c)
+ end
+ end
+ end
+
+ fonts.constructors.newfeatures.otf.register {
+ name = "extraprivates",
+ description = "extra privates",
+ default = true,
+ manipulators = {
+ base = addextraprivates,
+ node = addextraprivates,
+ }
+ }
+
+end
diff --git a/tex/context/base/mkiv/font-osd.lua b/tex/context/base/mkiv/font-osd.lua
index 26af69187..8ddd9a272 100644
--- a/tex/context/base/mkiv/font-osd.lua
+++ b/tex/context/base/mkiv/font-osd.lua
@@ -613,13 +613,12 @@ local function initializedevanagi(tfmdata)
local steps = sequence.steps
local nofsteps = sequence.nofsteps
local features = sequence.features
- if features["rphf"] then
- -- deva
+ local has_rphf = features.rphf
+ local has_blwf = features.blwf
+ if has_rphf and has_rphf.deva then
devanagari.reph = true
- elseif features["blwf"] then
- -- deva
+ elseif has_blwf and has_blwf.deva then
devanagari.vattu = true
- -- dev2
for i=1,nofsteps do
local step = steps[i]
local coverage = step.coverage
@@ -632,59 +631,72 @@ local function initializedevanagi(tfmdata)
end
end
end
- if valid[kind] then
- for i=1,nofsteps do
- local step = steps[i]
- local coverage = step.coverage
- if coverage then
- local reph = false
- if step.osdstep then
- -- rphf acts on consonant + halant
- for k, v in next, ra do
- local r = coverage[k]
- if r then
- local h = false
- for k, v in next, halant do
- local h = r[k]
- if h then
- reph = h.ligature or false
- break
+ for kind, spec in next, features do -- beware, this is
+ if spec.dev2 and valid[kind] then
+ for i=1,nofsteps do
+ local step = steps[i]
+ local coverage = step.coverage
+ if coverage then
+ local reph = false
+ if kind == "rphf" then
+ --
+ -- KE: I don't understand the rationale behind osdstep. The original if
+ -- statement checked whether coverage is contextual chaining.
+ --
+ -- HH: The osdstep signals that we deal with our own feature here, not
+ -- one in the font itself so it was just a safeguard against us overloading
+ -- something driven by the font.
+ --
+ -- if step.osdstep then -- selective
+ if true then -- always
+ -- rphf acts on consonant + halant
+ for k, v in next, ra do
+ local r = coverage[k]
+ if r then
+ local h = false
+ for k, v in next, halant do
+ local h = r[k]
+ if h then
+ reph = h.ligature or false
+ break
+ end
+ end
+ if reph then
+ break
+ end
end
end
- if reph then
- break
- end
+ else
+ -- rphf might be result of other handler/chainproc
end
end
- else
- -- rphf might be result of other handler/chainproc
+ seqsubset[#seqsubset+1] = { kind, coverage, reph }
end
- seqsubset[#seqsubset+1] = { kind, coverage, reph }
end
end
- end
- if kind == "pref" then
- local sequence = dataset[3] -- was [5]
- local steps = sequence.steps
- local nofsteps = sequence.nofsteps
- for i=1,nofsteps do
- local step = steps[i]
- local coverage = step.coverage
- if coverage then
- for k, v in next, halant do
- local h = coverage[k]
- if h then
- local found = false
- for k, v in next, h do
- found = v and v.ligature
+ if kind == "pref" then
+ local sequence = dataset[3] -- was [5]
+ local steps = sequence.steps
+ local nofsteps = sequence.nofsteps
+ for i=1,nofsteps do
+ local step = steps[i]
+ local coverage = step.coverage
+ if coverage then
+ for k, v in next, halant do
+ local h = coverage[k]
+ if h then
+ local found = false
+ for k, v in next, h do
+ found = v and v.ligature
+ if found then
+ pre_base_reordering_consonants[k] = found
+ break
+ end
+ end
if found then
- pre_base_reordering_consonants[k] = found
break
end
end
- if found then
- break
- end
end
end
end
@@ -1132,6 +1144,8 @@ function handlers.devanagari_reorder_matras(head,start) -- no leak
start = startnext
break
end
+ else
+ break
end
current = next
end
@@ -1171,12 +1185,12 @@ function handlers.devanagari_reorder_reph(head,start)
local startfont = getfont(start)
local startattr = getprop(start,a_syllabe)
while current do
- local char = ischar(current,font)
+ local char = ischar(current,startfont)
if char and getprop(current,a_syllabe) == startattr then -- step 2
if halant[char] and not getprop(current,a_state) then
local next = getnext(current)
if next then
- local nextchar = ischar(next,font)
+ local nextchar = ischar(next,startfont)
if nextchar and zw_char[nextchar] and getprop(next,a_syllabe) == startattr then
current = next
next = getnext(current)
@@ -1198,7 +1212,7 @@ function handlers.devanagari_reorder_reph(head,start)
if not startnext then
current = getnext(start)
while current do
- local char = ischar(current,font)
+ local char = ischar(current,startfont)
if char and getprop(current,a_syllabe) == startattr then -- step 4
if getprop(current,a_state) == s_pstf then -- post-base
startnext = getnext(start)
@@ -1223,7 +1237,7 @@ function handlers.devanagari_reorder_reph(head,start)
current = getnext(start)
local c = nil
while current do
- local char = ischar(current,font)
+ local char = ischar(current,startfont)
if char and getprop(current,a_syllabe) == startattr then -- step 5
if not c and mark_above_below_post[char] and reorder_class[char] ~= "after subscript" then
c = current
@@ -1250,7 +1264,7 @@ function handlers.devanagari_reorder_reph(head,start)
current = start
local next = getnext(current)
while next do
- local nextchar = ischar(next,font)
+ local nextchar = ischar(next,startfont)
if nextchar and getprop(next,a_syllabe) == startattr then --step 6
current = next
next = getnext(current)
@@ -1263,7 +1277,7 @@ function handlers.devanagari_reorder_reph(head,start)
head = remove_node(head,start)
local next = getnext(current)
setlink(start,next)
- setlink(current,"next",start)
+ setlink(current,start)
start = startnext
end
end
@@ -1290,12 +1304,12 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start)
local startattr = getprop(start,a_syllabe)
-- can be fast for loop + caching state
while current do
- local char = ischar(current,font)
+ local char = ischar(current,startfont)
if char and getprop(current,a_syllabe) == startattr then
local next = getnext(current)
if halant[char] and not getprop(current,a_state) then
if next then
- local nextchar = ischar(next,font)
+ local nextchar = ischar(next,startfont)
if nextchar and getprop(next,a_syllabe) == startattr then
if nextchar == c_zwnj or nextchar == c_zwj then
current = next
@@ -1319,13 +1333,13 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start)
current = getnext(start)
startattr = getprop(start,a_syllabe)
while current do
- local char = ischar(current,font)
+ local char = ischar(current,startfont)
if char and getprop(current,a_syllabe) == startattr then
if not consonant[char] and getprop(current,a_state) then -- main
startnext = getnext(start)
removenode(start,start)
local prev = getprev(current)
- setlink(start,prev)
+ setlink(prev,start)
setlink(start,current)
start = startnext
break
@@ -1426,21 +1440,7 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces) -- maybe do a pa
local kind = subset[1]
local lookupcache = subset[2]
if kind == "rphf" then
- for k, v in next, ra do
- local r = lookupcache[k]
- if r then
- for k, v in next, halant do
- local h = r[k]
- if h then
- reph = h.ligature or false
- break
- end
- end
- if reph then
- break
- end
- end
- end
+ reph = subset[3]
local current = start
local last = getnext(stop)
while current ~= last do
@@ -1473,7 +1473,7 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces) -- maybe do a pa
if current ~= stop then
local c = locl[current] or getchar(current)
local found = lookupcache[c]
- if found then
+ if found then -- pre-base: pref Halant + Consonant
local next = getnext(current)
local n = locl[next] or getchar(next)
if found[n] then
@@ -1718,7 +1718,7 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces) -- maybe do a pa
local prev = getprev(current)
if prev ~= target then
local next = getnext(current)
- setlink(next,prev)
+ setlink(prev,next)
if current == stop then
stop = prev
end
@@ -1752,7 +1752,7 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces) -- maybe do a pa
stop = current
end
local prev = getprev(c)
- setlink(next,prev)
+ setlink(prev,next)
local nextnext = getnext(next)
setnext(current,nextnext)
local nextnextnext = getnext(nextnext)
@@ -1766,6 +1766,9 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces) -- maybe do a pa
end
if getchar(base) == c_nbsp then
+ if base == stop then
+ stop = getprev(stop)
+ end
nbspaces = nbspaces - 1
head = remove_node(head, base)
flush_node(base)
@@ -1815,7 +1818,7 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe
elseif (vv == c_zwnj or vv == c_zwj) and halant[vvv] then
local nnnn = getnext(nnn)
if nnnn then
- local vvvv = ischar(nnnn)
+ local vvvv = ischar(nnnn,font)
if vvvv and consonant[vvvv] then
c = nnnn
end
@@ -1838,7 +1841,7 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe
local nn = getnext(n)
if nn then
local vv = ischar(nn,font)
- if vv and zw_char[vv] then
+ if vv and zw_char[v] then
n = nn
v = vv
nn = getnext(nn)
diff --git a/tex/context/base/mkiv/meta-ini.mkiv b/tex/context/base/mkiv/meta-ini.mkiv
index b07574573..22856ec40 100644
--- a/tex/context/base/mkiv/meta-ini.mkiv
+++ b/tex/context/base/mkiv/meta-ini.mkiv
@@ -1492,6 +1492,12 @@
\def\MPruntab#1#2{\clf_mpruntab{#1}#2\relax} \let\mpruntab\MPruntab % #2 is number
\def\MPrunset#1#2{\clf_mprunset{#1}{#2}} \let\mprunset\MPrunset
+\prependtoks \clf_mppushvariables \to \everybeforepagebody
+\appendtoks \clf_mppopvariables \to \everyafterpagebody
+
+\let\MPpushvariables\clf_mppushvariables
+\let\MPpopvariables \clf_mppopvariables
+
%D We also provide an outputless run:
\unexpanded\def\startMPcalculation
diff --git a/tex/context/base/mkiv/mlib-ctx.lua b/tex/context/base/mkiv/mlib-ctx.lua
index 3fe7118b7..7b1584d7e 100644
--- a/tex/context/base/mkiv/mlib-ctx.lua
+++ b/tex/context/base/mkiv/mlib-ctx.lua
@@ -23,6 +23,8 @@ local mplib = mplib
metapost = metapost or {}
local metapost = metapost
+local context = context
+
local setters = tokens.setters
local setmacro = setters.macro
local implement = interfaces.implement
@@ -177,6 +179,7 @@ implement {
implement {
name = "mprunset",
+ arguments = { "string", "string" },
actions = function(name,connector)
local value = metapost.variables[name]
if value ~= nil then
@@ -282,7 +285,6 @@ end
function metapost.theclippath(...)
local result = metapost.getclippath(...)
if result then -- we could just print the table
--- return concat(metapost.flushnormalpath(result),"\n")
return concat(metapost.flushnormalpath(result)," ")
else
return ""
@@ -353,6 +355,16 @@ function mptex.reset()
end
implement {
+ name = "mppushvariables",
+ actions = metapost.pushvariables,
+}
+
+implement {
+ name = "mppopvariables",
+ actions = metapost.popvariables,
+}
+
+implement {
name = "mptexset",
arguments = "string",
actions = mptex.set
diff --git a/tex/context/base/mkiv/mlib-pdf.lua b/tex/context/base/mkiv/mlib-pdf.lua
index 5dbb308bc..5989b5b55 100644
--- a/tex/context/base/mkiv/mlib-pdf.lua
+++ b/tex/context/base/mkiv/mlib-pdf.lua
@@ -340,7 +340,7 @@ local variable =
local pattern_lst = (variable * newline^0)^0
-metapost.variables = { } -- to be stacked
+metapost.variables = { } -- currently across instances
metapost.properties = { } -- to be stacked
function metapost.untagvariable(str,variables) -- will be redone
@@ -385,12 +385,6 @@ local function setproperties(figure)
return properties
end
-local function setvariables(figure)
- local variables = { }
- metapost.variables = variables
- return variables
-end
-
local function nocomment() end
metapost.comment = nocomment
@@ -409,7 +403,6 @@ function metapost.flush(result,flusher,askedfig)
local flushfigure = flusher.flushfigure
local textfigure = flusher.textfigure
local processspecial = flusher.processspecial or metapost.processspecial
- local variables = setvariables(figure) -- also resets then in case of not found
metapost.comment = flusher.comment or nocomment
for index=1,#figures do
local figure = figures[index]
diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua
index 23091342f..0c0cc6637 100644
--- a/tex/context/base/mkiv/mlib-pps.lua
+++ b/tex/context/base/mkiv/mlib-pps.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['mlib-pps'] = {
local format, gmatch, match, split = string.format, string.gmatch, string.match, string.split
local tonumber, type, unpack = tonumber, type, unpack
-local round, sqrt = math.round, math.sqrt
+local round, sqrt, min, max = math.round, math.sqrt, math.min, math.max
local insert, remove, concat = table.insert, table.remove, table.concat
local Cs, Cf, C, Cg, Ct, P, S, V, Carg = lpeg.Cs, lpeg.Cf, lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V, lpeg.Carg
local lpegmatch, tsplitat, tsplitter = lpeg.match, lpeg.tsplitat, lpeg.tsplitter
@@ -835,7 +835,15 @@ local function splitprescript(script)
local hash = lpegmatch(scriptsplitter,script)
for i=#hash,1,-1 do
local h = hash[i]
+if h == "reset" then
+ for k, v in next, hash do
+ if type(k) ~= "number" then
+ hash[k] = nil
+ end
+ end
+else
hash[h[1]] = h[2]
+end
end
if trace_scripts then
report_scripts(table.serialize(hash,"prescript"))
@@ -1494,28 +1502,31 @@ local types = {
local function gr_process(object,prescript,before,after)
local gr_state = prescript.gr_state
- if gr_state then
- if gr_state == "start" then
- local gr_type = utilities.parsers.settings_to_hash(prescript.gr_type)
- before[#before+1] = function()
- context.MPLIBstartgroup(
- gr_type.isolated and 1 or 0,
- gr_type.knockout and 1 or 0,
- prescript.gr_llx,
- prescript.gr_lly,
- prescript.gr_urx,
- prescript.gr_ury
- )
- end
- elseif gr_state == "stop" then
- after[#after+1] = function()
- context.MPLIBstopgroup()
- end
+ if not gr_state then
+ return
+ elseif gr_state == "start" then
+ local gr_type = utilities.parsers.settings_to_set(prescript.gr_type)
+ local path = object.path
+ local p1, p2, p3, p4 = path[1], path[2], path[3], path[4]
+ local llx = min(p1.x_coord,p2.x_coord,p3.x_coord,p4.x_coord)
+ local lly = min(p1.y_coord,p2.y_coord,p3.y_coord,p4.y_coord)
+ local urx = max(p1.x_coord,p2.x_coord,p3.x_coord,p4.x_coord)
+ local ury = max(p1.y_coord,p2.y_coord,p3.y_coord,p4.y_coord)
+ before[#before+1] = function()
+ context.MPLIBstartgroup(
+ gr_type.isolated and 1 or 0,
+ gr_type.knockout and 1 or 0,
+ llx, lly, urx, ury
+ )
+ end
+ elseif gr_state == "stop" then
+ after[#after+1] = function()
+ context.MPLIBstopgroup()
end
- object.path = false
- object.color = false
- object.grouped = true
end
+ object.path = false
+ object.color = false
+ object.grouped = true
end
-- outlines
diff --git a/tex/context/base/mkiv/mlib-pps.mkiv b/tex/context/base/mkiv/mlib-pps.mkiv
index 3a3ab2623..a2eb44826 100644
--- a/tex/context/base/mkiv/mlib-pps.mkiv
+++ b/tex/context/base/mkiv/mlib-pps.mkiv
@@ -161,12 +161,19 @@
\wd\scratchbox \dimexpr#5\onebasepoint-#3\onebasepoint+2\onebasepoint\relax
\ht\scratchbox #6\onebasepoint
\dp\scratchbox-#4\onebasepoint
+ \setbox\scratchbox\hpack\bgroup
+ \kern-#3\onebasepoint
+ \box\scratchbox
+ \egroup
\saveboxresource
- attr {/Group << /S /Transparency /I \ifnum#1=1 true \else false \fi /K \ifnum#1=1 true \else false \fi >>}
+ attr {/Group << /S /Transparency /I \ifnum#1=1 true \else false \fi /K \ifnum#2=1 true \else false \fi >>}
resources {\pdfbackendcurrentresources}
\scratchbox
- % \setbox\scratchbox\hbox\bgroup\kern-\onebasepoint\useboxresource\lastsavedboxresourceindex\egroup % why twice?
- \setbox\scratchbox\hpack\bgroup\kern-\onebasepoint\useboxresource\lastsavedboxresourceindex\egroup
+ \setbox\scratchbox\hpack\bgroup
+ \kern#3\onebasepoint
+ \kern-\onebasepoint
+ \useboxresource\lastsavedboxresourceindex
+ \egroup
\wd\scratchbox\zeropoint
\ht\scratchbox\zeropoint
\dp\scratchbox\zeropoint
diff --git a/tex/context/base/mkiv/mlib-run.lua b/tex/context/base/mkiv/mlib-run.lua
index 42fcdd26b..871889bbb 100644
--- a/tex/context/base/mkiv/mlib-run.lua
+++ b/tex/context/base/mkiv/mlib-run.lua
@@ -6,12 +6,12 @@ if not modules then modules = { } end modules ['mlib-run'] = {
license = "see context related readme files",
}
---~ cmyk -> done, native
---~ spot -> done, but needs reworking (simpler)
---~ multitone ->
---~ shade -> partly done, todo: cm
---~ figure -> done
---~ hyperlink -> low priority, easy
+-- cmyk -> done, native
+-- spot -> done, but needs reworking (simpler)
+-- multitone ->
+-- shade -> partly done, todo: cm
+-- figure -> done
+-- hyperlink -> low priority, easy
-- new * run
-- or
@@ -31,7 +31,8 @@ nears zero.</p>
local type, tostring, tonumber = type, tostring, tonumber
local format, gsub, match, find = string.format, string.gsub, string.match, string.find
-local concat = table.concat
+local concat, insert, remove = table.concat, table.insert, table.remove
+
local emptystring = string.is_empty
local P = lpeg.P
@@ -324,6 +325,46 @@ if not metapost.initializescriptrunner then
function metapost.initializescriptrunner() end
end
+do
+
+ local stack, top = { }, nil
+
+ function metapost.setvariable(k,v)
+ if top then
+ top[k] = v
+ else
+ metapost.variables[k] = v
+ end
+ end
+
+ function metapost.pushvariable(k)
+ local t = { }
+ if top then
+ insert(stack,top)
+ top[k] = t
+ else
+ metapost.variables[k] = t
+ end
+ top = t
+ end
+
+ function metapost.popvariable()
+ top = remove(stack)
+ end
+
+ local stack = { }
+
+ function metapost.pushvariables()
+ insert(stack,metapost.variables)
+ metapost.variables = { }
+ end
+
+ function metapost.popvariables()
+ metapost.variables = remove(stack) or metapost.variables
+ end
+
+end
+
function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass, askedfig)
local converted, result = false, { }
if type(mpx) == "string" then
@@ -332,6 +373,7 @@ function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass,
if mpx and data then
local tra = nil
starttiming(metapost)
+ metapost.variables = { }
metapost.initializescriptrunner(mpx,trialrun)
if trace_graphics then
tra = mp_tra[mpx]
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index 5996b9ac6..19abe1bcd 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -135,5 +135,7 @@ return {
"addbackground",
--
"shadedup", "shadeddown", "shadedleft", "shadedright",
+ --
+ "sortlist", "copylist", "shapedlist", "listtocurves", "listtolines", "listsize",
},
}
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index eec704b7f..860a4022a 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 390810d51..1579c2465 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/fonts/mkiv/type-imp-libertinus.mkiv b/tex/context/fonts/mkiv/type-imp-libertinus.mkiv
new file mode 100644
index 000000000..62da09e16
--- /dev/null
+++ b/tex/context/fonts/mkiv/type-imp-libertinus.mkiv
@@ -0,0 +1,82 @@
+%D \module
+%D [ file=type-imp-libertinus,
+%D version=2016.08.18,
+%D title=\CONTEXT\ Typescript Macros,
+%D subtitle=Libertine fonts,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This typescript (submitted by by Henri Menke) is a follow up on libertine
+%D which is no longer maintained cq.\ developed further.
+
+\starttypescriptcollection[libertinus]
+
+ \starttypescript [\s!serif] [libertinus]
+ \definefontsynonym [LibertinusSerif-Regular] [\s!file:libertinusserif-regular]
+ \definefontsynonym [LibertinusSerif-Italic] [\s!file:libertinusserif-italic]
+ \definefontsynonym [LibertinusSerif-Slanted] [\s!file:libertinusserif-italic]
+ \definefontsynonym [LibertinusSerif-Bold] [\s!file:libertinusserif-bold]
+ \definefontsynonym [LibertinusSerif-BoldItalic] [\s!file:libertinusserif-bolditalic]
+ \definefontsynonym [LibertinusSerif-BoldSlanted] [\s!file:libertinusserif-bolditalic]
+ \stoptypescript
+
+ \starttypescript [\s!serif] [libertinus] [\s!name]
+ \setups[\s!font:\s!fallback:\s!serif]
+ \definefontsynonym [\s!Serif] [LibertinusSerif-Regular] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifItalic] [LibertinusSerif-Italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifSlanted] [LibertinusSerif-Slanted] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBold] [LibertinusSerif-Bold] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBoldItalic] [LibertinusSerif-BoldItalic] [\s!features=\s!default]
+ \definefontsynonym [\s!SerifBoldSlanted] [LibertinusSerif-BoldSlanted] [\s!features=\s!default]
+ \definefontsynonym [SerifCaps] [LibertinusSerif-Regular] [\s!features=\s!smallcaps]
+ \stoptypescript
+
+ \starttypescript [\s!sans] [libertinus]
+ \setups[\s!font:\s!fallback:\s!sans]
+ \definefontsynonym [LibertinusSans-Regular] [\s!file:libertinussans-regular]
+ \definefontsynonym [LibertinusSans-Italic] [\s!file:libertinussans-italic]
+ \definefontsynonym [LibertinusSans-Slanted] [\s!file:libertinussans-italic]
+ \definefontsynonym [LibertinusSans-Bold] [\s!file:libertinussans-bold]
+ \definefontsynonym [LibertinusSans-BoldItalic] [\s!file:libertinussans-bold]
+ \definefontsynonym [LibertinusSans-BoldSlanted] [\s!file:libertinussans-bold]
+ \stoptypescript
+
+ \starttypescript [\s!sans] [libertinus] [\s!name]
+ \setups[\s!font:\s!fallback:\s!sans]
+ \definefontsynonym [\s!Sans] [LibertinusSans-Regular] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBold] [LibertinusSans-Bold] [\s!features=\s!default]
+ \definefontsynonym [\s!SansItalic] [LibertinusSans-Italic] [\s!features=\s!default]
+ \definefontsynonym [\s!SansSlanted] [LibertinusSans-Slanted] [\s!features=\s!default]
+ \definefontsynonym [\s!SansBoldItalic] [LibertinusSans-BoldSlanted] [\s!features=\s!default]
+ \definefontsynonym [SansCaps] [LibertinusSans-Regular] [\s!features=\s!smallcaps]
+ \stoptypescript
+
+ \starttypescript [\s!mono] [libertinus]
+ \setups[\s!font:\s!fallback:\s!mono]
+ \definefontsynonym [LibertinusMono-Regular] [\s!file:libertinusmono-regular]
+ \stoptypescript
+
+ \starttypescript [\s!mono] [libertinus] [\s!name]
+ \setups[\s!font:\s!fallback:\s!mono]
+ \definefontsynonym [\s!Mono] [LibertinusMono-Regular] [\s!features=\s!default]
+ \stoptypescript
+
+ \starttypescript [\s!math] [libertinus] [\s!name]
+ \definefontsynonym[\s!MathRoman ] [\s!file:libertinusmath-regular.otf] [\s!features=\s!math\mathsizesuffix]
+ \definefontsynonym[\s!MathRomanBold] [\s!file:libertinusmath-regular.otf] [\s!features=\s!math\mathsizesuffix]
+ \stoptypescript
+
+ \starttypescript [libertinus]
+ \definetypeface [libertinus] [\s!rm] [\s!serif] [libertinus] [\s!default]
+ \definetypeface [libertinus] [\s!ss] [\s!sans] [libertinus] [\s!default]
+ \definetypeface [libertinus] [\s!tt] [\s!mono] [libertinus] [\s!default]
+ \definetypeface [libertinus] [\s!mm] [\s!math] [libertinus] [\s!default]
+ \quittypescriptscanning
+ \stoptypescript
+
+\stoptypescriptcollection
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 0d8d8ebff..5e8c5a2aa 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 41d9f8067..1421fcdc0 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index f8e12f741..133c8ffaa 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 08/19/16 00:30:40
+-- merge date : 08/20/16 13:39:39
do -- begin closure to overcome local limits and interference
@@ -21577,9 +21577,11 @@ local function initializedevanagi(tfmdata)
local steps=sequence.steps
local nofsteps=sequence.nofsteps
local features=sequence.features
- if features["rphf"] then
+ local has_rphf=features.rphf
+ local has_blwf=features.blwf
+ if has_rphf and has_rphf.deva then
devanagari.reph=true
- elseif features["blwf"] then
+ elseif has_blwf and has_blwf.deva then
devanagari.vattu=true
for i=1,nofsteps do
local step=steps[i]
@@ -21593,57 +21595,61 @@ local function initializedevanagi(tfmdata)
end
end
end
- if valid[kind] then
- for i=1,nofsteps do
- local step=steps[i]
- local coverage=step.coverage
- if coverage then
- local reph=false
- if step.osdstep then
- for k,v in next,ra do
- local r=coverage[k]
- if r then
- local h=false
- for k,v in next,halant do
- local h=r[k]
- if h then
- reph=h.ligature or false
- break
+ for kind,spec in next,features do
+ if spec.dev2 and valid[kind] then
+ for i=1,nofsteps do
+ local step=steps[i]
+ local coverage=step.coverage
+ if coverage then
+ local reph=false
+ if kind=="rphf" then
+ if true then
+ for k,v in next,ra do
+ local r=coverage[k]
+ if r then
+ local h=false
+ for k,v in next,halant do
+ local h=r[k]
+ if h then
+ reph=h.ligature or false
+ break
+ end
+ end
+ if reph then
+ break
+ end
end
end
- if reph then
- break
- end
+ else
end
end
- else
+ seqsubset[#seqsubset+1]={ kind,coverage,reph }
end
- seqsubset[#seqsubset+1]={ kind,coverage,reph }
end
end
- end
- if kind=="pref" then
- local sequence=dataset[3]
- local steps=sequence.steps
- local nofsteps=sequence.nofsteps
- for i=1,nofsteps do
- local step=steps[i]
- local coverage=step.coverage
- if coverage then
- for k,v in next,halant do
- local h=coverage[k]
- if h then
- local found=false
- for k,v in next,h do
- found=v and v.ligature
+ if kind=="pref" then
+ local sequence=dataset[3]
+ local steps=sequence.steps
+ local nofsteps=sequence.nofsteps
+ for i=1,nofsteps do
+ local step=steps[i]
+ local coverage=step.coverage
+ if coverage then
+ for k,v in next,halant do
+ local h=coverage[k]
+ if h then
+ local found=false
+ for k,v in next,h do
+ found=v and v.ligature
+ if found then
+ pre_base_reordering_consonants[k]=found
+ break
+ end
+ end
if found then
- pre_base_reordering_consonants[k]=found
break
end
end
- if found then
- break
- end
end
end
end
@@ -22030,6 +22036,8 @@ function handlers.devanagari_reorder_matras(head,start)
start=startnext
break
end
+ else
+ break
end
current=next
end
@@ -22042,12 +22050,12 @@ function handlers.devanagari_reorder_reph(head,start)
local startfont=getfont(start)
local startattr=getprop(start,a_syllabe)
while current do
- local char=ischar(current,font)
+ local char=ischar(current,startfont)
if char and getprop(current,a_syllabe)==startattr then
if halant[char] and not getprop(current,a_state) then
local next=getnext(current)
if next then
- local nextchar=ischar(next,font)
+ local nextchar=ischar(next,startfont)
if nextchar and zw_char[nextchar] and getprop(next,a_syllabe)==startattr then
current=next
next=getnext(current)
@@ -22069,7 +22077,7 @@ function handlers.devanagari_reorder_reph(head,start)
if not startnext then
current=getnext(start)
while current do
- local char=ischar(current,font)
+ local char=ischar(current,startfont)
if char and getprop(current,a_syllabe)==startattr then
if getprop(current,a_state)==s_pstf then
startnext=getnext(start)
@@ -22091,7 +22099,7 @@ function handlers.devanagari_reorder_reph(head,start)
current=getnext(start)
local c=nil
while current do
- local char=ischar(current,font)
+ local char=ischar(current,startfont)
if char and getprop(current,a_syllabe)==startattr then
if not c and mark_above_below_post[char] and reorder_class[char]~="after subscript" then
c=current
@@ -22115,7 +22123,7 @@ function handlers.devanagari_reorder_reph(head,start)
current=start
local next=getnext(current)
while next do
- local nextchar=ischar(next,font)
+ local nextchar=ischar(next,startfont)
if nextchar and getprop(next,a_syllabe)==startattr then
current=next
next=getnext(current)
@@ -22128,7 +22136,7 @@ function handlers.devanagari_reorder_reph(head,start)
head=remove_node(head,start)
local next=getnext(current)
setlink(start,next)
- setlink(current,"next",start)
+ setlink(current,start)
start=startnext
end
end
@@ -22141,12 +22149,12 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start)
local startfont=getfont(start)
local startattr=getprop(start,a_syllabe)
while current do
- local char=ischar(current,font)
+ local char=ischar(current,startfont)
if char and getprop(current,a_syllabe)==startattr then
local next=getnext(current)
if halant[char] and not getprop(current,a_state) then
if next then
- local nextchar=ischar(next,font)
+ local nextchar=ischar(next,startfont)
if nextchar and getprop(next,a_syllabe)==startattr then
if nextchar==c_zwnj or nextchar==c_zwj then
current=next
@@ -22170,13 +22178,13 @@ function handlers.devanagari_reorder_pre_base_reordering_consonants(head,start)
current=getnext(start)
startattr=getprop(start,a_syllabe)
while current do
- local char=ischar(current,font)
+ local char=ischar(current,startfont)
if char and getprop(current,a_syllabe)==startattr then
if not consonant[char] and getprop(current,a_state) then
startnext=getnext(start)
removenode(start,start)
local prev=getprev(current)
- setlink(start,prev)
+ setlink(prev,start)
setlink(start,current)
start=startnext
break
@@ -22236,21 +22244,7 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces)
local kind=subset[1]
local lookupcache=subset[2]
if kind=="rphf" then
- for k,v in next,ra do
- local r=lookupcache[k]
- if r then
- for k,v in next,halant do
- local h=r[k]
- if h then
- reph=h.ligature or false
- break
- end
- end
- if reph then
- break
- end
- end
- end
+ reph=subset[3]
local current=start
local last=getnext(stop)
while current~=last do
@@ -22283,7 +22277,7 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces)
if current~=stop then
local c=locl[current] or getchar(current)
local found=lookupcache[c]
- if found then
+ if found then
local next=getnext(current)
local n=locl[next] or getchar(next)
if found[n] then
@@ -22510,7 +22504,7 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces)
local prev=getprev(current)
if prev~=target then
local next=getnext(current)
- setlink(next,prev)
+ setlink(prev,next)
if current==stop then
stop=prev
end
@@ -22541,7 +22535,7 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces)
stop=current
end
local prev=getprev(c)
- setlink(next,prev)
+ setlink(prev,next)
local nextnext=getnext(next)
setnext(current,nextnext)
local nextnextnext=getnext(nextnext)
@@ -22554,6 +22548,9 @@ local function dev2_reorder(head,start,stop,font,attr,nbspaces)
current=getnext(current)
end
if getchar(base)==c_nbsp then
+ if base==stop then
+ stop=getprev(stop)
+ end
nbspaces=nbspaces-1
head=remove_node(head,base)
flush_node(base)
@@ -22595,7 +22592,7 @@ local function analyze_next_chars_one(c,font,variant)
elseif (vv==c_zwnj or vv==c_zwj) and halant[vvv] then
local nnnn=getnext(nnn)
if nnnn then
- local vvvv=ischar(nnnn)
+ local vvvv=ischar(nnnn,font)
if vvvv and consonant[vvvv] then
c=nnnn
end
@@ -22618,7 +22615,7 @@ local function analyze_next_chars_one(c,font,variant)
local nn=getnext(n)
if nn then
local vv=ischar(nn,font)
- if vv and zw_char[vv] then
+ if vv and zw_char[v] then
n=nn
v=vv
nn=getnext(nn)