summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/colo-hex.mkiv2
-rw-r--r--tex/context/base/colo-ini.lua18
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/font-mis.lua2
-rw-r--r--tex/context/base/font-otf.lua2
-rw-r--r--tex/context/base/font-otn.lua49
-rw-r--r--tex/context/base/font-otp.lua171
-rw-r--r--tex/context/base/l-lpeg.lua2
-rw-r--r--tex/context/base/lpdf-ini.lua10
-rw-r--r--tex/context/base/lpdf-u3d.lua119
-rw-r--r--tex/context/base/spac-ver.mkiv2
-rw-r--r--tex/context/base/strc-mat.mkiv4
-rw-r--r--tex/context/base/syst-aux.mkiv17
-rw-r--r--tex/context/base/type-buy.mkiv26
-rw-r--r--tex/context/base/type-ini.mkii2
-rw-r--r--tex/context/fonts/informal-math.lfg22
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua55
18 files changed, 262 insertions, 245 deletions
diff --git a/tex/context/base/colo-hex.mkiv b/tex/context/base/colo-hex.mkiv
index d626a39d1..f661b2445 100644
--- a/tex/context/base/colo-hex.mkiv
+++ b/tex/context/base/colo-hex.mkiv
@@ -23,6 +23,6 @@
% fill (point 0 of p -- point 3 of p -- point 2 of p --cycle) withcolor \MPcolor{hextestcolor} ; % top left part
% \stopMPpage
-\def\checkhexcolor[#1]{\doifcolorelse{#1}\donothing{\definecolor[#1][h=#1]}} % is this ok?
+\def\checkhexcolor[#1]{\doifcolorelse{#1}\donothing{\definecolor[#1][x=#1]}} % is this ok?
\endinput
diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua
index 363850928..0e73761a3 100644
--- a/tex/context/base/colo-ini.lua
+++ b/tex/context/base/colo-ini.lua
@@ -189,19 +189,19 @@ function colors.definesimplegray(name,s)
end
function colors.defineprocesscolor(name,str,global,freeze) -- still inconsistent color vs transparent
- local r = match(str,"^#(.+)$") -- for old times sake (if we need to feed from xml or so)
- local t = (r and { h = r }) or settings_to_hash_strict(str)
+ local x = match(str,"^#(.+)$") -- for old times sake (if we need to feed from xml or so)
+ local t = (x and { x = x }) or settings_to_hash_strict(str)
if t then
- if t.v then
- local r, g, b = colors.hsvtorgb(tonumber(t.h) or 0, tonumber(t.s) or 1, tonumber(t.v) or 1) -- maybe later native
- definecolor(name, register_color(name,'rgb',r,g,b), global)
- elseif t.h then
- local r, g, b = match(t.h .. "000000","(..)(..)(..)") -- watch the 255
- definecolor(name, register_color(name,'rgb',(tonumber(r,16) or 0)/255,(tonumber(g,16) or 0)/255,(tonumber(b,16) or 0)/255), global)
- elseif t.r or t.g or t.b then
+ if t.r or t.g or t.b then
definecolor(name, register_color(name,'rgb', tonumber(t.r) or 0, tonumber(t.g) or 0, tonumber(t.b) or 0), global)
elseif t.c or t.m or t.y or t.k then
definecolor(name, register_color(name,'cmyk',tonumber(t.c) or 0, tonumber(t.m) or 0, tonumber(t.y) or 0, tonumber(t.k) or 0), global)
+ elseif t.v then
+ local r, g, b = colors.hsvtorgb(tonumber(t.h) or 0, tonumber(t.s) or 1, tonumber(t.v) or 1) -- maybe later native
+ definecolor(name, register_color(name,'rgb',r,g,b), global)
+ elseif t.x or t.h then
+ local r, g, b = match((t.x or t.h) .. "000000","(..)(..)(..)") -- watch the 255
+ definecolor(name, register_color(name,'rgb',(tonumber(r,16) or 0)/255,(tonumber(g,16) or 0)/255,(tonumber(b,16) or 0)/255), global)
else
definecolor(name, register_color(name,'gray',tonumber(t.s) or 0), global)
end
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 9b8a555c1..d63bf27c5 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2010.05.12 18:43}
+\newcontextversion{2010.05.13 23:36}
%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/context.tex b/tex/context/base/context.tex
index 952a8637c..a8b1afd7c 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2010.05.12 18:43}
+\edef\contextversion{2010.05.13 23:36}
%D For those who want to use this:
diff --git a/tex/context/base/font-mis.lua b/tex/context/base/font-mis.lua
index 025bcb42e..7dc15df2d 100644
--- a/tex/context/base/font-mis.lua
+++ b/tex/context/base/font-mis.lua
@@ -11,7 +11,7 @@ local lower, strip = string.lower, string.strip
fonts.otf = fonts.otf or { }
-fonts.otf.version = fonts.otf.version or 2.645
+fonts.otf.version = fonts.otf.version or 2.650
fonts.otf.pack = true
fonts.otf.cache = containers.define("fonts", "otf", fonts.otf.version, true)
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 29c56cd00..c885bcf6d 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -80,7 +80,7 @@ otf.features.default = otf.features.default or { }
otf.enhancers = otf.enhancers or { }
otf.glists = { "gsub", "gpos" }
-otf.version = 2.645 -- beware: also sync font-mis.lua
+otf.version = 2.650 -- beware: also sync font-mis.lua
otf.pack = true -- beware: also sync font-mis.lua
otf.syncspace = true
otf.notdef = false
diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua
index 3aa1927d3..d4f89adc6 100644
--- a/tex/context/base/font-otn.lua
+++ b/tex/context/base/font-otn.lua
@@ -123,6 +123,7 @@ results in different tables.</p>
local concat, insert, remove = table.concat, table.insert, table.remove
local format, gmatch, gsub, find, match, lower, strip = string.format, string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip
local type, next, tonumber, tostring = type, next, tonumber, tostring
+local lpegmatch = lpeg.match
local otf = fonts.otf
local tfm = fonts.tfm
@@ -166,7 +167,7 @@ local zwj = 0x200D
local wildcard = "*"
local default = "dflt"
-local split_at_space = lpeg.Ct(lpeg.splitat(" ")) -- no trailing or multiple spaces anyway
+local split_at_space = lpeg.splitters[" "] or lpeg.Ct(lpeg.splitat(" ")) -- no trailing or multiple spaces anyway
local glyph = node.id('glyph')
local glue = node.id('glue')
@@ -2208,11 +2209,11 @@ otf.features.prepare = { }
-- document)
local function split(replacement,original,cache,unicodes)
- -- we can cache this too, but not the same
+ -- we can cache this too, but not the same (although unicode is a unique enough hash)
local o, t, n = { }, { }, 0
for s in gmatch(original,"[^ ]+") do
local us = unicodes[s]
- if type(us) == "number" then
+ if type(us) == "number" then -- tonumber(us)
o[#o+1] = us
else
o[#o+1] = us[1]
@@ -2221,7 +2222,7 @@ local function split(replacement,original,cache,unicodes)
for s in gmatch(replacement,"[^ ]+") do
n = n + 1
local us = unicodes[s]
- if type(us) == "number" then
+ if type(us) == "number" then -- tonumber(us)
t[o[n]] = us
else
t[o[n]] = us[1]
@@ -2579,6 +2580,46 @@ function prepare_contextchains(tfmdata)
end
end
end
+ elseif fmt == "glyphs" then
+ if lookuptype ~= "chainsub" and lookuptype ~= "chainpos" then
+ logs.report("otf process","unsupported coverage %s for %s",lookuptype,lookupname)
+ else
+ local contexts = contextchain[lookupname]
+ if not contexts then
+ contexts = { }
+ contextchain[lookupname] = contexts
+ end
+ local t = { }
+ for nofrules=1,#rules do
+ -- nearly the same as coverage so we could as well rename it
+ local rule = rules[nofrules]
+ local glyphs = rule.glyphs
+ if glyphs and glyphs.names then
+ local fore, back, names, sequence = glyphs.fore, glyphs.back, glyphs.names, { }
+ if fore and fore ~= "" then
+ fore = lpegmatch(split_at_space,fore)
+ uncover(fore,sequence,cache,unicodes)
+ end
+ local start = #sequence + 1
+ names = lpegmatch(split_at_space,names)
+ uncover(names,sequence,cache,unicodes)
+ local stop = #sequence
+ if back and back ~= "" then
+ back = lpegmatch(split_at_space,back)
+ uncover(back,sequence,cache,unicodes)
+ end
+ if sequence[1] then
+ t[#t+1] = { nofrules, lookuptype, sequence, start, stop, rule.lookups }
+ for unic, _ in next, sequence[start] do
+ local cu = contexts[unic]
+ if not cu then
+ contexts[unic] = t
+ end
+ end
+ end
+ end
+ end
+ end
end
end
end
diff --git a/tex/context/base/font-otp.lua b/tex/context/base/font-otp.lua
index 47962d806..a80c515ad 100644
--- a/tex/context/base/font-otp.lua
+++ b/tex/context/base/font-otp.lua
@@ -176,15 +176,21 @@ function fonts.otf.enhancers.pack(data)
end
local c = vv.coverage
if c then
- c.before = c.before and pack(c.before )
- c.after = c.after and pack(c.after )
- c.current = c.current and pack(c.current)
+ local cc = c.before if cc then c.before = pack(cc) end
+ local cc = c.after if cc then c.after = pack(cc) end
+ local cc = c.current if cc then c.current = pack(cc) end
end
local c = vv.reversecoverage
if c then
- c.before = c.before and pack(c.before )
- c.after = c.after and pack(c.after )
- c.current = c.current and pack(c.current)
+ local cc = c.before if cc then c.before = pack(cc) end
+ local cc = c.after if cc then c.after = pack(cc) end
+ local cc = c.current if cc then c.current = pack(cc) end
+ end
+ -- no need to pack vv.glyphs
+ local c = vv.glyphs
+ if c then
+ if c.fore == "" then c.fore = nil end
+ if c.back == "" then c.back = nil end
end
end
end
@@ -293,158 +299,6 @@ function fonts.otf.enhancers.pack(data)
end
end
---~ function fonts.otf.enhancers.unpack(data)
---~ if data then
---~ local t = data.tables
---~ if t then
---~ for k, v in next, data.glyphs do
---~ local tv = t[v.boundingbox] if tv then v.boundingbox = tv end
---~ local l = v.slookups
---~ if l then
---~ for k,v in next, l do
---~ local tv = t[v] if tv then l[k] = tv end
---~ end
---~ end
---~ local l = v.mlookups
---~ if l then
---~ for k,v in next, l do
---~ for i=1,#v do
---~ local tv = t[v[i]] if tv then v[i] = tv end
---~ local vi = v[i]
---~ local what = vi[1]
---~ if what == "pair" then
---~ local tv = t[vi[3]] if tv then vi[3] = tv end
---~ local tv = t[vi[4]] if tv then vi[4] = tv end
---~ elseif what == "position" then
---~ local tv = t[vi[2]] if tv then vi[2] = tv end
---~ end
---~ end
---~ end
---~ end
---~ local m = v.mykerns
---~ if m then
---~ local tv = t[m] if tv then m = tv v.mykerns = m end -- secondary optimization
---~ for k,v in next, m do
---~ local tv = t[v] if tv then m[k] = tv end
---~ end
---~ end
---~ local m = v.math
---~ if m then
---~ local mk = m.kerns
---~ if mk then
---~ local tv = t[mk] if tv then mk = tv m.kerns = mk end -- secondary optimization
---~ for k,v in next, mk do
---~ local tv = t[v] if tv then mk[k] = tv end
---~ end
---~ end
---~ end
---~ local a = v.anchors
---~ if a then
---~ local tv = t[a] if tv then a = tv v.anchors = a end -- secondary optimization
---~ for k,v in next, a do
---~ if k == "baselig" then
---~ for kk, vv in next, v do
---~ for kkk=1,#vv do
---~ local tv = t[vv[kkk]] if tv then vv[kkk] = tv end
---~ end
---~ end
---~ else
---~ for kk, vv in next, v do
---~ local tv = t[vv] if tv then v[kk] = tv end
---~ end
---~ end
---~ end
---~ end
---~ end
---~ if data.lookups then
---~ for k, v in next, data.lookups do
---~ local r = v.rules
---~ if r then
---~ for kk, vv in next, r do
---~ local l = vv.lookups
---~ if l then
---~ local tv = t[l] if tv then vv.lookups = tv end
---~ end
---~ local c = vv.coverage
---~ if c then
---~ local cc = c.before if cc then local tv = t[cc] if tv then c.before = tv end end
---~ cc = c.after if cc then local tv = t[cc] if tv then c.after = tv end end
---~ cc = c.current if cc then local tv = t[cc] if tv then c.current = tv end end
---~ end
---~ local c = vv.reversecoverage
---~ if c then
---~ local cc = c.before if cc then local tv = t[cc] if tv then c.before = tv end end
---~ cc = c.after if cc then local tv = t[cc] if tv then c.after = tv end end
---~ cc = c.current if cc then local tv = t[cc] if tv then c.current = tv end end
---~ end
---~ end
---~ end
---~ end
---~ end
---~ local luatex = data.luatex
---~ if luatex then
---~ local la = luatex.anchor_to_lookup
---~ if la then
---~ for lookup, ldata in next, la do
---~ local tv = t[ldata] if tv then la[lookup] = tv end
---~ end
---~ end
---~ local la = luatex.lookup_to_anchor
---~ if la then
---~ for lookup, ldata in next, la do
---~ local tv = t[ldata] if tv then la[lookup] = tv end
---~ end
---~ end
---~ local ls = luatex.sequences
---~ if ls then
---~ for feature, fdata in next, ls do
---~ local flags = fdata.flags
---~ if flags then
---~ local tv = t[flags] if tv then fdata.flags = tv end
---~ end
---~ local subtables = fdata.subtables
---~ if subtables then
---~ local tv = t[subtables] if tv then fdata.subtables = tv end
---~ end
---~ local features = fdata.features
---~ if features then
---~ local tv = t[features] if tv then fdata.features = tv features = tv end -- secondary pack
---~ for script, sdata in next, features do
---~ local tv = t[sdata] if tv then features[script] = tv end
---~ end
---~ end
---~ end
---~ end
---~ local ls = luatex.lookups
---~ if ls then
---~ for lookups, fdata in next, ls do
---~ local flags = fdata.flags
---~ if flags then
---~ local tv = t[flags] if tv then fdata.flags = tv end
---~ end
---~ local subtables = fdata.subtables
---~ if subtables then
---~ local tv = t[subtables] if tv then fdata.subtables = tv end
---~ end
---~ end
---~ end
---~ local lf = luatex.features
---~ if lf then
---~ for _, g in next, fonts.otf.glists do
---~ local gl = lf[g]
---~ if gl then
---~ for feature, spec in next, gl do
---~ local tv = t[spec] if tv then gl[feature] = tv end
---~ end
---~ end
---~ end
---~ end
---~ end
---~ data.tables = nil
---~ end
---~ end
---~ end
-
function fonts.otf.enhancers.unpack(data)
if data then
local t = data.tables
@@ -570,6 +424,7 @@ function fonts.otf.enhancers.unpack(data)
cc = c.after if cc then local tv = t[cc] if tv then c.after = tv end end
cc = c.current if cc then local tv = t[cc] if tv then c.current = tv end end
end
+ -- no need to unpack vv.glyphs
end
end
end
diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua
index c936d0010..b107a8e64 100644
--- a/tex/context/base/l-lpeg.lua
+++ b/tex/context/base/l-lpeg.lua
@@ -116,6 +116,8 @@ function string:split(separator)
return match(c,self)
end
+lpeg.splitters = cache
+
local cache = { }
function lpeg.checkedsplit(separator,str)
diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua
index e3116c80b..e0ffd4052 100644
--- a/tex/context/base/lpdf-ini.lua
+++ b/tex/context/base/lpdf-ini.lua
@@ -285,11 +285,15 @@ local function pdfnull()
return p_null
end
+--~ print(pdfboolean(false),pdfboolean(false,false),pdfboolean(false,true))
+--~ print(pdfboolean(true),pdfboolean(true,false),pdfboolean(true,true))
+--~ print(pdfboolean(nil,true),pdfboolean(nil,false))
+
local function pdfboolean(b,default)
- if ((type(b) == "boolean") and b) or default then
- return p_true
+ if type(b) == "boolean" then
+ return b and p_true or p_false
else
- return p_false
+ return default and p_true or p_false
end
end
diff --git a/tex/context/base/lpdf-u3d.lua b/tex/context/base/lpdf-u3d.lua
index 0a2beef00..f7a62c6c9 100644
--- a/tex/context/base/lpdf-u3d.lua
+++ b/tex/context/base/lpdf-u3d.lua
@@ -16,16 +16,19 @@ if not modules then modules = { } end modules ['lpdf-u3d'] = {
local format, find = string.format, string.find
local cos, sin, sqrt, pi, atan2, abs = math.cos, math.sin, math.sqrt, math.pi, math.atan2, math.abs
-local pdfconstant = lpdf.constant
-local pdfboolean = lpdf.boolean
-local pdfunicode = lpdf.unicode
-local pdfdictionary = lpdf.dictionary
-local pdfarray = lpdf.array
-local pdfnull = lpdf.null
-local pdfreference = lpdf.reference
+local pdfconstant = lpdf.constant
+local pdfboolean = lpdf.boolean
+local pdfnumber = lpdf.number
+local pdfunicode = lpdf.unicode
+local pdfdictionary = lpdf.dictionary
+local pdfarray = lpdf.array
+local pdfnull = lpdf.null
+local pdfreference = lpdf.reference
-local checkedkey = lpdf.checkedkey
-local limited = lpdf.limited
+local pdfimmediateobj = pdf.immediateobj
+
+local checkedkey = lpdf.checkedkey
+local limited = lpdf.limited
local schemes = table.tohash {
"Artwork", "None", "White", "Day", "Night", "Hard",
@@ -62,13 +65,14 @@ end
local function make3dview(view)
- local name = viewname
- local name = pdfunicode((view.name ~= "" and name) or "unknown view")
+ local name = view.name
+ local name = pdfunicode(name ~= "" and name or "unknown view")
local viewdict = pdfdictionary {
- Type = pdfconstant("3DView"),
- XN = name,
- IN = name,
+ Type = pdfconstant("3DView"),
+ XN = name,
+ IN = name,
+ NR = true,
}
local bg = checkedkey(view,"bg","table")
@@ -312,25 +316,21 @@ local function make3dview(view)
local node = checkedkey(nodes,i,"table")
if node then
local position = checkedkey(node,"position","table")
- position = position and #position == 12 and pdfarray(position)
- if position then
- nodelist[#nodelist+1] = pdfdictionary {
- Type = pdfconstant("3DNode"),
- N = node.name or ("node_" .. i), -- pdfunicode ?
- V = node.visible or true,
- O = node.opacity or 0,
- RM = pdfdictionary {
- Type = pdfconstant("3DRenderMode"),
- Subtype = pdfconstant(node.rendermode or "Solid"),
- },
- M = position,
- }
- end
+ nodelist[#nodelist+1] = pdfdictionary {
+ Type = pdfconstant("3DNode"),
+ N = node.name or ("node_" .. i), -- pdfunicode ?
+ M = position and #position == 12 and pdfarray(position),
+ V = node.visible or true,
+ O = node.opacity or 0,
+ RM = pdfdictionary {
+ Type = pdfconstant("3DRenderMode"),
+ Subtype = pdfconstant(node.rendermode or "Solid"),
+ },
+ }
end
end
- viewdict.NR = true
viewdict.NA = nodelist
- end
+ end
return viewdict
@@ -349,19 +349,19 @@ function backends.pdf.helpers.insert3d(spec) -- width, height, factor, display,
local activationdict = pdfdictionary {
TB = pdfboolean(param.toolbar,true),
- NP = pdfboolean(param.tree,true),
+ NP = pdfboolean(param.tree,false),
}
local stream = streams[label]
if not stream then
- local subtype, subdata = "U3D", io.readdata(foundname) or ""
+ local subtype, subdata = "U3D", io.loaddata(foundname) or ""
if find(subdata,"^PRC") then
- subtype == "PRC"
+ subtype = "PRC"
elseif find(subdata,"^U3D") then
- subtype == "U3D"
+ subtype = "U3D"
elseif file.extname(foundname) == "prc" then
- subtype == "PRC"
+ subtype = "PRC"
end
local attr = pdfdictionary {
@@ -388,12 +388,12 @@ function backends.pdf.helpers.insert3d(spec) -- width, height, factor, display,
if js then
local jsref = stored_js[js]
if not jsref then
- jsref = pdf.immediateobj("streamfile",js)
+ jsref = pdfimmediateobj("streamfile",js)
stored_js[js] = jsref
end
attr.OnInstantiate = pdfreference(jsref)
end
- stored_3d[label] = pdf.immediateobj("streamfile",foundname,attr())
+ stored_3d[label] = pdfimmediateobj("streamfile",foundname,attr())
stream = 1
else
stream = stream + 1
@@ -422,13 +422,50 @@ function backends.pdf.helpers.insert3d(spec) -- width, height, factor, display,
local tag = format("%s:%s:%s",label,stream,preview)
local ref = stored_pr[tag]
if not ref then
- -- weird, has to be a /Form and not an /Image so we need a wrap = true key
- -- local figure = img.immediatewrite { filename = preview, width = width, height = height }
- local figure = img.immediatewrite { stream = ".5 .75 .75 rg 0 0 20 10 re f", bbox = {0,0,20,10 } }
+ local figure = img.immediatewrite {
+ filename = preview,
+ width = width,
+ height = height
+ }
+ -- local figure = img.immediatewrite {
+ -- stream = ".5 .75 .75 rg 0 0 20 10 re f",
+ -- bbox = { 0, 0, 20, 10 }
+ -- }
ref = figure.objnum
stored_pr[tag] = ref
end
- annot.AP = ref and pdfdictionary { N = pdfreference(ref) }
+ if ref then
+ local zero, one = pdfnumber(0), pdfnumber(1) -- not really needed
+ local pw = pdfdictionary {
+ Type = pdfconstant("XObject"),
+ Subtype = pdfconstant("Form"),
+ FormType = one,
+ BBox = pdfarray { zero, zero, pdfnumber(factor*width), pdfnumber(factor*height) },
+ Matrix = pdfarray { one, zero, zero, one, zero, zero },
+ Resources = pdfdictionary {
+ XObject = pdfdictionary {
+ IM = pdfreference(ref)
+ }
+ },
+ ExtGState = pdfdictionary {
+ GS = pdfdictionary {
+ Type = pdfconstant("ExtGState"),
+ CA = one,
+ ca = one,
+ }
+ },
+ ProcSet = pdfarray { pdfconstant("PDF"), pdfconstant("ImageC") },
+ }
+ local pwd = pdfimmediateobj(
+ "stream",
+ format("q /GS gs %s 0 0 %s 0 0 cm /IM Do Q",
+ factor*width,factor*height),
+ pw()
+ )
+ annot.AP = pdfdictionary {
+ N = pdfreference(pwd)
+ }
+ end
return annot, figure, ref
else
activationdict.A = pdfconstant("PV")
diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv
index f7c8a82fa..29633689d 100644
--- a/tex/context/base/spac-ver.mkiv
+++ b/tex/context/base/spac-ver.mkiv
@@ -1397,7 +1397,7 @@
% maxdepth round depth up
% minheight round height down
% maxheight round height up
-%
+% local use local interline space
% shift:-3tp vertical shift within box
%D We're not downward compatible with \MKII !
diff --git a/tex/context/base/strc-mat.mkiv b/tex/context/base/strc-mat.mkiv
index ac051a613..57f898118 100644
--- a/tex/context/base/strc-mat.mkiv
+++ b/tex/context/base/strc-mat.mkiv
@@ -488,14 +488,14 @@
\prevdepth-\maxdimen % texbook pagina 79-80
\fi
\noindent % else funny hlist with funny baselineskip
- \Ustartdisplaymath
+ $$% \Ustartdisplaymath
\setdisplaydimensions
%\setpredisplaysize
\startinnermath}
\def\stopdisplaymath
{\stopinnermath
- \Ustopdisplaymath
+ $$% \Ustopdisplaymath
\par
\afterdisplayspace
\par
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 080ff1b95..af1b2634e 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -1923,13 +1923,24 @@
\def\xdoget@n@parameters#1]%
{\xprocesscommaitem#1,],\@relax@}
+% \def\xdoget@e@parameters#1]%
+% {\let\dosetnvalue\dosetvalue
+% \let\dosetvalue\dosetevalue
+% \let\p!doassign\p!e!doassign
+% \xprocesscommaitem#1,],\@relax@
+% \let\p!doassign\p!n!doassign
+% \let\dosetvalue\dosetnvalue
+% \let\xdogetparameters\xdoget@n@parameters
+% \let\currentvalue\empty}
+
\def\xdoget@e@parameters#1]%
- {\let\dosetnvalue\dosetvalue
- \let\dosetvalue\dosetevalue
+ {\let\dosetnvalue\setsomevalue
+ \let\setsomevalue\dosetevalue
\let\p!doassign\p!e!doassign
+ \let\setsomevalue\dosetevalue
\xprocesscommaitem#1,],\@relax@
\let\p!doassign\p!n!doassign
- \let\dosetvalue\dosetnvalue
+ \let\setsomevalue\dosetnvalue
\let\xdogetparameters\xdoget@n@parameters
\let\currentvalue\empty}
diff --git a/tex/context/base/type-buy.mkiv b/tex/context/base/type-buy.mkiv
index 36ca43ea8..becc4361c 100644
--- a/tex/context/base/type-buy.mkiv
+++ b/tex/context/base/type-buy.mkiv
@@ -15,7 +15,7 @@
% Informal : Vulis
-\starttypescript [casual] [informal] [name]
+\starttypescript [casual] [informal]
\definefontsynonym [Serif] [Informal-Regular]
\definefontsynonym [SerifBold] [Informal-Bold]
\definefontsynonym [SerifSlanted] [Informal-Oblique]
@@ -32,20 +32,22 @@
\definefontsynonym [MathSymbol] [Informal-MathSymbols]
\stoptypescript
-\starttypescript [casual] [informal] [default]
- \definefontsynonym [Informal-Regular] [ifrm10cm]
- \definefontsynonym [Informal-Bold] [ifrb10cm]
- \definefontsynonym [Informal-Oblique] [ifro10cm]
- \definefontsynonym [Informal-BoldOblique] [ifbo10cm]
- \loadmapfile[original-micropress-informal.map]
+\starttypescript [casual] [informal]
+ \definefontsynonym [Informal-Regular] [file:ifrg]
+ \definefontsynonym [Informal-Bold] [file:ifb]
+ \definefontsynonym [Informal-Oblique] [file:ifo]
+ \definefontsynonym [Informal-BoldOblique] [file:ifbo]
\stoptypescript
\starttypescript [math] [informal] [default]
- \definefontsynonym [Informal-Regular] [ifrm10cm]
- \definefontsynonym [Informal-MathExtendedSymbols] [ifex10]
- \definefontsynonym [Informal-MathItalics] [ifmi10]
- \definefontsynonym [Informal-MathSymbols] [ifsy10]
- \loadmapfile[original-micropress-informal.map]
+ \loadfontgoodies[informal-math]
+ \definefontsynonym[MathRoman][informalmath@informal-math]
+\stoptypescript
+
+\starttypescript [informal]
+ \definetypeface[informal][rm][casual][informal][default]
+ \definetypeface[informal][tt][mono] [modern] [default][rscale=0.95]
+ \definetypeface[informal][mm][math] [informal][default]
\stoptypescript
% Sabon
diff --git a/tex/context/base/type-ini.mkii b/tex/context/base/type-ini.mkii
index 771e50e01..ac1e243f2 100644
--- a/tex/context/base/type-ini.mkii
+++ b/tex/context/base/type-ini.mkii
@@ -637,7 +637,7 @@
\fi \fi
\ifmmode\mr\else\tf\fi} % needed ?
-\def\usetypefile[#1]% recurses on path !
+\def\usetypefile[#1]% recurses on path ! ?
{\readfile{\f!typeprefix#1}\donothing\donothing}
%D For Taco:
diff --git a/tex/context/fonts/informal-math.lfg b/tex/context/fonts/informal-math.lfg
new file mode 100644
index 000000000..67fb73b39
--- /dev/null
+++ b/tex/context/fonts/informal-math.lfg
@@ -0,0 +1,22 @@
+return {
+ name = "informal-math",
+ version = "1.00",
+ comment = "Goodies that complement informal math.",
+ author = "Hans, Mojca, Aditya",
+ copyright = "ConTeXt development team",
+ mathematics = {
+ mapfiles = {
+ "original-micropress-informal.map",
+ },
+ virtuals = {
+ ["hvmath-math"] = {
+ { name = "file:ifrg.afm", features = "virtualmath", main = true },
+ { name = "ifrm10cm.tfm", vector="tex-mr" },
+ { name = "ifmi10", vector = "tex-mi", skewchar=0x7F },
+ { name = "ifmi10.tfm", vector = "tex-it", skewchar=0x7F },
+ { name = "ifsy10.tfm", vector = "tex-sy", skewchar=0x30, parameters = true },
+ { name = "ifex10.tfm", vector = "tex-ex", extension = true },
+ }
+ }
+ }
+}
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index dc3e8c7c9..32b2fb9e0 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 05/12/10 18:43:22
+-- merge date : 05/13/10 23:36:33
do -- begin closure to overcome local limits and interference
@@ -412,6 +412,8 @@ function string:split(separator)
return match(c,self)
end
+lpeg.splitters = cache
+
local cache = { }
function lpeg.checkedsplit(separator,str)
@@ -5873,7 +5875,7 @@ otf.features.default = otf.features.default or { }
otf.enhancers = otf.enhancers or { }
otf.glists = { "gsub", "gpos" }
-otf.version = 2.645 -- beware: also sync font-mis.lua
+otf.version = 2.650 -- beware: also sync font-mis.lua
otf.pack = true -- beware: also sync font-mis.lua
otf.syncspace = true
otf.notdef = false
@@ -8195,6 +8197,7 @@ results in different tables.</p>
local concat, insert, remove = table.concat, table.insert, table.remove
local format, gmatch, gsub, find, match, lower, strip = string.format, string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip
local type, next, tonumber, tostring = type, next, tonumber, tostring
+local lpegmatch = lpeg.match
local otf = fonts.otf
local tfm = fonts.tfm
@@ -8238,7 +8241,7 @@ local zwj = 0x200D
local wildcard = "*"
local default = "dflt"
-local split_at_space = lpeg.Ct(lpeg.splitat(" ")) -- no trailing or multiple spaces anyway
+local split_at_space = lpeg.splitters[" "] or lpeg.Ct(lpeg.splitat(" ")) -- no trailing or multiple spaces anyway
local glyph = node.id('glyph')
local glue = node.id('glue')
@@ -10280,11 +10283,11 @@ otf.features.prepare = { }
-- document)
local function split(replacement,original,cache,unicodes)
- -- we can cache this too, but not the same
+ -- we can cache this too, but not the same (although unicode is a unique enough hash)
local o, t, n = { }, { }, 0
for s in gmatch(original,"[^ ]+") do
local us = unicodes[s]
- if type(us) == "number" then
+ if type(us) == "number" then -- tonumber(us)
o[#o+1] = us
else
o[#o+1] = us[1]
@@ -10293,7 +10296,7 @@ local function split(replacement,original,cache,unicodes)
for s in gmatch(replacement,"[^ ]+") do
n = n + 1
local us = unicodes[s]
- if type(us) == "number" then
+ if type(us) == "number" then -- tonumber(us)
t[o[n]] = us
else
t[o[n]] = us[1]
@@ -10651,6 +10654,46 @@ function prepare_contextchains(tfmdata)
end
end
end
+ elseif fmt == "glyphs" then
+ if lookuptype ~= "chainsub" and lookuptype ~= "chainpos" then
+ logs.report("otf process","unsupported coverage %s for %s",lookuptype,lookupname)
+ else
+ local contexts = contextchain[lookupname]
+ if not contexts then
+ contexts = { }
+ contextchain[lookupname] = contexts
+ end
+ local t = { }
+ for nofrules=1,#rules do
+ -- nearly the same as coverage so we could as well rename it
+ local rule = rules[nofrules]
+ local glyphs = rule.glyphs
+ if glyphs and glyphs.names then
+ local fore, back, names, sequence = glyphs.fore, glyphs.back, glyphs.names, { }
+ if fore and fore ~= "" then
+ fore = lpegmatch(split_at_space,fore)
+ uncover(fore,sequence,cache,unicodes)
+ end
+ local start = #sequence + 1
+ names = lpegmatch(split_at_space,names)
+ uncover(names,sequence,cache,unicodes)
+ local stop = #sequence
+ if back and back ~= "" then
+ back = lpegmatch(split_at_space,back)
+ uncover(back,sequence,cache,unicodes)
+ end
+ if sequence[1] then
+ t[#t+1] = { nofrules, lookuptype, sequence, start, stop, rule.lookups }
+ for unic, _ in next, sequence[start] do
+ local cu = contexts[unic]
+ if not cu then
+ contexts[unic] = t
+ end
+ end
+ end
+ end
+ end
+ end
end
end
end