summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4212 -> 4204 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-mps.lua22
-rw-r--r--tex/context/base/font-ots.lua7
-rw-r--r--tex/context/base/font-oup.lua178
-rw-r--r--tex/context/base/math-noa.lua16
-rw-r--r--tex/context/base/meta-imp-outlines.mkiv6
-rw-r--r--tex/context/base/status-files.pdfbin24387 -> 24374 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin254527 -> 254528 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
11 files changed, 123 insertions, 112 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index dfc4086d7..c211c1c4d 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.07.12 15:40}
+\newcontextversion{2015.07.12 23:30}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 6f6fed9ac..63e8b04f3 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 7f33e9629..34b39aa35 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.07.12 15:40}
+\edef\contextversion{2015.07.12 23:30}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/font-mps.lua b/tex/context/base/font-mps.lua
index 1465b475b..0cb07bbb8 100644
--- a/tex/context/base/font-mps.lua
+++ b/tex/context/base/font-mps.lua
@@ -21,9 +21,9 @@ fonts = fonts or { }
local metapost = fonts.metapost or { }
fonts.metapost = metapost
-local f_moveto = formatters["(%.4G,%.4G)"]
-local f_lineto = formatters["--(%.4G,%.4G)"]
-local f_curveto = formatters["..controls(%.4G,%.4G)and(%.4G,%.4G)..(%.4G,%.4G)"]
+local f_moveto = formatters["(%.4F,%.4F)"]
+local f_lineto = formatters["--(%.4F,%.4F)"]
+local f_curveto = formatters["..controls(%.4F,%.4F)and(%.4F,%.4F)..(%.4F,%.4F)"]
local s_cycle = "--cycle"
local f_nofill = formatters["nofill %s;"]
@@ -32,8 +32,8 @@ local f_dofill = formatters["fill %s;"]
local f_draw_trace = formatters["drawpathonly %s;"]
local f_draw = formatters["draw %s;"]
-local f_boundingbox = formatters["((%.4G,%.4G)--(%.4G,%.4G)--(%.4G,%.4G)--(%.4G,%.4G)--cycle)"]
-local f_vertical = formatters["((%.4G,%.4G)--(%.4G,%.4G))"]
+local f_boundingbox = formatters["((%.4F,%.4F)--(%.4F,%.4F)--(%.4F,%.4F)--(%.4F,%.4F)--cycle)"]
+local f_vertical = formatters["((%.4F,%.4F)--(%.4F,%.4F))"]
function metapost.boundingbox(d,factor)
local bounds = d.boundingbox
@@ -254,7 +254,7 @@ local characters = fonts.hashes.characters
local shapes = fonts.hashes.shapes
local topaths = fonts.metapost.paths
-local f_code = formatters["mfun_do_outline_text_flush(%q,%i,%.4G,%.4G)(%,t);"]
+local f_code = formatters["mfun_do_outline_text_flush(%q,%i,%.4F,%.4F)(%,t);"]
local s_nothing = "(origin scaled 10)"
local sc = 10
@@ -334,7 +334,9 @@ function fonts.metapost.boxtomp(n,kind)
advance = a + current.width * fc
elseif id == vlist_code then
boxtomp(current) -- ,distance + (shift or 0),current.glue_set*current.glue_sign)
- else -- todo: rule
+ elseif id == rule_code then
+ -- todo
+ else
-- print("horizontal >>>",nodecodes[id])
end
current = current.next
@@ -369,9 +371,15 @@ function fonts.metapost.boxtomp(n,kind)
else
vertical(current,shift)
end
+result[#result+1] = formatters["setbounds currentpicture to %s;"] ( metapost.boundingbox (
+ { boundingbox = { 0, -list.depth, list.width, list.height } },
+ fc
+) )
end
end
+ -- todo: honor struts / ht dp
+
local box = tex.box[n]
boxtomp(box,box.shift,box.glue_sign,box.glue_set,box.glue_order)
return concat(result)
diff --git a/tex/context/base/font-ots.lua b/tex/context/base/font-ots.lua
index 7a650025a..827413f42 100644
--- a/tex/context/base/font-ots.lua
+++ b/tex/context/base/font-ots.lua
@@ -2165,7 +2165,7 @@ handlers.gsub_reversecontextchain = handle_contextchain
handlers.gpos_contextchain = handle_contextchain
handlers.gpos_context = handle_contextchain
-local missing = { } -- we only report once
+local missing = setmetatableindex("table")
local function logprocess(...)
if trace_steps then
@@ -2177,10 +2177,9 @@ end
local logwarning = report_process
local function report_missing_cache(dataset,sequence)
- local f = missing[currentfont] if not f then f = { } missing[currentfont] = f end
- local t = f[typ] if not t then t = { } f[typ] = t end
+ local t = missing[currentfont]
if not t[sequence] then
- t[seqence] = true
+ t[sequence] = true
logwarning("missing cache for feature %a, lookup %a, type %a, font %a, name %a",
dataset[4],sequence.name,sequence.type,currentfont,tfmdata.properties.fullname)
end
diff --git a/tex/context/base/font-oup.lua b/tex/context/base/font-oup.lua
index e07bd6d05..e4b433bc6 100644
--- a/tex/context/base/font-oup.lua
+++ b/tex/context/base/font-oup.lua
@@ -1132,7 +1132,7 @@ function readers.pack(data)
end
end
end
- elseif kind == "gpos_mark2base" or kind == "gpos_mark2mark" or kind == "gpos_mark2ligature" then
+-- elseif kind == "gpos_mark2base" or kind == "gpos_mark2mark" or kind == "gpos_mark2ligature" then
-- local c = step.baseclasses
-- for k, v in next, c do
-- c[k] = pack_normal(v)
@@ -1817,101 +1817,103 @@ function readers.expand(data)
end
end
end
- if sequences then
- -- we also need to do sublookups
- for i=1,#sequences do
- local sequence = sequences[i]
- local steps = sequence.steps
- if steps then
- local kind = sequence.type
- local markclass = sequence.markclass
- if markclass then
- if not markclasses then
- report_warning("missing markclasses")
- sequence.markclass = false
- else
- sequence.markclass = markclasses[markclass]
- end
- end
- for i=1,sequence.nofsteps do
- local step = steps[i]
- local baseclasses = step.baseclasses
- if baseclasses then
- local coverage = step.coverage
- for k, v in next, coverage do
--- v[1] = baseclasses[v[2]] -- slot 1 is a placeholder
- v[1] = baseclasses[v[1]]
- end
- elseif kind == "gpos_cursive" then
- local coverage = step.coverage
- for k, v in next, coverage do
- v[1] = coverage -- slot 1 is a placeholder
+ local function expandlookups(sequences)
+ if sequences then
+ -- we also need to do sublookups
+ for i=1,#sequences do
+ local sequence = sequences[i]
+ local steps = sequence.steps
+ if steps then
+ local kind = sequence.type
+ local markclass = sequence.markclass
+ if markclass then
+ if not markclasses then
+ report_warning("missing markclasses")
+ sequence.markclass = false
+ else
+ sequence.markclass = markclasses[markclass]
end
end
- local rules = step.rules
- if rules then
- local rulehash = { }
- local rulesize = 0
- local coverage = { }
- local lookuptype = sequence.type
- step.coverage = coverage -- combined hits
- for nofrules=1,#rules do
- local rule = rules[nofrules]
- local current = rule.current
- local before = rule.before
- local after = rule.after
- local replacements = rule.replacements
- local sequence = { }
- local nofsequences = 0
- if before then
- for n=1,#before do
- nofsequences = nofsequences + 1
- sequence[nofsequences] = before[n]
- end
+ for i=1,sequence.nofsteps do
+ local step = steps[i]
+ local baseclasses = step.baseclasses
+ if baseclasses then
+ local coverage = step.coverage
+ for k, v in next, coverage do
+ -- v[1] = baseclasses[v[2]] -- slot 1 is a placeholder
+ v[1] = baseclasses[v[1]]
end
- local start = nofsequences + 1
- for n=1,#current do
- nofsequences = nofsequences + 1
- sequence[nofsequences] = current[n]
+ elseif kind == "gpos_cursive" then
+ local coverage = step.coverage
+ for k, v in next, coverage do
+ v[1] = coverage -- slot 1 is a placeholder
end
- local stop = nofsequences
- if after then
- for n=1,#after do
+ end
+ local rules = step.rules
+ if rules then
+ local rulehash = { }
+ local rulesize = 0
+ local coverage = { }
+ local lookuptype = sequence.type
+ step.coverage = coverage -- combined hits
+ for nofrules=1,#rules do
+ local rule = rules[nofrules]
+ local current = rule.current
+ local before = rule.before
+ local after = rule.after
+ local replacements = rule.replacements
+ local sequence = { }
+ local nofsequences = 0
+ if before then
+ for n=1,#before do
+ nofsequences = nofsequences + 1
+ sequence[nofsequences] = before[n]
+ end
+ end
+ local start = nofsequences + 1
+ for n=1,#current do
nofsequences = nofsequences + 1
- sequence[nofsequences] = after[n]
+ sequence[nofsequences] = current[n]
end
- end
- local lookups = rule.lookups
- local subtype = nil
- if lookups then
- for k, v in next, lookups do
- local lookup = sublookups[v]
- if lookup then
- lookups[k] = lookup
- if not subtype then
- subtype = lookup.type
+ local stop = nofsequences
+ if after then
+ for n=1,#after do
+ nofsequences = nofsequences + 1
+ sequence[nofsequences] = after[n]
+ end
+ end
+ local lookups = rule.lookups
+ local subtype = nil
+ if lookups then
+ for k, v in next, lookups do
+ local lookup = sublookups[v]
+ if lookup then
+ lookups[k] = lookup
+ if not subtype then
+ subtype = lookup.type
+ end
+ else
+ -- already expanded
end
- else
- -- already expanded
end
end
- end
- if sequence[1] then -- we merge coverage into one
- rulesize = rulesize + 1
- rulehash[rulesize] = {
- nofrules, -- 1
- lookuptype, -- 2
- sequence, -- 3
- start, -- 4
- stop, -- 5
- rule.lookups, -- 6
- replacements, -- 7
- subtype, -- 8
- }
- for unic in next, sequence[start] do
- local cu = coverage[unic]
- if not cu then
- coverage[unic] = rulehash -- can now be done cleaner i think
+ if sequence[1] then -- we merge coverage into one
+ rulesize = rulesize + 1
+ rulehash[rulesize] = {
+ nofrules, -- 1
+ lookuptype, -- 2
+ sequence, -- 3
+ start, -- 4
+ stop, -- 5
+ rule.lookups, -- 6
+ replacements, -- 7
+ subtype, -- 8
+ }
+ for unic in next, sequence[start] do
+ local cu = coverage[unic]
+ if not cu then
+ coverage[unic] = rulehash -- can now be done cleaner i think
+ end
end
end
end
@@ -1921,4 +1923,6 @@ function readers.expand(data)
end
end
end
+ expandlookups(sequences)
+ expandlookups(sublookups)
end
diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua
index 2275497e8..09188a4fd 100644
--- a/tex/context/base/math-noa.lua
+++ b/tex/context/base/math-noa.lua
@@ -605,17 +605,17 @@ end
-- todo: just replace the character by an ord noad
-- and remove the right delimiter as well
-local mathsize = privateattribute("mathsize") -- this might move into other fence code
-
-local resize = { } processors.resize = resize
+local a_mathsize = privateattribute("mathsize") -- this might move into other fence code
+local resize = { }
+processors.resize = resize
resize[math_fence] = function(pointer)
local subtype = getsubtype(pointer)
if subtype == left_fence_code or subtype == right_fence_code then
- local a = getattr(pointer,mathsize)
+ local a = getattr(pointer,a_mathsize)
if a and a > 0 then
local method, size = div(a,100), a % 100
- setattr(pointer,mathsize,0)
+ setattr(pointer,a_mathsize,0)
local delimiter = getfield(pointer,"delim")
local chr = getfield(delimiter,"small_char")
if chr > 0 then
@@ -634,9 +634,9 @@ function handlers.resize(head,style,penalties)
return true
end
-
-local a_autofence = privateattribute("mathautofence")
-local autofences = { }
+local a_autofence = privateattribute("mathautofence")
+local autofences = { }
+processors.autofences = autofences
local function makefence(what,char)
local d = new_node(math_delim)
diff --git a/tex/context/base/meta-imp-outlines.mkiv b/tex/context/base/meta-imp-outlines.mkiv
index e6257906b..7d7495037 100644
--- a/tex/context/base/meta-imp-outlines.mkiv
+++ b/tex/context/base/meta-imp-outlines.mkiv
@@ -66,7 +66,7 @@ function metapost.showglyph(specification)
if #paths > 0 then
local graphic = f_glyph(concat{
f_in_gray(metapost.fill(paths)),
- metapost.draw(paths,true),
+ metapost.draw(paths,true), -- true triggers trace
f_in_red(metapost.boundingbox(glyph,factor)),
f_in_green(metapost.widthline(glyph,factor)),
f_in_blue(metapost.zeroline(glyph,factor)),
@@ -164,8 +164,8 @@ end
% \setupbodyfont[pagella]
% \showshape[character=all,alternative=page]
-% \setupbodyfont[dejavu]
-% \showshape[character=P,alternative=text]
+\setupbodyfont[dejavu]
+\showshape[character=P,alternative=text]
% \definedfont[almfixed]
% \showshape[character=all,alternative=page]
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 16ea1e5f9..458af0624 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index af8fcdd90..9d961bd91 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.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 556550568..1fe4ebf40 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 : 07/12/15 15:40:46
+-- merge date : 07/12/15 23:30:14
do -- begin closure to overcome local limits and interference