summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-08-09 22:57:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-08-09 22:57:00 +0200
commite31ad5bc5980ee238e41d64bfd3303d48fea30f8 (patch)
tree1a28ff074526a094199bb696f33eff60aed24a08 /tex
parentc2fda456f975562068e66deb9905a9721af82ddf (diff)
downloadcontext-e31ad5bc5980ee238e41d64bfd3303d48fea30f8.tar.gz
beta 2009.08.09 22:57
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/data-res.lua3
-rw-r--r--tex/context/base/font-def.lua7
-rw-r--r--tex/context/base/font-dum.lua2
-rw-r--r--tex/context/base/font-syn.lua9
-rw-r--r--tex/context/base/luat-dum.lua9
-rw-r--r--tex/context/base/meta-ini.mkiv1
-rw-r--r--tex/context/base/mlib-pdf.lua4
-rw-r--r--tex/context/base/mlib-pps.lua2
-rw-r--r--tex/context/base/node-ref.lua41
-rw-r--r--tex/context/base/pack-lyr.mkii4
-rw-r--r--tex/context/base/pack-lyr.mkiv13
-rw-r--r--tex/context/base/strc-sbe.mkiv9
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua20
15 files changed, 81 insertions, 47 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 857d90dd6..4ba8f7755 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.08.07 11:22}
+\newcontextversion{2009.08.09 22:57}
%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 90ab3117d..73106ae70 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.08.07 11:22}
+\edef\contextversion{2009.08.09 22:57}
%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 0981881a2..da51dc64a 100644
--- a/tex/context/base/data-res.lua
+++ b/tex/context/base/data-res.lua
@@ -90,7 +90,7 @@ formats['ovf'] = 'OVFFONTS' suffixes['ovf'] = { 'ovf', 'vf' }
formats['ovp'] = 'OVPFONTS' suffixes['ovp'] = { 'ovp' }
formats['tex'] = 'TEXINPUTS' suffixes['tex'] = { 'tex' }
formats['tfm'] = 'TFMFONTS' suffixes['tfm'] = { 'tfm' }
-formats['ttf'] = 'TTFONTS' suffixes['ttf'] = { 'ttf', 'ttc' }
+formats['ttf'] = 'TTFONTS' suffixes['ttf'] = { 'ttf', 'ttc', 'dfont' }
formats['pfb'] = 'T1FONTS' suffixes['pfb'] = { 'pfb', 'pfa' }
formats['vf'] = 'VFFONTS' suffixes['vf'] = { 'vf' }
@@ -112,6 +112,7 @@ alternatives['fea files'] = 'fea'
alternatives['opentype fonts'] = 'otf'
alternatives['truetype fonts'] = 'ttf'
alternatives['truetype collections'] = 'ttc'
+alternatives['truetype dictionary'] = 'dfont'
alternatives['type1 fonts'] = 'pfb'
-- obscure ones
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index c4b72194c..3301c39f2 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -436,9 +436,10 @@ function readers.opentype(specification,suffix,what)
end
end
-function readers.otf(specification) return readers.opentype(specification,"otf","opentype") end
-function readers.ttf(specification) return readers.opentype(specification,"ttf","truetype") end
-function readers.ttc(specification) return readers.opentype(specification,"ttf","truetype") end -- !!
+function readers.otf (specification) return readers.opentype(specification,"otf","opentype") end
+function readers.ttf (specification) return readers.opentype(specification,"ttf","truetype") end
+function readers.ttc (specification) return readers.opentype(specification,"ttf","truetype") end -- !!
+function readers.dfont(specification) return readers.opentype(specification,"ttf","truetype") end -- !!
--[[ldx--
<p>We need to check for default features. For this we provide
diff --git a/tex/context/base/font-dum.lua b/tex/context/base/font-dum.lua
index 1421b3045..401d2a343 100644
--- a/tex/context/base/font-dum.lua
+++ b/tex/context/base/font-dum.lua
@@ -60,7 +60,7 @@ function fonts.names.resolve(name,sub)
local d = { }
for k, v in pairs(data.mapping) do
local t = v[1]
- if t == "ttf" or t == "otf" or t == "ttc" then
+ if t == "ttf" or t == "otf" or t == "ttc" or t = "dfont" then
d[k] = v
end
end
diff --git a/tex/context/base/font-syn.lua b/tex/context/base/font-syn.lua
index d50d44100..84bf7f91c 100644
--- a/tex/context/base/font-syn.lua
+++ b/tex/context/base/font-syn.lua
@@ -43,9 +43,10 @@ names.cache = containers.define("fonts","data",names.version,true)
but to keep the overview, we define them here.</p>
--ldx]]--
-filters.otf = fontloader.info
-filters.ttf = fontloader.info
-filters.ttc = fontloader.info
+filters.otf = fontloader.info
+filters.ttf = fontloader.info
+filters.ttc = fontloader.info
+filters.dfont = fontloader.info
function filters.afm(name)
local pfbname = resolvers.find_file(file.removesuffix(name)..".pfb","pfb") or ""
@@ -83,7 +84,7 @@ for combination with the weight of a font.</p>
--ldx]]--
filters.list = {
- "otf", "ttf", "ttc", "afm",
+ "otf", "ttf", "ttc", "dfont", "afm",
}
filters.fixes = {
diff --git a/tex/context/base/luat-dum.lua b/tex/context/base/luat-dum.lua
index f2ff50577..699a0feef 100644
--- a/tex/context/base/luat-dum.lua
+++ b/tex/context/base/luat-dum.lua
@@ -40,10 +40,11 @@ texconfig.kpse_init = true
resolvers = resolvers or { } -- no fancy file helpers used
local remapper = {
- otf = "opentype fonts",
- ttf = "truetype fonts",
- ttc = "truetype fonts",
- cid = "other text files", -- will become "cid files"
+ otf = "opentype fonts",
+ ttf = "truetype fonts",
+ ttc = "truetype fonts",
+ dfont = "truetype dictionary",
+ cid = "other text files", -- will become "cid files"
}
function resolvers.find_file(name,kind)
diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv
index ea3870dc2..ff4d48c1d 100644
--- a/tex/context/base/meta-ini.mkiv
+++ b/tex/context/base/meta-ini.mkiv
@@ -1239,7 +1239,6 @@
% can be faster, just
\appendtoks
-% \ctxlua{metapost.set_outer_color(\number\MPcolormethod,"\PDFcolor{\currentcolorname}","")}%
\ctxlua{metapost.set_outer_color(\number\MPcolormethod,\number\currentcolormodel,\number\dogetattribute{color},\number\dogetattribute{transparency})}%
\to \everyMPgraphic
diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua
index b0b4bfe4f..38b61b0ba 100644
--- a/tex/context/base/mlib-pdf.lua
+++ b/tex/context/base/mlib-pdf.lua
@@ -413,7 +413,9 @@ function metapost.flush(result,flusher,askedfig) -- pdf flusher, table en dan co
flusher.flushfigure(t)
flusher.stopfigure("end")
end
- break
+ if askedfig then
+ break
+ end
end
end
end
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index ec91c7d66..79c3dd34f 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -63,7 +63,7 @@ function metapost.set_outer_color(mode,colormodel,colorattribute,transparencyatt
outercolor = pdfcolor(colormodel,colorattribute) or nooutercolor
outertransparency = pdftransparency(transparencyattribute) or nooutertransparency
elseif mode == 2 then
- -- stand alone
+ -- stand alone (see m-punk.tex)
outercolor = ""
outertransparency = ""
else -- 0
diff --git a/tex/context/base/node-ref.lua b/tex/context/base/node-ref.lua
index 8e7c3e983..36f6928fd 100644
--- a/tex/context/base/node-ref.lua
+++ b/tex/context/base/node-ref.lua
@@ -19,19 +19,8 @@ local cleanupreferences, cleanupdestinations = false, true
local nodeinjections = backends.nodeinjections
local codeinjections = backends.codeinjections
-local hpack_list = node.hpack
-local copy_list = node.copy_list
-local flush_list = node.flush_list
-
-local function dimensions(parent,start,stop) -- so we need parent for glue_set info
- local n = stop.next
- stop.next = nil
- local p = hpack_list(copy_list(start))
- stop.next = n
- local w, h, d = p.width, p.height, p.depth
- flush_list(p)
- return w, h, d
-end
+local hpack_list = node.hpack
+local list_dimensions = node.dimensions
-- current.glue_set current.glue_sign
@@ -51,6 +40,28 @@ local traverse = node.traverse
local find_node_tail = node.tail or node.slide
local tosequence = nodes.tosequence
+--~ local copy_list = node.copy_list
+--~ local flush_list = node.flush_list
+--~
+--~ local function dimensions(parent,start,stop) -- so we need parent for glue_set info
+--~ local n = stop.next
+--~ stop.next = nil
+--~ local p = hpack_list(copy_list(start))
+--~ stop.next = n
+--~ local w, h, d = p.width, p.height, p.depth
+--~ flush_list(p)
+--~ return w, h, d
+--~ end
+
+local function dimensions(parent,start,stop) -- so we need parent for glue_set info
+ stop = stop and stop.next
+ if stop then
+ return list_dimensions(start,stop)
+ else
+ return list_dimensions(start)
+ end
+end
+
local function inject_range(head,first,last,reference,make,stack,parent,pardir,txtdir)
local width, height, depth = dimensions(parent,first,last)
if pardir == "TRT" or txtdir == "+TRT" then
@@ -103,7 +114,7 @@ local function inject_list(id,current,reference,make,stack,pardir,txtdir)
if last.id == glue and last.subtype == 9 then
local prev = last.prev
moveright = first.id == glue and first.subtype == 8
- if prev.id == glue and prev.subtype == 15 then
+ if prev and prev.id == glue and prev.subtype == 15 then
width = dimensions(current,first,prev.prev) -- maybe not current as we already take care of it
else
if moveright and first.spec then
@@ -173,7 +184,7 @@ local function inject_areas(head,attribute,make,stack,done,skip,parent,pardir,tx
end
local list = current.list
if list then
- local pd
+ local _
current.list, _, pardir, txtdir = inject_areas(list,attribute,make,stack,done,r or skip or 0,current,pardir,txtdir)
end
elseif not r then
diff --git a/tex/context/base/pack-lyr.mkii b/tex/context/base/pack-lyr.mkii
index 768b1e0c9..85549bccb 100644
--- a/tex/context/base/pack-lyr.mkii
+++ b/tex/context/base/pack-lyr.mkii
@@ -150,7 +150,9 @@
{\ifthirdargument
\dodosetlayer[#1][#2][#3]%
\else
- \dodosetlayer[#1][][#2]%
+ \doifassignmentelse{#2}
+ {\dodosetlayer[#1][][#2]}%
+ {\dodosetlayer[#1][#2][]}%
\fi}}
\def\dodosetlayer[#1][#2][#3]% #2 = links/rechts
diff --git a/tex/context/base/pack-lyr.mkiv b/tex/context/base/pack-lyr.mkiv
index dc01f7f24..2e1bd2a11 100644
--- a/tex/context/base/pack-lyr.mkiv
+++ b/tex/context/base/pack-lyr.mkiv
@@ -140,13 +140,24 @@
\def\setlayer
{\dotripleempty\dosetlayer}
+% \def\dosetlayer[#1][#2][#3]% #4 == box do \fi is ok
+% {\doifelsevalue{\??ll#1\c!state}\v!stop
+% {\dowithnextbox\donothing\hbox}
+% {\ifthirdargument
+% \dodosetlayer[#1][#2][#3]%
+% \else
+% \dodosetlayer[#1][][#2]%
+% \fi}}
+
\def\dosetlayer[#1][#2][#3]% #4 == box do \fi is ok
{\doifelsevalue{\??ll#1\c!state}\v!stop
{\dowithnextbox\donothing\hbox}
{\ifthirdargument
\dodosetlayer[#1][#2][#3]%
\else
- \dodosetlayer[#1][][#2]%
+ \doifassignmentelse{#2}
+ {\dodosetlayer[#1][][#2]}%
+ {\dodosetlayer[#1][#2][]}%
\fi}}
\def\dodosetlayer[#1][#2][#3]% #2 = links/rechts
diff --git a/tex/context/base/strc-sbe.mkiv b/tex/context/base/strc-sbe.mkiv
index de7c2af63..7db3cedb0 100644
--- a/tex/context/base/strc-sbe.mkiv
+++ b/tex/context/base/strc-sbe.mkiv
@@ -96,7 +96,8 @@
\def\getstructureblockenvironment#1%
{\let\do\firstofoneargument
- \structureblockparameter{\s!do#1}}
+ %\structureblockparameter{\s!do#1}}
+ \csname\??nb\s!do#1\endcsname}
%D \starttyping
%D \startsectionblockenvironment[frontpart]
@@ -123,7 +124,8 @@
\def\dostartstructureblockenvironment[#1]% evt \pushendofline \popendofline
{\long\def\do##1##2{\setstructureblockenvironment{#1}{##1##2}}%
- \grabuntil{\e!stop\v!structureblockenvironment}{\structureblockparameter{\s!do#1}}}
+ %\grabuntil{\e!stop\v!structureblockenvironment}{\structureblockparameter{\s!do#1}}}
+ \grabuntil{\e!stop\v!structureblockenvironment}{\csname\??nb\s!do#1\endcsname}}
% this will become: (we ran in parallel for a while during transition)
@@ -132,6 +134,7 @@
\def\dostartsectionblockenvironment[#1]% evt \pushendofline \popendofline
{\long\def\do##1##2{\setstructureblockenvironment{#1}{##1##2}}%
- \grabuntil{\e!stop\v!sectionblockenvironment}{\structureblockparameter{\s!do#1}}}
+ %\grabuntil{\e!stop\v!sectionblockenvironment}{\structureblockparameter{\s!do#1}}}
+ \grabuntil{\e!stop\v!sectionblockenvironment}{\csname\??nb\s!do#1\endcsname}}
\protect \endinput
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 0b29a8c39..1dc84f257 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 : 08/07/09 11:24:12
+-- merge date : 08/09/09 22:59:38
do -- begin closure to overcome local limits and interference
@@ -1771,10 +1771,11 @@ texconfig.kpse_init = true
resolvers = resolvers or { } -- no fancy file helpers used
local remapper = {
- otf = "opentype fonts",
- ttf = "truetype fonts",
- ttc = "truetype fonts",
- cid = "other text files", -- will become "cid files"
+ otf = "opentype fonts",
+ ttf = "truetype fonts",
+ ttc = "truetype fonts",
+ dfont = "truetype dictionary",
+ cid = "other text files", -- will become "cid files"
}
function resolvers.find_file(name,kind)
@@ -10613,9 +10614,10 @@ function readers.opentype(specification,suffix,what)
end
end
-function readers.otf(specification) return readers.opentype(specification,"otf","opentype") end
-function readers.ttf(specification) return readers.opentype(specification,"ttf","truetype") end
-function readers.ttc(specification) return readers.opentype(specification,"ttf","truetype") end -- !!
+function readers.otf (specification) return readers.opentype(specification,"otf","opentype") end
+function readers.ttf (specification) return readers.opentype(specification,"ttf","truetype") end
+function readers.ttc (specification) return readers.opentype(specification,"ttf","truetype") end -- !!
+function readers.dfont(specification) return readers.opentype(specification,"ttf","truetype") end -- !!
--[[ldx--
<p>We need to check for default features. For this we provide
@@ -11179,7 +11181,7 @@ function fonts.names.resolve(name,sub)
local d = { }
for k, v in pairs(data.mapping) do
local t = v[1]
- if t == "ttf" or t == "otf" or t == "ttc" then
+ if t == "ttf" or t == "otf" or t == "ttc" or t = "dfont" then
d[k] = v
end
end