summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/context/lua/luatools.lua60
-rw-r--r--scripts/context/lua/mtxrun.lua60
-rw-r--r--scripts/context/stubs/mswin/luatools.lua60
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua60
-rwxr-xr-xscripts/context/stubs/unix/luatools60
-rwxr-xr-xscripts/context/stubs/unix/mtxrun60
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/data-res.lua58
-rw-r--r--tex/context/base/font-cid.lua9
-rw-r--r--tex/context/base/font-otf.lua1
-rw-r--r--tex/context/base/font-pat.lua5
-rw-r--r--tex/context/base/font-syn.lua12
-rw-r--r--tex/context/base/font-tfm.lua9
-rw-r--r--tex/context/base/l-lpeg.lua2
-rw-r--r--tex/context/base/math-vfu.lua6
-rw-r--r--tex/context/base/s-fnt-25.tex2
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua23
18 files changed, 263 insertions, 228 deletions
diff --git a/scripts/context/lua/luatools.lua b/scripts/context/lua/luatools.lua
index a96474620..cd5e725d5 100644
--- a/scripts/context/lua/luatools.lua
+++ b/scripts/context/lua/luatools.lua
@@ -410,7 +410,7 @@ function string:checkedsplit(separator)
if not c then
separator = P(separator)
local other = C((1 - separator)^1)
- c = Ct(other * (separator^1 + other)^1)
+ c = Ct(other * (separator^1 * other)^1)
cache[separator] = c
end
return c:match(self)
@@ -4814,6 +4814,32 @@ end
-- work that well; the parsing is ok, but dealing with the resulting
-- table is a pain because we need to work inside-out recursively
+local function do_first(a,b)
+ local t = { }
+ for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_second(a,b)
+ local t = { }
+ for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_both(a,b)
+ local t = { }
+ for sa in gmatch(a,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do
+ t[#t+1] = sa .. sb
+ end
+ end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_three(a,b,c)
+ return a .. b.. c
+end
+
local function splitpathexpr(str, t, validate)
-- no need for further optimization as it is only called a
-- few times, we can use lpeg for the sub; we could move
@@ -4823,28 +4849,6 @@ local function splitpathexpr(str, t, validate)
str = gsub(str,"{,","{@,")
-- str = "@" .. str .. "@"
local ok, done
- local function do_first(a,b)
- local t = { }
- for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_second(a,b)
- local t = { }
- for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_both(a,b)
- local t = { }
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
- t[#t+1] = sa .. sb
- end
- end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_three(a,b,c)
- return a .. b.. c
- end
while true do
done = false
while true do
@@ -5353,22 +5357,20 @@ function resolvers.split_path(str) -- overkill but i need to check this module a
if type(str) == 'table' then
return str
else
+ str = gsub(str,"\\","/")
local s = cache[str]
if s then
return s -- happens seldom
else
s = { }
end
- local t = { }
- splitpathexpr(str,t)
+ local t = string.checkedsplit(str,io.pathseparator) or { str }
for _, p in ipairs(t) do
- for _, pp in ipairs(split_kpse_path(p)) do
- s[#s+1] = pp
- end
+ splitpathexpr(p,s)
end
+ --~ print(str,table.serialize(s))
cache[str] = s
return s
- --~ return file.split_path(str)
end
end
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 4ed4dbdd1..538d394a7 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -419,7 +419,7 @@ function string:checkedsplit(separator)
if not c then
separator = P(separator)
local other = C((1 - separator)^1)
- c = Ct(other * (separator^1 + other)^1)
+ c = Ct(other * (separator^1 * other)^1)
cache[separator] = c
end
return c:match(self)
@@ -7542,6 +7542,32 @@ end
-- work that well; the parsing is ok, but dealing with the resulting
-- table is a pain because we need to work inside-out recursively
+local function do_first(a,b)
+ local t = { }
+ for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_second(a,b)
+ local t = { }
+ for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_both(a,b)
+ local t = { }
+ for sa in gmatch(a,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do
+ t[#t+1] = sa .. sb
+ end
+ end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_three(a,b,c)
+ return a .. b.. c
+end
+
local function splitpathexpr(str, t, validate)
-- no need for further optimization as it is only called a
-- few times, we can use lpeg for the sub; we could move
@@ -7551,28 +7577,6 @@ local function splitpathexpr(str, t, validate)
str = gsub(str,"{,","{@,")
-- str = "@" .. str .. "@"
local ok, done
- local function do_first(a,b)
- local t = { }
- for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_second(a,b)
- local t = { }
- for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_both(a,b)
- local t = { }
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
- t[#t+1] = sa .. sb
- end
- end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_three(a,b,c)
- return a .. b.. c
- end
while true do
done = false
while true do
@@ -8081,22 +8085,20 @@ function resolvers.split_path(str) -- overkill but i need to check this module a
if type(str) == 'table' then
return str
else
+ str = gsub(str,"\\","/")
local s = cache[str]
if s then
return s -- happens seldom
else
s = { }
end
- local t = { }
- splitpathexpr(str,t)
+ local t = string.checkedsplit(str,io.pathseparator) or { str }
for _, p in ipairs(t) do
- for _, pp in ipairs(split_kpse_path(p)) do
- s[#s+1] = pp
- end
+ splitpathexpr(p,s)
end
+ --~ print(str,table.serialize(s))
cache[str] = s
return s
- --~ return file.split_path(str)
end
end
diff --git a/scripts/context/stubs/mswin/luatools.lua b/scripts/context/stubs/mswin/luatools.lua
index a96474620..cd5e725d5 100644
--- a/scripts/context/stubs/mswin/luatools.lua
+++ b/scripts/context/stubs/mswin/luatools.lua
@@ -410,7 +410,7 @@ function string:checkedsplit(separator)
if not c then
separator = P(separator)
local other = C((1 - separator)^1)
- c = Ct(other * (separator^1 + other)^1)
+ c = Ct(other * (separator^1 * other)^1)
cache[separator] = c
end
return c:match(self)
@@ -4814,6 +4814,32 @@ end
-- work that well; the parsing is ok, but dealing with the resulting
-- table is a pain because we need to work inside-out recursively
+local function do_first(a,b)
+ local t = { }
+ for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_second(a,b)
+ local t = { }
+ for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_both(a,b)
+ local t = { }
+ for sa in gmatch(a,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do
+ t[#t+1] = sa .. sb
+ end
+ end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_three(a,b,c)
+ return a .. b.. c
+end
+
local function splitpathexpr(str, t, validate)
-- no need for further optimization as it is only called a
-- few times, we can use lpeg for the sub; we could move
@@ -4823,28 +4849,6 @@ local function splitpathexpr(str, t, validate)
str = gsub(str,"{,","{@,")
-- str = "@" .. str .. "@"
local ok, done
- local function do_first(a,b)
- local t = { }
- for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_second(a,b)
- local t = { }
- for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_both(a,b)
- local t = { }
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
- t[#t+1] = sa .. sb
- end
- end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_three(a,b,c)
- return a .. b.. c
- end
while true do
done = false
while true do
@@ -5353,22 +5357,20 @@ function resolvers.split_path(str) -- overkill but i need to check this module a
if type(str) == 'table' then
return str
else
+ str = gsub(str,"\\","/")
local s = cache[str]
if s then
return s -- happens seldom
else
s = { }
end
- local t = { }
- splitpathexpr(str,t)
+ local t = string.checkedsplit(str,io.pathseparator) or { str }
for _, p in ipairs(t) do
- for _, pp in ipairs(split_kpse_path(p)) do
- s[#s+1] = pp
- end
+ splitpathexpr(p,s)
end
+ --~ print(str,table.serialize(s))
cache[str] = s
return s
- --~ return file.split_path(str)
end
end
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 4ed4dbdd1..538d394a7 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -419,7 +419,7 @@ function string:checkedsplit(separator)
if not c then
separator = P(separator)
local other = C((1 - separator)^1)
- c = Ct(other * (separator^1 + other)^1)
+ c = Ct(other * (separator^1 * other)^1)
cache[separator] = c
end
return c:match(self)
@@ -7542,6 +7542,32 @@ end
-- work that well; the parsing is ok, but dealing with the resulting
-- table is a pain because we need to work inside-out recursively
+local function do_first(a,b)
+ local t = { }
+ for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_second(a,b)
+ local t = { }
+ for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_both(a,b)
+ local t = { }
+ for sa in gmatch(a,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do
+ t[#t+1] = sa .. sb
+ end
+ end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_three(a,b,c)
+ return a .. b.. c
+end
+
local function splitpathexpr(str, t, validate)
-- no need for further optimization as it is only called a
-- few times, we can use lpeg for the sub; we could move
@@ -7551,28 +7577,6 @@ local function splitpathexpr(str, t, validate)
str = gsub(str,"{,","{@,")
-- str = "@" .. str .. "@"
local ok, done
- local function do_first(a,b)
- local t = { }
- for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_second(a,b)
- local t = { }
- for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_both(a,b)
- local t = { }
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
- t[#t+1] = sa .. sb
- end
- end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_three(a,b,c)
- return a .. b.. c
- end
while true do
done = false
while true do
@@ -8081,22 +8085,20 @@ function resolvers.split_path(str) -- overkill but i need to check this module a
if type(str) == 'table' then
return str
else
+ str = gsub(str,"\\","/")
local s = cache[str]
if s then
return s -- happens seldom
else
s = { }
end
- local t = { }
- splitpathexpr(str,t)
+ local t = string.checkedsplit(str,io.pathseparator) or { str }
for _, p in ipairs(t) do
- for _, pp in ipairs(split_kpse_path(p)) do
- s[#s+1] = pp
- end
+ splitpathexpr(p,s)
end
+ --~ print(str,table.serialize(s))
cache[str] = s
return s
- --~ return file.split_path(str)
end
end
diff --git a/scripts/context/stubs/unix/luatools b/scripts/context/stubs/unix/luatools
index a96474620..cd5e725d5 100755
--- a/scripts/context/stubs/unix/luatools
+++ b/scripts/context/stubs/unix/luatools
@@ -410,7 +410,7 @@ function string:checkedsplit(separator)
if not c then
separator = P(separator)
local other = C((1 - separator)^1)
- c = Ct(other * (separator^1 + other)^1)
+ c = Ct(other * (separator^1 * other)^1)
cache[separator] = c
end
return c:match(self)
@@ -4814,6 +4814,32 @@ end
-- work that well; the parsing is ok, but dealing with the resulting
-- table is a pain because we need to work inside-out recursively
+local function do_first(a,b)
+ local t = { }
+ for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_second(a,b)
+ local t = { }
+ for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_both(a,b)
+ local t = { }
+ for sa in gmatch(a,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do
+ t[#t+1] = sa .. sb
+ end
+ end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_three(a,b,c)
+ return a .. b.. c
+end
+
local function splitpathexpr(str, t, validate)
-- no need for further optimization as it is only called a
-- few times, we can use lpeg for the sub; we could move
@@ -4823,28 +4849,6 @@ local function splitpathexpr(str, t, validate)
str = gsub(str,"{,","{@,")
-- str = "@" .. str .. "@"
local ok, done
- local function do_first(a,b)
- local t = { }
- for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_second(a,b)
- local t = { }
- for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_both(a,b)
- local t = { }
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
- t[#t+1] = sa .. sb
- end
- end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_three(a,b,c)
- return a .. b.. c
- end
while true do
done = false
while true do
@@ -5353,22 +5357,20 @@ function resolvers.split_path(str) -- overkill but i need to check this module a
if type(str) == 'table' then
return str
else
+ str = gsub(str,"\\","/")
local s = cache[str]
if s then
return s -- happens seldom
else
s = { }
end
- local t = { }
- splitpathexpr(str,t)
+ local t = string.checkedsplit(str,io.pathseparator) or { str }
for _, p in ipairs(t) do
- for _, pp in ipairs(split_kpse_path(p)) do
- s[#s+1] = pp
- end
+ splitpathexpr(p,s)
end
+ --~ print(str,table.serialize(s))
cache[str] = s
return s
- --~ return file.split_path(str)
end
end
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 4ed4dbdd1..538d394a7 100755
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -419,7 +419,7 @@ function string:checkedsplit(separator)
if not c then
separator = P(separator)
local other = C((1 - separator)^1)
- c = Ct(other * (separator^1 + other)^1)
+ c = Ct(other * (separator^1 * other)^1)
cache[separator] = c
end
return c:match(self)
@@ -7542,6 +7542,32 @@ end
-- work that well; the parsing is ok, but dealing with the resulting
-- table is a pain because we need to work inside-out recursively
+local function do_first(a,b)
+ local t = { }
+ for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_second(a,b)
+ local t = { }
+ for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_both(a,b)
+ local t = { }
+ for sa in gmatch(a,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do
+ t[#t+1] = sa .. sb
+ end
+ end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_three(a,b,c)
+ return a .. b.. c
+end
+
local function splitpathexpr(str, t, validate)
-- no need for further optimization as it is only called a
-- few times, we can use lpeg for the sub; we could move
@@ -7551,28 +7577,6 @@ local function splitpathexpr(str, t, validate)
str = gsub(str,"{,","{@,")
-- str = "@" .. str .. "@"
local ok, done
- local function do_first(a,b)
- local t = { }
- for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_second(a,b)
- local t = { }
- for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_both(a,b)
- local t = { }
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
- t[#t+1] = sa .. sb
- end
- end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_three(a,b,c)
- return a .. b.. c
- end
while true do
done = false
while true do
@@ -8081,22 +8085,20 @@ function resolvers.split_path(str) -- overkill but i need to check this module a
if type(str) == 'table' then
return str
else
+ str = gsub(str,"\\","/")
local s = cache[str]
if s then
return s -- happens seldom
else
s = { }
end
- local t = { }
- splitpathexpr(str,t)
+ local t = string.checkedsplit(str,io.pathseparator) or { str }
for _, p in ipairs(t) do
- for _, pp in ipairs(split_kpse_path(p)) do
- s[#s+1] = pp
- end
+ splitpathexpr(p,s)
end
+ --~ print(str,table.serialize(s))
cache[str] = s
return s
- --~ return file.split_path(str)
end
end
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index df7e636ce..c8de3bb34 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{2009.11.19 23:11}
+\newcontextversion{2009.11.20 18:14}
%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 4df95ab04..e432c409c 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{2009.11.19 23:11}
+\edef\contextversion{2009.11.20 18:14}
%D For those who want to use this:
diff --git a/tex/context/base/data-res.lua b/tex/context/base/data-res.lua
index a2bace306..3a56dd9d4 100644
--- a/tex/context/base/data-res.lua
+++ b/tex/context/base/data-res.lua
@@ -352,6 +352,32 @@ end
-- work that well; the parsing is ok, but dealing with the resulting
-- table is a pain because we need to work inside-out recursively
+local function do_first(a,b)
+ local t = { }
+ for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_second(a,b)
+ local t = { }
+ for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_both(a,b)
+ local t = { }
+ for sa in gmatch(a,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do
+ t[#t+1] = sa .. sb
+ end
+ end
+ return "{" .. concat(t,",") .. "}"
+end
+
+local function do_three(a,b,c)
+ return a .. b.. c
+end
+
local function splitpathexpr(str, t, validate)
-- no need for further optimization as it is only called a
-- few times, we can use lpeg for the sub; we could move
@@ -361,28 +387,6 @@ local function splitpathexpr(str, t, validate)
str = gsub(str,"{,","{@,")
-- str = "@" .. str .. "@"
local ok, done
- local function do_first(a,b)
- local t = { }
- for s in gmatch(b,"[^,]+") do t[#t+1] = a .. s end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_second(a,b)
- local t = { }
- for s in gmatch(a,"[^,]+") do t[#t+1] = s .. b end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_both(a,b)
- local t = { }
- for sa in gmatch(a,"[^,]+") do
- for sb in gmatch(b,"[^,]+") do
- t[#t+1] = sa .. sb
- end
- end
- return "{" .. concat(t,",") .. "}"
- end
- local function do_three(a,b,c)
- return a .. b.. c
- end
while true do
done = false
while true do
@@ -891,22 +895,20 @@ function resolvers.split_path(str) -- overkill but i need to check this module a
if type(str) == 'table' then
return str
else
+ str = gsub(str,"\\","/")
local s = cache[str]
if s then
return s -- happens seldom
else
s = { }
end
- local t = { }
- splitpathexpr(str,t)
+ local t = string.checkedsplit(str,io.pathseparator) or { str }
for _, p in ipairs(t) do
- for _, pp in ipairs(split_kpse_path(p)) do
- s[#s+1] = pp
- end
+ splitpathexpr(p,s)
end
+ --~ print(str,table.serialize(s))
cache[str] = s
return s
- --~ return file.split_path(str)
end
end
diff --git a/tex/context/base/font-cid.lua b/tex/context/base/font-cid.lua
index 13e9cce89..7165288cf 100644
--- a/tex/context/base/font-cid.lua
+++ b/tex/context/base/font-cid.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['font-cid'] = {
license = "see context related readme files"
}
-local format, match = string.format, string.match
+local format, match, lower = string.format, string.match, string.lower
local tonumber = tonumber
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
@@ -79,8 +79,9 @@ end
local template = "%s-%s-%s.cidmap"
local function locate(registry,ordering,supplement)
- local filename = string.lower(format(template,registry,ordering,supplement))
- local cidmap = fonts.cid.map[filename]
+ local filename = format(template,registry,ordering,supplement)
+ local hashname = lower(filename)
+ local cidmap = fonts.cid.map[hasnname]
if not cidmap then
if trace_loading then
logs.report("load otf","checking cidmap, registry: %s, ordering: %s, supplement: %s, filename: %s",registry,ordering,supplement,filename)
@@ -92,7 +93,7 @@ local function locate(registry,ordering,supplement)
if trace_loading then
logs.report("load otf","using cidmap file %s",filename)
end
- fonts.cid.map[filename] = cidmap
+ fonts.cid.map[hashname] = cidmap
cidmap.usedname = file.basename(filename)
return cidmap
end
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 7929dfb02..51091b7da 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -1479,6 +1479,7 @@ function otf.copy_to_tfm(data,cache_id) -- we can save a copy when we reorder th
end
end
c.vert_variants = m.vert_parts
+ c.vert_italic_correction = m.vert_italic_correction
end
end
local kerns = m.kerns
diff --git a/tex/context/base/font-pat.lua b/tex/context/base/font-pat.lua
index 96b5fe870..65e8355c7 100644
--- a/tex/context/base/font-pat.lua
+++ b/tex/context/base/font-pat.lua
@@ -108,5 +108,6 @@ local function patch_domh(data,filename,threshold)
end
end
-patches["cambria"] = function(data,filename) patch_domh(data,filename,2800) end
-patches["asana"] = function(data,filename) patch_domh(data,filename,1350) end
+patches["cambria"] = function(data,filename) patch_domh(data,filename,2800) end
+patches["cambmath"] = function(data,filename) patch_domh(data,filename,2800) end
+patches["asana"] = function(data,filename) patch_domh(data,filename,1350) end
diff --git a/tex/context/base/font-syn.lua b/tex/context/base/font-syn.lua
index ec700f9de..b59f1f6e8 100644
--- a/tex/context/base/font-syn.lua
+++ b/tex/context/base/font-syn.lua
@@ -703,7 +703,7 @@ function names.load(reload,verbose)
local data = names.read_data(names.basename)
names.data = data
if not names.saved then
- if not next(data) or not next(data.specifications) then
+ if not data or not next(data) or not data.specifications or not next(data.specifications) then
names.load(true)
end
names.saved = true
@@ -1225,18 +1225,14 @@ names.new_to_old = {
names.old_to_new = table.swapped(names.new_to_old)
function names.exists(name)
- local fna, found = names.autoreload, false
- names.autoreload = false
+ local found = false
for k,v in ipairs(filters.list) do
found = (resolvers.find_file(name,v) or "") ~= ""
if found then
- break
+ return found
end
end
- found = found or (resolvers.find_file(name,"tfm") or "") ~= ""
- found = found or (names.resolve(name) or "") ~= ""
- names.autoreload = fna
- return found
+ return ((resolvers.find_file(name,"tfm") or "") ~= "") or ((names.resolve(name) or "") ~= "")
end
-- for i=1,fonts.names.lookup(pattern) do
diff --git a/tex/context/base/font-tfm.lua b/tex/context/base/font-tfm.lua
index 2794a947a..efea9def3 100644
--- a/tex/context/base/font-tfm.lua
+++ b/tex/context/base/font-tfm.lua
@@ -407,6 +407,11 @@ local private = fonts.private
}
end
chr.vert_variants = t
+--~ local ic = v.vert_italic_correction
+--~ if ic then
+--~ chr.italic = ic * delta
+--~ print(format("0x%05X -> %s",k,chr.italic))
+--~ end
else
local hv = v.horiz_variants
if hv then
@@ -517,6 +522,9 @@ local private = fonts.private
end
end
tc[k] = chr
+--~ if k == 0x222B then
+--~ print(t.fontname,table.serialize(chr))
+--~ end
end
-- t.encodingbytes, t.filename, t.fullname, t.name: elsewhere
t.size = scaledpoints
@@ -565,6 +573,7 @@ local private = fonts.private
logs.report("define font","used for accesing subfont: '%s'",t.psname or "nopsname")
logs.report("define font","used for subsetting: '%s'",t.fontname or "nofontname")
end
+--~ print(t.fontname,table.serialize(t.MathConstants))
return t, delta
end
diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua
index 1318746c4..44e648607 100644
--- a/tex/context/base/l-lpeg.lua
+++ b/tex/context/base/l-lpeg.lua
@@ -108,7 +108,7 @@ function string:checkedsplit(separator)
if not c then
separator = P(separator)
local other = C((1 - separator)^1)
- c = Ct(other * (separator^1 + other)^1)
+ c = Ct(other * (separator^1 * other)^1)
cache[separator] = c
end
return c:match(self)
diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua
index e67e50457..9b16357cf 100644
--- a/tex/context/base/math-vfu.lua
+++ b/tex/context/base/math-vfu.lua
@@ -544,6 +544,8 @@ function fonts.vf.math.define(specification,set)
main.type = "virtual" -- not needed
mathematics.scaleparameters(main,main,1)
main.nomath = false
+--~ print(table.serialize(characters[0x222B]))
+--~ print(main.fontname,table.serialize(main.MathConstants))
return main
end
@@ -754,7 +756,7 @@ fonts.enc.math["tex-mi"] = {
[0x02323] = 0x5E, -- smile
[0x02322] = 0x5F, -- frown
[0x02113] = 0x60, -- ell
---
+--
[0x1D6A4] = 0x7B, -- imath (TODO: also 0131)
[0x1D6A5] = 0x7C, -- jmath (TODO: also 0237)
[0x02118] = 0x7D, -- wp
@@ -802,7 +804,7 @@ fonts.enc.math["tex-it"] = {
[0x1D6F8] = 0x58, -- Chi
-- [0x1D44C] = 0x59, -- Y
-- [0x1D44D] = 0x5A, -- Z
---
+--
-- [0x1D44E] = 0x61, -- a
-- [0x1D44F] = 0x62, -- b
-- [0x1D450] = 0x63, -- c
diff --git a/tex/context/base/s-fnt-25.tex b/tex/context/base/s-fnt-25.tex
index 83a3ee586..7142ee876 100644
--- a/tex/context/base/s-fnt-25.tex
+++ b/tex/context/base/s-fnt-25.tex
@@ -124,7 +124,7 @@ function document.showmathfont(id,slot)
if choriz_variants then
local t = { }
for k, v in next, choriz_variants do
- t[#t+1] = string.format("\\fontlistentryvariants{%s}",v.glyph)
+ t[#t+1] = string.format("\\fontlistentryvariants{U+%05X}{%s}",v.glyph,v.glyph)
end
choriz_variants = t
end
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index c550519be..6d9982f64 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua
--- merge date : 11/19/09 23:18:54
+-- merge date : 11/20/09 18:25:17
do -- begin closure to overcome local limits and interference
@@ -376,7 +376,7 @@ function string:checkedsplit(separator)
if not c then
separator = P(separator)
local other = C((1 - separator)^1)
- c = Ct(other * (separator^1 + other)^1)
+ c = Ct(other * (separator^1 * other)^1)
cache[separator] = c
end
return c:match(self)
@@ -3716,6 +3716,11 @@ local private = fonts.private
}
end
chr.vert_variants = t
+--~ local ic = v.vert_italic_correction
+--~ if ic then
+--~ chr.italic = ic * delta
+--~ print(format("0x%05X -> %s",k,chr.italic))
+--~ end
else
local hv = v.horiz_variants
if hv then
@@ -3826,6 +3831,9 @@ local private = fonts.private
end
end
tc[k] = chr
+--~ if k == 0x222B then
+--~ print(t.fontname,table.serialize(chr))
+--~ end
end
-- t.encodingbytes, t.filename, t.fullname, t.name: elsewhere
t.size = scaledpoints
@@ -3874,6 +3882,7 @@ local private = fonts.private
logs.report("define font","used for accesing subfont: '%s'",t.psname or "nopsname")
logs.report("define font","used for subsetting: '%s'",t.fontname or "nofontname")
end
+--~ print(t.fontname,table.serialize(t.MathConstants))
return t, delta
end
@@ -4163,7 +4172,7 @@ if not modules then modules = { } end modules ['font-cid'] = {
license = "see context related readme files"
}
-local format, match = string.format, string.match
+local format, match, lower = string.format, string.match, string.lower
local tonumber = tonumber
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
@@ -4236,8 +4245,9 @@ end
local template = "%s-%s-%s.cidmap"
local function locate(registry,ordering,supplement)
- local filename = string.lower(format(template,registry,ordering,supplement))
- local cidmap = fonts.cid.map[filename]
+ local filename = format(template,registry,ordering,supplement)
+ local hashname = lower(filename)
+ local cidmap = fonts.cid.map[hasnname]
if not cidmap then
if trace_loading then
logs.report("load otf","checking cidmap, registry: %s, ordering: %s, supplement: %s, filename: %s",registry,ordering,supplement,filename)
@@ -4249,7 +4259,7 @@ local function locate(registry,ordering,supplement)
if trace_loading then
logs.report("load otf","using cidmap file %s",filename)
end
- fonts.cid.map[filename] = cidmap
+ fonts.cid.map[hashname] = cidmap
cidmap.usedname = file.basename(filename)
return cidmap
end
@@ -6736,6 +6746,7 @@ function otf.copy_to_tfm(data,cache_id) -- we can save a copy when we reorder th
end
end
c.vert_variants = m.vert_parts
+ c.vert_italic_correction = m.vert_italic_correction
end
end
local kerns = m.kerns