summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-08-07 11:22:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-08-07 11:22:00 +0200
commitc2fda456f975562068e66deb9905a9721af82ddf (patch)
tree845606dc5a889ad3a064e2147bfb7705e5fe843e /tex
parent3edfc2fc3e569201a16c63871aae121e57673539 (diff)
downloadcontext-c2fda456f975562068e66deb9905a9721af82ddf.tar.gz
beta 2009.08.07 11:22
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/font-def.lua20
-rw-r--r--tex/context/base/font-dum.lua2
-rw-r--r--tex/context/base/font-ini.lua5
-rw-r--r--tex/context/base/font-ini.mkiv8
-rw-r--r--tex/context/base/font-ott.lua10
-rw-r--r--tex/context/base/font-xtx.lua2
-rw-r--r--tex/context/base/math-noa.lua2
-rw-r--r--tex/context/base/mlib-pps.lua2
-rw-r--r--tex/context/base/pack-lyr.mkiv2
-rw-r--r--tex/context/base/syst-aux.mkiv6
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua41
13 files changed, 70 insertions, 34 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 777401a8d..857d90dd6 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.07.23 20:11}
+\newcontextversion{2009.08.07 11:22}
%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 6a5612f5a..90ab3117d 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.07.23 20:11}
+\edef\contextversion{2009.08.07 11:22}
%D For those who want to use this:
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index eca631184..c4b72194c 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -328,22 +328,18 @@ evolved. Each one has its own way of dealing with its format.</p>
--ldx]]--
local function check_tfm(specification,fullname)
- -- ofm directive blocks local path search unless set
- fullname = resolvers.findbinfile(fullname, 'tfm') or "" -- just to be sure
- if fullname ~= "" then
- specification.filename, specification.format = fullname, "ofm"
+ -- ofm directive blocks local path search unless set; btw, in context we
+ -- don't support ofm files anyway as this format is obsolete
+ local foundname = resolvers.findbinfile(fullname, 'tfm') or "" -- just to be sure
+ if foundname == "" then
+ foundname = resolvers.findbinfile(fullname, 'ofm') or "" -- bonus for usage outside context
+ end
+ if foundname ~= "" then
+ specification.filename, specification.format = foundname, "ofm"
return tfm.read_from_tfm(specification)
end
end
---~ local function check_afm(specification,fullname)
---~ fullname = resolvers.findbinfile(fullname, 'afm') or "" -- just to be sure
---~ if fullname ~= "" then
---~ specification.filename, specification.format = fullname, "afm"
---~ return tfm.read_from_afm(specification)
---~ end
---~ end
-
local function check_afm(specification,fullname)
local foundname = resolvers.findbinfile(fullname, 'afm') or "" -- just to be sure
if foundname == "" and tfm.auto_afm then
diff --git a/tex/context/base/font-dum.lua b/tex/context/base/font-dum.lua
index 5ae53d0f4..1421b3045 100644
--- a/tex/context/base/font-dum.lua
+++ b/tex/context/base/font-dum.lua
@@ -73,7 +73,7 @@ function fonts.names.resolve(name,sub)
loaded = true
end
if type(data) == "table" and data.version == 1.08 then
- local condensed = string.gsub(name,"[^%a%d]","")
+ local condensed = string.gsub(string.lower(name),"[^%a%d]","")
local found = data.mapping and data.mapping[condensed]
if found then
local filename, is_sub = found[3], found[4]
diff --git a/tex/context/base/font-ini.lua b/tex/context/base/font-ini.lua
index 248a2baca..4005726a5 100644
--- a/tex/context/base/font-ini.lua
+++ b/tex/context/base/font-ini.lua
@@ -27,6 +27,11 @@ fonts.mode = 'base'
fonts.private = 0xF0000 -- 0x10FFFF
fonts.verbose = false -- more verbose cache tables
+fonts.ids[0] = { -- nullfont
+ characters = { },
+ descriptions = { },
+}
+
fonts.methods = fonts.methods or {
base = { tfm = { }, afm = { }, otf = { }, vtf = { }, fix = { } },
node = { tfm = { }, afm = { }, otf = { }, vtf = { }, fix = { } },
diff --git a/tex/context/base/font-ini.mkiv b/tex/context/base/font-ini.mkiv
index 06884bb12..a31ed6e66 100644
--- a/tex/context/base/font-ini.mkiv
+++ b/tex/context/base/font-ini.mkiv
@@ -16,6 +16,14 @@
% todo: always fontclass, then less testing
+% \definefontfeature[smallcaps][smcp=yes,script=latn]
+% \definefontfeature[smallcaps][SmallCapitals=yes,script=latn]
+% \definefontfeature[smallcaps][Small Capitals=yes,script=latn]
+% \definefontfeature[smallcaps][small capitals=yes,script=latn]
+% \definefontfeature[smallcaps][smallcapitals=yes,script=latn]
+%
+% \definedfont[cambria*smallcaps] test
+
% \starttext
% \definefontfeature[basekerned][default][mode=base]
% \definefontfeature[nodekerned][default][mode=node]
diff --git a/tex/context/base/font-ott.lua b/tex/context/base/font-ott.lua
index 6676ff64b..47c2e0e9f 100644
--- a/tex/context/base/font-ott.lua
+++ b/tex/context/base/font-ott.lua
@@ -671,6 +671,16 @@ local to_scripts = otf.tables.to_scripts
local to_languages = otf.tables.to_languages
local to_features = otf.tables.to_features
+for k, v in pairs(to_features) do
+ local stripped = gsub(k,"%-"," ")
+ to_features[stripped] = v
+ local stripped = gsub(k,"[^a-zA-Z0-9]","")
+ to_features[stripped] = v
+end
+for k, v in pairs(to_features) do
+ to_features[lower(k)] = v
+end
+
function otf.meanings.normalize(features)
local h = { }
for k,v in next, features do
diff --git a/tex/context/base/font-xtx.lua b/tex/context/base/font-xtx.lua
index 63e421fa4..7b3f1ec81 100644
--- a/tex/context/base/font-xtx.lua
+++ b/tex/context/base/font-xtx.lua
@@ -72,7 +72,7 @@ local function isfalse(s) list[s] = 'no' end
local function iskey (k,v) list[k] = v end
local spaces = lpeg.P(" ")^0
-local namespec = (1-lpeg.S("/: ("))^0
+local namespec = (1-lpeg.S("/:("))^0 -- was: (1-lpeg.S("/: ("))^0
local crapspec = spaces * lpeg.P("/") * (((1-lpeg.P(":"))^0)/iscrap) * spaces
local filename = (lpeg.P("file:")/isfile * (namespec/thename)) + (lpeg.P("[") * lpeg.P(true)/isname * (((1-lpeg.P("]"))^0)/thename) * lpeg.P("]"))
local fontname = (lpeg.P("name:")/isname * (namespec/thename)) + lpeg.P(true)/issome * (namespec/thename)
diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua
index 7985834f2..db1a5b638 100644
--- a/tex/context/base/math-noa.lua
+++ b/tex/context/base/math-noa.lua
@@ -315,7 +315,7 @@ local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
function nodes.processors.mlist_to_hlist(head,style,penalties)
starttiming(noads)
- local head, done = actions(head,nil,style,penalties)
+ local head, done = actions(head,style,penalties)
stoptiming(noads)
return head, done
end
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index a2313f405..ec91c7d66 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -356,7 +356,7 @@ function metapost.specials.ls(specification,object,result,flusher)
if round(cb[1]*10000) == 123 then cb = metapost.colorspec(cb) end
local name = format("MpSh%s",nofshades)
local domain = { tonumber(t[1]), tonumber(t[2]) }
- local coordinates = { tonumber(t[5]), tonumber(t[6]), tonumber(t[7]), tonumber(t[9]) }
+ local coordinates = { tonumber(t[5]), tonumber(t[6]), tonumber(t[8]), tonumber(t[9]) }
if type(ca) == "string" then
-- backend specific (will be renamed)
lpdf.linearshade(name,domain,{ 0 },{ 1 },1,"DeviceGray",coordinates)
diff --git a/tex/context/base/pack-lyr.mkiv b/tex/context/base/pack-lyr.mkiv
index fc1ea91c3..dc01f7f24 100644
--- a/tex/context/base/pack-lyr.mkiv
+++ b/tex/context/base/pack-lyr.mkiv
@@ -498,7 +498,7 @@
\!!donectrue
\ifcase#1\else
\edef\@@currentlayerposition{\csname\??ll\currentlayer\c!position\endcsname}%
- \ifx\@@currentlayerposition\v!yes
+ \ifx\@@currentlayerposition\v!yes \else
\edef\@@currentlayerrepeat{\csname\??ll\currentlayer\c!repeat\endcsname}%
% \edef\@@currentlayerstate {\csname\??ll\currentlayer\c!state\endcsname}% actually this is already set
\ifx\@@currentlayerrepeat\v!yes
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 5952cbfd2..9a32ce58a 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -2895,6 +2895,12 @@
%D \bagger [a] {b}
%D \stoptyping
+% \starttexdefinition test {}
+% oeps
+% \stoptexdefinition
+%
+% [\test]
+
\bgroup \obeylines
\gdef\starttexdefinition%
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 03eeed936..0b29a8c39 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 : 07/23/09 20:13:36
+-- merge date : 08/07/09 11:24:12
do -- begin closure to overcome local limits and interference
@@ -2967,6 +2967,11 @@ fonts.mode = 'base'
fonts.private = 0xF0000 -- 0x10FFFF
fonts.verbose = false -- more verbose cache tables
+fonts.ids[0] = { -- nullfont
+ characters = { },
+ descriptions = { },
+}
+
fonts.methods = fonts.methods or {
base = { tfm = { }, afm = { }, otf = { }, vtf = { }, fix = { } },
node = { tfm = { }, afm = { }, otf = { }, vtf = { }, fix = { } },
@@ -4693,6 +4698,16 @@ local to_scripts = otf.tables.to_scripts
local to_languages = otf.tables.to_languages
local to_features = otf.tables.to_features
+for k, v in pairs(to_features) do
+ local stripped = gsub(k,"%-"," ")
+ to_features[stripped] = v
+ local stripped = gsub(k,"[^a-zA-Z0-9]","")
+ to_features[stripped] = v
+end
+for k, v in pairs(to_features) do
+ to_features[lower(k)] = v
+end
+
function otf.meanings.normalize(features)
local h = { }
for k,v in next, features do
@@ -10490,22 +10505,18 @@ evolved. Each one has its own way of dealing with its format.</p>
--ldx]]--
local function check_tfm(specification,fullname)
- -- ofm directive blocks local path search unless set
- fullname = resolvers.findbinfile(fullname, 'tfm') or "" -- just to be sure
- if fullname ~= "" then
- specification.filename, specification.format = fullname, "ofm"
+ -- ofm directive blocks local path search unless set; btw, in context we
+ -- don't support ofm files anyway as this format is obsolete
+ local foundname = resolvers.findbinfile(fullname, 'tfm') or "" -- just to be sure
+ if foundname == "" then
+ foundname = resolvers.findbinfile(fullname, 'ofm') or "" -- bonus for usage outside context
+ end
+ if foundname ~= "" then
+ specification.filename, specification.format = foundname, "ofm"
return tfm.read_from_tfm(specification)
end
end
---~ local function check_afm(specification,fullname)
---~ fullname = resolvers.findbinfile(fullname, 'afm') or "" -- just to be sure
---~ if fullname ~= "" then
---~ specification.filename, specification.format = fullname, "afm"
---~ return tfm.read_from_afm(specification)
---~ end
---~ end
-
local function check_afm(specification,fullname)
local foundname = resolvers.findbinfile(fullname, 'afm') or "" -- just to be sure
if foundname == "" and tfm.auto_afm then
@@ -10837,7 +10848,7 @@ local function isfalse(s) list[s] = 'no' end
local function iskey (k,v) list[k] = v end
local spaces = lpeg.P(" ")^0
-local namespec = (1-lpeg.S("/: ("))^0
+local namespec = (1-lpeg.S("/:("))^0 -- was: (1-lpeg.S("/: ("))^0
local crapspec = spaces * lpeg.P("/") * (((1-lpeg.P(":"))^0)/iscrap) * spaces
local filename = (lpeg.P("file:")/isfile * (namespec/thename)) + (lpeg.P("[") * lpeg.P(true)/isname * (((1-lpeg.P("]"))^0)/thename) * lpeg.P("]"))
local fontname = (lpeg.P("name:")/isname * (namespec/thename)) + lpeg.P(true)/issome * (namespec/thename)
@@ -11181,7 +11192,7 @@ function fonts.names.resolve(name,sub)
loaded = true
end
if type(data) == "table" and data.version == 1.08 then
- local condensed = string.gsub(name,"[^%a%d]","")
+ local condensed = string.gsub(string.lower(name),"[^%a%d]","")
local found = data.mapping and data.mapping[condensed]
if found then
local filename, is_sub = found[3], found[4]