summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin845151 -> 845153 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin843045 -> 843045 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin848082 -> 848082 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin841722 -> 841724 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin843462 -> 843463 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin840156 -> 840156 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin840226 -> 840226 bytes
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-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-otc.lua4
-rw-r--r--tex/context/base/mkiv/font-ots.lua540
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25748 -> 25737 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin426330 -> 426329 bytes
-rw-r--r--tex/context/base/mkiv/typo-del.mkiv5
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin848082 -> 848082 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60776 -> 60775 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua62
19 files changed, 131 insertions, 488 deletions
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index 366ccf4e8..049663729 100644
--- a/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf
index 1aed3fa0c..3f73b99d5 100644
--- a/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf
index 69d91f3b8..d17766ff4 100644
--- a/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf
index 5262bd8ba..96d700203 100644
--- a/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf
index 9493ca08f..1420f239a 100644
--- a/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf
index eaeeb579c..dd8c3332f 100644
--- a/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf
index 08f62856b..66a2ea026 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index e6208bc86..880455076 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.27 16:17}
+\newcontextversion{2017.07.28 14:24}
%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 6008167a6..95fcbcf12 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.27 16:17}
+\edef\contextversion{2017.07.28 14:24}
%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 267ff3ec2..d61494b97 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.27 16:17}
+\newcontextversion{2017.07.28 14:24}
%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 4a629c6f1..993294a98 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.27 16:17}
+\edef\contextversion{2017.07.28 14:24}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-otc.lua b/tex/context/base/mkiv/font-otc.lua
index 4a26820f3..4cc352669 100644
--- a/tex/context/base/mkiv/font-otc.lua
+++ b/tex/context/base/mkiv/font-otc.lua
@@ -462,10 +462,10 @@ local function addfeature(data,feature,specifications)
subtype = lookup.type
end
else
- lookups[k] = false -- new
+ lookups[k] = { false } -- new
end
else
- lookups[k] = false -- new
+ lookups[k] = { false } -- new
end
end
end
diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua
index 1dca8962c..05ad91be2 100644
--- a/tex/context/base/mkiv/font-ots.lua
+++ b/tex/context/base/mkiv/font-ots.lua
@@ -218,6 +218,7 @@ local count_components = nuts.count_components
local copy_no_components = nuts.copy_no_components
local copy_only_glyphs = nuts.copy_only_glyphs
+local setmetatable = setmetatable
local setmetatableindex = table.setmetatableindex
----- zwnj = 0x200C
@@ -276,6 +277,7 @@ local threshold = 0
local checkmarks = false
local discs = false
+local spaces = false
local sweepnode = nil
local sweephead = { } -- we don't nil entries but false them (no collection and such)
@@ -1850,7 +1852,6 @@ local function chainrun(head,start,last,dataset,sequence,rlmode,ck,skipped)
-- current match
if chainlookups then
-
-- Lookups can be like { 1, false, 3 } or { false, 2 } or basically anything and
-- #lookups can be less than #current
@@ -2319,470 +2320,9 @@ local function chaintrac(head,start,dataset,sequence,rlmode,ck,skipped,match)
cref(dataset,sequence),rule,match and "matches" or "nomatch",gref(char),first-1,last-first+1,nofseq-last,lookuptype)
end
--- local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
--- local sweepnode = sweepnode
--- local sweeptype = sweeptype
--- local currentfont = currentfont
--- local diskseen = false
--- local checkdisc = sweeptype and getprev(head)
--- local flags = sequence.flags or noflags
--- local done = false
--- local skipmark = flags[1]
--- local skipligature = flags[2]
--- local skipbase = flags[3]
--- local markclass = sequence.markclass
--- local skipped = false
--- local startprev,
--- startnext = getboth(start)
---
--- for k=1,#contexts do -- i've only seen ccmp having > 1 (e.g. dejavu)
--- local match = true
--- local current = start
--- local last = start
--- local ck = contexts[k]
--- local seq = ck[3]
--- local s = #seq
--- local size = 1
--- -- f..l = mid string
--- if s == 1 then
--- -- this seldom happens as it makes no sense (bril, ebgaramond, husayni, minion)
--- local char = ischar(current,currentfont)
--- if char then
--- if not seq[1][char] then
--- match = false
--- end
--- end
--- else
--- -- maybe we need a better space check (maybe check for glue or category or combination)
--- -- we cannot optimize for n=2 because there can be disc nodes
--- local f = ck[4]
--- local l = ck[5]
--- -- current match
--- -- seq[f][ischar(current,currentfont)] is not nil
--- size = l - f + 1
--- if size > 1 then
--- -- before/current/after | before/current | current/after
--- local discfound -- = nil
--- local n = f + 1
--- -- last = getnext(last) -- the second in current (first already matched)
--- last = startnext -- the second in current (first already matched)
--- while n <= l do
--- if not last and (sweeptype == "post" or sweeptype == "replace") then
--- last = getnext(sweepnode)
--- sweeptype = nil
--- end
--- if last then
--- local char, id = ischar(last,currentfont)
--- if char then
--- local class = classes[char]
--- if class then
--- if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
--- skipped = true
--- if trace_skips then
--- show_skip(dataset,sequence,char,ck,class)
--- end
--- last = getnext(last)
--- elseif seq[n][char] then
--- if n < l then
--- last = getnext(last)
--- end
--- n = n + 1
--- else
--- if discfound then
--- notmatchreplace[discfound] = true
--- if notmatchpre[discfound] then
--- match = false
--- end
--- else
--- match = false
--- end
--- break
--- end
--- else
--- -- can this happen
--- if discfound then
--- notmatchreplace[discfound] = true
--- if notmatchpre[discfound] then
--- match = false
--- end
--- else
--- match = false
--- end
--- break
--- end
--- elseif char == false then
--- if discfound then
--- notmatchreplace[discfound] = true
--- if notmatchpre[discfound] then
--- match = false
--- end
--- else
--- match = false
--- end
--- break
--- elseif id == disc_code then
--- diskseen = true
--- discfound = last
--- notmatchpre[last] = nil
--- notmatchpost[last] = true
--- notmatchreplace[last] = nil
--- local pre, post, replace = getdisc(last)
--- if pre then
--- local n = n
--- while pre do
--- if seq[n][getchar(pre)] then
--- n = n + 1
--- pre = getnext(pre)
--- if n > l then
--- break
--- end
--- else
--- notmatchpre[last] = true
--- break
--- end
--- end
--- if n <= l then
--- notmatchpre[last] = true
--- end
--- else
--- notmatchpre[last] = true
--- end
--- if replace then
--- -- so far we never entered this branch
--- while replace do
--- if seq[n][getchar(replace)] then
--- n = n + 1
--- replace = getnext(replace)
--- if n > l then
--- break
--- end
--- else
--- notmatchreplace[last] = true
--- if notmatchpre[last] then
--- match = false
--- end
--- break
--- end
--- end
--- -- why here again
--- if notmatchpre[last] then
--- match = false
--- end
--- end
--- -- maybe only if match
--- last = getnext(last)
--- else
--- match = false
--- break
--- end
--- else
--- match = false
--- break
--- end
--- end
--- end
--- -- before
--- if match and f > 1 then
--- -- local prev = getprev(start)
--- -- if prev then
--- if startprev then
--- local prev = startprev
--- if prev == checkdisc and (sweeptype == "pre" or sweeptype == "replace") then
--- prev = getprev(sweepnode)
--- -- sweeptype = nil
--- end
--- if prev then
--- local discfound -- = nil
--- local n = f - 1
--- while n >= 1 do
--- if prev then
--- local char, id = ischar(prev,currentfont)
--- if char then
--- local class = classes[char]
--- if class then
--- if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
--- skipped = true
--- if trace_skips then
--- show_skip(dataset,sequence,char,ck,class)
--- end
--- prev = getprev(prev)
--- elseif seq[n][char] then
--- if n > 1 then
--- prev = getprev(prev)
--- end
--- n = n - 1
--- else
--- if discfound then
--- notmatchreplace[discfound] = true
--- if notmatchpost[discfound] then
--- match = false
--- end
--- else
--- match = false
--- end
--- break
--- end
--- else
--- -- can this happen
--- if discfound then
--- notmatchreplace[discfound] = true
--- if notmatchpost[discfound] then
--- match = false
--- end
--- else
--- match = false
--- end
--- break
--- end
--- elseif char == false then
--- if discfound then
--- notmatchreplace[discfound] = true
--- if notmatchpost[discfound] then
--- match = false
--- end
--- else
--- match = false
--- end
--- break
--- elseif id == disc_code then
--- -- the special case: f i where i becomes dottless i ..
--- diskseen = true
--- discfound = prev
--- notmatchpre[prev] = true
--- notmatchpost[prev] = nil
--- notmatchreplace[prev] = nil
--- local pre, post, replace, pretail, posttail, replacetail = getdisc(prev,true)
--- if pre ~= start and post ~= start and replace ~= start then
--- if post then
--- local n = n
--- while posttail do
--- if seq[n][getchar(posttail)] then
--- n = n - 1
--- if posttail == post then
--- break
--- else
--- posttail = getprev(posttail)
--- if n < 1 then
--- break
--- end
--- end
--- else
--- notmatchpost[prev] = true
--- break
--- end
--- end
--- if n >= 1 then
--- notmatchpost[prev] = true
--- end
--- else
--- notmatchpost[prev] = true
--- end
--- if replace then
--- -- we seldom enter this branch (e.g. on brill efficient)
--- while replacetail do
--- if seq[n][getchar(replacetail)] then
--- n = n - 1
--- if replacetail == replace then
--- break
--- else
--- replacetail = getprev(replacetail)
--- if n < 1 then
--- break
--- end
--- end
--- else
--- notmatchreplace[prev] = true
--- if notmatchpost[prev] then
--- match = false
--- end
--- break
--- end
--- end
--- if not match then
--- break
--- end
--- end
--- end
--- -- maybe only if match
--- prev = getprev(prev)
--- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then
--- n = n - 1
--- prev = getprev(prev)
--- else
--- match = false
--- break
--- end
--- else
--- match = false
--- break
--- end
--- end
--- else
--- match = false
--- end
--- else
--- match = false
--- end
--- end
--- -- after
--- if match and s > l then
--- local current = last and getnext(last)
--- if not current and (sweeptype == "post" or sweeptype == "replace") then
--- current = getnext(sweepnode)
--- -- sweeptype = nil
--- end
--- if current then
--- local discfound -- = nil
--- -- removed optimization for s-l == 1, we have to deal with marks anyway
--- local n = l + 1
--- while n <= s do
--- if current then
--- local char, id = ischar(current,currentfont)
--- if char then
--- local class = classes[char]
--- if class then
--- if class == skipmark or class == skipligature or class == skipbase or (markclass and class == "mark" and not markclass[char]) then
--- skipped = true
--- if trace_skips then
--- show_skip(dataset,sequence,char,ck,class)
--- end
--- current = getnext(current) -- was absent
--- elseif seq[n][char] then
--- if n < s then -- new test
--- current = getnext(current) -- was absent
--- end
--- n = n + 1
--- else
--- if discfound then
--- notmatchreplace[discfound] = true
--- if notmatchpre[discfound] then
--- match = false
--- end
--- else
--- match = false
--- end
--- break
--- end
--- else
--- -- can this happen
--- if discfound then
--- notmatchreplace[discfound] = true
--- if notmatchpre[discfound] then
--- match = false
--- end
--- else
--- match = false
--- end
--- break
--- end
--- elseif char == false then
--- if discfound then
--- notmatchreplace[discfound] = true
--- if notmatchpre[discfound] then
--- match = false
--- end
--- else
--- match = false
--- end
--- break
--- elseif id == disc_code then
--- diskseen = true
--- discfound = current
--- notmatchpre[current] = nil
--- notmatchpost[current] = true
--- notmatchreplace[current] = nil
--- local pre, post, replace = getdisc(current)
--- if pre then
--- local n = n
--- while pre do
--- if seq[n][getchar(pre)] then
--- n = n + 1
--- pre = getnext(pre)
--- if n > s then
--- break
--- end
--- else
--- notmatchpre[current] = true
--- break
--- end
--- end
--- if n <= s then
--- notmatchpre[current] = true
--- end
--- else
--- notmatchpre[current] = true
--- end
--- if replace then
--- -- so far we never entered this branch
--- while replace do
--- if seq[n][getchar(replace)] then
--- n = n + 1
--- replace = getnext(replace)
--- if n > s then
--- break
--- end
--- else
--- notmatchreplace[current] = true
--- -- different than others, needs checking if "not" is okay
--- if not notmatchpre[current] then
--- match = false
--- end
--- break
--- end
--- end
--- if not match then
--- break
--- end
--- else
--- -- skip 'm
--- end
--- current = getnext(current)
--- elseif id == glue_code and seq[n][32] and isspace(current,threshold,id) then
--- n = n + 1
--- current = getnext(current)
--- else
--- match = false
--- break
--- end
--- else
--- match = false
--- break
--- end
--- end
--- else
--- match = false
--- end
--- end
--- end
--- if match then
--- if trace_contexts then
--- chaintrac(head,start,dataset,sequence,rlmode,ck,skipped,true)
--- end
--- if diskseen or sweepnode then
--- head, start, done = chaindisk(head,start,dataset,sequence,rlmode,ck,skipped)
--- else
--- head, start, done = chainrun(head,start,last,dataset,sequence,rlmode,ck,skipped)
--- end
--- if done then
--- break
--- else
--- -- next context
--- end
--- -- elseif trace_chains then
--- -- chaintrac(head,start,dataset,sequence,rlmode,ck,skipped,match)
--- end
--- end
--- if diskseen then
--- notmatchpre = { }
--- notmatchpost = { }
--- notmatchreplace = { }
--- end
--- return head, start, done
--- end
-
--- a bit optimized but still somewhat slow, fonts like ebgaramong are real torture tests because they
--- have many steps with one context (having multiple contexts makes more sense) also because we (can)
--- reduce them
+-- The next one is quite optimized but still somewhat slow, fonts like ebgaramond are real torture
+-- tests because they have many steps with one context (having multiple contexts makes more sense)
+-- also because we (can) reduce them.
local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
local sweepnode = sweepnode
@@ -3076,7 +2616,19 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
end
-- maybe only if match
prev = getprev(prev)
- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then
+ -- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then
+ -- n = n - 1
+ -- prev = getprev(prev)
+ elseif id == glue_code then
+ local sn = seq[n]
+ if (sn[32] and spaces[prev]) or sn[0xFFFC] then
+ n = n - 1
+ prev = getprev(prev)
+ else
+ match = false
+ break
+ end
+ elseif seq[n][0xFFFC] then
n = n - 1
prev = getprev(prev)
else
@@ -3213,7 +2765,19 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
-- skip 'm
end
current = getnext(current)
- elseif id == glue_code and seq[n][32] and isspace(current,threshold,id) then
+ -- elseif id == glue_code and seq[n][32] and isspace(current,threshold,id) then
+ -- n = n + 1
+ -- current = getnext(current)
+ elseif id == glue_code then
+ local sn = seq[n]
+ if (sn[32] and spaces[current]) or sn[0xFFFC] then
+ n = n + 1
+ current = getnext(current)
+ else
+ match = false
+ break
+ end
+ elseif seq[n][0xFFFC] then
n = n + 1
current = getnext(current)
else
@@ -3565,7 +3129,19 @@ local function optimized_handle_contextchain(head,start,dataset,sequence,context
end
end
prev = getprev(prev)
- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then
+ -- elseif id == glue_code and seq[n][32] and isspace(prev,threshold,id) then
+ -- elseif seq[n][32] and spaces[prev] then
+ -- n = n - 1
+ -- prev = getprev(prev)
+ elseif id == glue_code then
+ local sn = seq[n]
+ if (sn[32] and spaces[prev]) or sn[0xFFFC] then
+ n = n - 1
+ prev = getprev(prev)
+ else
+ goto next
+ end
+ elseif seq[n][0xFFFC] then
n = n - 1
prev = getprev(prev)
else
@@ -3698,7 +3274,19 @@ local function optimized_handle_contextchain(head,start,dataset,sequence,context
-- skip 'm
end
current = getnext(current)
- elseif id == glue_code and seq[n][32] and isspace(current,threshold,id) then
+ -- elseif id == glue_code and seq[n][32] and isspace(current,threshold,id) then
+ -- elseif seq[n][32] and spaces[current] then
+ -- n = n + 1
+ -- current = getnext(current)
+ elseif id == glue_code then
+ local sn = seq[n]
+ if (sn[32] and spaces[current]) or sn[0xFFFC] then
+ n = n + 1
+ current = getnext(current)
+ else
+ goto next
+ end
+ elseif seq[n][0xFFFC] then
n = n + 1
current = getnext(current)
else
@@ -4877,11 +4465,18 @@ do
local otfdataset = nil -- todo: make an installer
- local getfastdics = function(t,k)
+ local getfastdisc = { __index = function(t,k)
local v = usesfont(k,currentfont)
t[k] = v
return v
- end
+ end }
+
+ local getfastspace = { __index = function(t,k)
+ -- we don't pass the id so that one can overload isspace
+ local v = isspace(k,threshold) or false
+ t[k] = v
+ return v
+ end }
function otf.featuresprocessor(head,font,attr,direction,n)
@@ -4905,7 +4500,8 @@ do
otfdataset = otf.dataset
end
- discs = fastdisc and n and n > 1 and setmetatableindex(getfastdisc) -- maybe inline
+ discs = fastdisc and n and n > 1 and setmetatable({},getfastdisc) -- maybe inline
+ spaces = setmetatable({},getfastspace)
elseif currentfont ~= font then
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 8d30534bd..6f0818b2f 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 7a271febb..9660f03aa 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/base/mkiv/typo-del.mkiv b/tex/context/base/mkiv/typo-del.mkiv
index b7ebb28d9..afd446258 100644
--- a/tex/context/base/mkiv/typo-del.mkiv
+++ b/tex/context/base/mkiv/typo-del.mkiv
@@ -648,6 +648,11 @@
\typo_delimited_right_symbol#1%
\egroup}
+\appendtoks
+ \localleftbox {}%
+ \localrightbox{}%
+\to \everyforgetall
+
% \starttext
% \hyphenatedword{groepsvrijstellingsverordeningen}\par
% \hyphenatedword{\quote{groepsvrijstellingsverordeningen}}\par
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 69d91f3b8..d17766ff4 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 11502611e..793b99c47 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 f2d897b64..c7657853b 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 : 07/27/17 16:17:50
+-- merge date : 07/28/17 14:24:44
do -- begin closure to overcome local limits and interference
@@ -22535,6 +22535,7 @@ local take_components=nuts.take_components
local count_components=nuts.count_components
local copy_no_components=nuts.copy_no_components
local copy_only_glyphs=nuts.copy_only_glyphs
+local setmetatable=setmetatable
local setmetatableindex=table.setmetatableindex
local nodecodes=nodes.nodecodes
local glyphcodes=nodes.glyphcodes
@@ -22575,6 +22576,7 @@ local factor=0
local threshold=0
local checkmarks=false
local discs=false
+local spaces=false
local sweepnode=nil
local sweephead={}
local notmatchpre={}
@@ -24598,7 +24600,16 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
end
end
prev=getprev(prev)
- elseif id==glue_code and seq[n][32] and isspace(prev,threshold,id) then
+ elseif id==glue_code then
+ local sn=seq[n]
+ if (sn[32] and spaces[prev]) or sn[0xFFFC] then
+ n=n-1
+ prev=getprev(prev)
+ else
+ match=false
+ break
+ end
+ elseif seq[n][0xFFFC] then
n=n-1
prev=getprev(prev)
else
@@ -24730,7 +24741,16 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
else
end
current=getnext(current)
- elseif id==glue_code and seq[n][32] and isspace(current,threshold,id) then
+ elseif id==glue_code then
+ local sn=seq[n]
+ if (sn[32] and spaces[current]) or sn[0xFFFC] then
+ n=n+1
+ current=getnext(current)
+ else
+ match=false
+ break
+ end
+ elseif seq[n][0xFFFC] then
n=n+1
current=getnext(current)
else
@@ -25057,7 +25077,15 @@ local function optimized_handle_contextchain(head,start,dataset,sequence,context
end
end
prev=getprev(prev)
- elseif id==glue_code and seq[n][32] and isspace(prev,threshold,id) then
+ elseif id==glue_code then
+ local sn=seq[n]
+ if (sn[32] and spaces[prev]) or sn[0xFFFC] then
+ n=n-1
+ prev=getprev(prev)
+ else
+ goto next
+ end
+ elseif seq[n][0xFFFC] then
n=n-1
prev=getprev(prev)
else
@@ -25184,7 +25212,15 @@ local function optimized_handle_contextchain(head,start,dataset,sequence,context
else
end
current=getnext(current)
- elseif id==glue_code and seq[n][32] and isspace(current,threshold,id) then
+ elseif id==glue_code then
+ local sn=seq[n]
+ if (sn[32] and spaces[current]) or sn[0xFFFC] then
+ n=n+1
+ current=getnext(current)
+ else
+ goto next
+ end
+ elseif seq[n][0xFFFC] then
n=n+1
current=getnext(current)
else
@@ -25895,11 +25931,16 @@ do
local fastdisc=true
directives.register("otf.fastdisc",function(v) fastdisc=v end)
local otfdataset=nil
- local getfastdics=function(t,k)
+ local getfastdisc={ __index=function(t,k)
local v=usesfont(k,currentfont)
t[k]=v
return v
- end
+ end }
+ local getfastspace={ __index=function(t,k)
+ local v=isspace(k,threshold) or false
+ t[k]=v
+ return v
+ end }
function otf.featuresprocessor(head,font,attr,direction,n)
local sequences=sequencelists[font]
nesting=nesting+1
@@ -25917,7 +25958,8 @@ do
if not otfdataset then
otfdataset=otf.dataset
end
- discs=fastdisc and n and n>1 and setmetatableindex(getfastdisc)
+ discs=fastdisc and n and n>1 and setmetatable({},getfastdisc)
+ spaces=setmetatable({},getfastspace)
elseif currentfont~=font then
report_warning("nested call with a different font, level %s, quitting",nesting)
nesting=nesting-1
@@ -29255,10 +29297,10 @@ local function addfeature(data,feature,specifications)
subtype=lookup.type
end
else
- lookups[k]=false
+ lookups[k]={ false }
end
else
- lookups[k]=false
+ lookups[k]={ false }
end
end
end