summaryrefslogtreecommitdiff
path: root/tex/context/base
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base')
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-ctx.lua2
-rw-r--r--tex/context/base/font-enh.lua167
-rw-r--r--tex/context/base/font-gds.lua44
-rw-r--r--tex/context/base/font-ini.mkiv8
-rw-r--r--tex/context/base/math-lbr.mkii12
-rw-r--r--tex/context/base/page-lay.mkii13
-rw-r--r--tex/context/base/status-files.pdfbin23536 -> 23564 bytes
11 files changed, 161 insertions, 93 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 376e958e3..e6239cf11 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.03.25 19:31}
+\newcontextversion{2011.03.26 11:35}
%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/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index a206d29d5..8a87d5d6d 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{2011.03.25 19:31}
+\newcontextversion{2011.03.26 11:35}
%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.mkii b/tex/context/base/context.mkii
index d0d0f24e1..87de9a1ae 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.03.25 19:31}
+\edef\contextversion{2011.03.26 11:35}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 1c3ea57f9..da17e89a1 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.03.25 19:31}
+\edef\contextversion{2011.03.26 11:35}
%D For those who want to use this:
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua
index 9b1dc03ec..f425b79de 100644
--- a/tex/context/base/font-ctx.lua
+++ b/tex/context/base/font-ctx.lua
@@ -529,7 +529,7 @@ local somevalue = sometext * spaces * Cc(tru
local pattern = Cf(Ct("") * (space + separator + Cg(keyvalue + falsevalue + truevalue + somevalue))^0, rawset)
local function colonized(specification)
- specification.features.normal = normalize_features(lpegmatch(pattern,specification.specification))
+ specification.features.normal = normalize_features(lpegmatch(pattern,specification.detail))
return specification
end
diff --git a/tex/context/base/font-enh.lua b/tex/context/base/font-enh.lua
index 3e3535f87..54e5e242a 100644
--- a/tex/context/base/font-enh.lua
+++ b/tex/context/base/font-enh.lua
@@ -17,76 +17,117 @@ local constructors = fonts.constructors
local tfmfeatures = constructors.newfeatures("tfm")
local registertfmfeature = tfmfeatures.register
-local fontencodings = fonts.encodings
-fontencodings.remappings = fontencodings.remappings or { }
+local afmfeatures = fonts.constructors.newfeatures("afm")
+local registerafmfeature = afmfeatures.register
-local function reencode(tfmdata,encoding)
- if encoding and fontencodings.known[encoding] then
- local data = fontencodings.load(encoding)
- if data then
- tfmdata.properties.encoding = encoding
- local characters = tfmdata.characters
- local original = { }
- local vector = data.vector
- for unicode, character in next, characters do
- character.name = vector[unicode]
- character.index = unicode, character
- original[unicode] = character
- end
- for newcode, oldcode in next, data.unicodes do
- if newcode ~= oldcode then
- if trace_defining then
- report_defining("reencoding U+%04X to U+%04X",newcode,oldcode)
- end
- characters[newcode] = original[oldcode]
- end
- end
- end
- end
-end
+-- -- these will become goodies (when needed at all)
+--
+-- local fontencodings = fonts.encodings
+-- fontencodings.remappings = fontencodings.remappings or { }
+--
+-- local function reencode(tfmdata,encoding)
+-- if encoding and fontencodings.known[encoding] then
+-- local data = fontencodings.load(encoding)
+-- if data then
+-- tfmdata.properties.encoding = encoding
+-- local characters = tfmdata.characters
+-- local original = { }
+-- local vector = data.vector
+-- for unicode, character in next, characters do
+-- character.name = vector[unicode]
+-- character.index = unicode, character
+-- original[unicode] = character
+-- end
+-- for newcode, oldcode in next, data.unicodes do
+-- if newcode ~= oldcode then
+-- if trace_defining then
+-- report_defining("reencoding U+%04X to U+%04X",newcode,oldcode)
+-- end
+-- characters[newcode] = original[oldcode]
+-- end
+-- end
+-- end
+-- end
+-- end
+--
+-- registertfmfeature {
+-- name = "reencode",
+-- description = "reencode",
+-- manipulators = {
+-- base = reencode,
+-- node = reencode,
+-- }
+-- }
+--
+-- local function remap(tfmdata,remapping)
+-- local vector = remapping and fontencodings.remappings[remapping]
+-- if vector then
+-- local characters, original = tfmdata.characters, { }
+-- for k, v in next, characters do
+-- original[k], characters[k] = v, nil
+-- end
+-- for k,v in next, vector do
+-- if k ~= v then
+-- if trace_defining then
+-- report_defining("remapping U+%04X to U+%04X",k,v)
+-- end
+-- local c = original[k]
+-- characters[v] = c
+-- c.index = k
+-- end
+-- end
+-- local properties = tfmdata.properties
+-- if not properties then
+-- properties = { }
+-- tfmdata.properties = properties
+-- else
+-- properties.encodingbytes = 2
+-- properties.format = properties.format or 'type1'
+-- end
+-- end
+-- end
+--
+-- registertfmfeature {
+-- name = "remap",
+-- description = "remap",
+-- manipulators = {
+-- base = remap,
+-- node = remap,
+-- }
+-- }
-registertfmfeature {
- name = "reencode",
- description = "reencode",
- manipulators = {
- base = reencode,
- node = reencode,
- }
-}
+-- \definefontfeature[dingbats][goodies=dingbats,unicoding=yes]
-local function remap(tfmdata,remapping)
- local vector = remapping and fontencodings.remappings[remapping]
- if vector then
- local characters, original = tfmdata.characters, { }
- for k, v in next, characters do
- original[k], characters[k] = v, nil
- end
- for k,v in next, vector do
- if k ~= v then
- if trace_defining then
- report_defining("remapping U+%04X to U+%04X",k,v)
- end
- local c = original[k]
- characters[v] = c
- c.index = k
- end
+-- we only add and don't replace
+-- we could also add kerns but we asssume symbols
+
+local function initializeunicoding(tfmdata)
+ local goodies = tfmdata.goodies
+ local newcoding = nil
+ for i=1,#goodies do
+ local remapping = goodies[i].remapping
+ if remapping and remapping.unicodes then
+ newcoding = remapping.unicodes -- names to unicodes
end
- local properties = tfmdata.properties
- if not properties then
- properties = { }
- tfmdata.properties = properties
- else
- properties.encodingbytes = 2
- properties.format = properties.format or 'type1'
+ end
+ if newcoding then
+ local characters = tfmdata.characters
+ local descriptions = tfmdata.descriptions
+ local oldcoding = tfmdata.resources.unicodes
+ for name, newcode in next, newcoding do
+ local oldcode = oldcoding[name]
+ characters [newcode] = characters [oldcode]
+ descriptions[newcode] = descriptions[oldcode]
end
end
end
-registertfmfeature {
- name = "remap",
- description = "remap",
- manipulators = {
- base = remap,
- node = remap,
+registerafmfeature {
+ name = "unicoding",
+ description = "adapt unicode table",
+ initializers = {
+ base = initializeunicoding,
+ node = initializeunicoding,
}
}
+
diff --git a/tex/context/base/font-gds.lua b/tex/context/base/font-gds.lua
index c2ff92fbf..556f093d4 100644
--- a/tex/context/base/font-gds.lua
+++ b/tex/context/base/font-gds.lua
@@ -21,6 +21,12 @@ local allocate = utilities.storage.allocate
local otffeatures = fonts.constructors.newfeatures("otf")
local registerotffeature = otffeatures.register
+local afmfeatures = fonts.constructors.newfeatures("afm")
+local registerafmfeature = afmfeatures.register
+
+local tfmfeatures = fonts.constructors.newfeatures("tfm")
+local registertfmfeature = tfmfeatures.register
+
local fontgoodies = { }
fonts.goodies = fontgoodies
@@ -311,6 +317,26 @@ registerotffeature {
}
}
+registerafmfeature {
+ name = "goodies",
+ description = "goodies on top of built in features",
+ initializers = {
+ position = 1,
+ base = setgoodies,
+ node = setgoodies,
+ }
+}
+
+registertfmfeature {
+ name = "goodies",
+ description = "goodies on top of built in features",
+ initializers = {
+ position = 1,
+ base = setgoodies,
+ node = setgoodies,
+ }
+}
+
registerotffeature {
name = "featureset",
description = "goodie feature set",
@@ -345,9 +371,9 @@ registerotffeature {
local function initialize(goodies)
local mathgoodies = goodies.mathematics
if mathgoodies then
- local virtuals = mathgoodies.virtuals
- local mapfiles = mathgoodies.mapfiles
- local maplines = mathgoodies.maplines
+ local virtuals = mathgoodies.virtuals
+ local mapfiles = mathgoodies.mapfiles
+ local maplines = mathgoodies.maplines
if virtuals then
for name, specification in next, virtuals do
-- beware, they are all constructed
@@ -418,18 +444,6 @@ end
fontgoodies.register("typefaces", initialize)
-local function initialize(goodies)
- local typefaces = goodies.typefaces
- if typefaces then
- local ft = fonts.typefaces
- for k, v in next, typefaces do
- ft[k] = v
- end
- end
-end
-
-fontgoodies.register("typefaces", initialize)
-
local compositions = { }
function fontgoodies.getcompositions(tfmdata)
diff --git a/tex/context/base/font-ini.mkiv b/tex/context/base/font-ini.mkiv
index 69a00450b..f4a1fc5ba 100644
--- a/tex/context/base/font-ini.mkiv
+++ b/tex/context/base/font-ini.mkiv
@@ -2916,6 +2916,14 @@
init=yes,medi=yes,fina=yes,calt=yes,
rlig=yes,curs=yes,mark=yes,mkmk=yes]
+% symbols:
+
+\definefontfeature
+ [dingbats]
+ [mode=base,
+ goodies=dingbats,
+ unicoding=yes]
+
% math:
\definefontfeature
diff --git a/tex/context/base/math-lbr.mkii b/tex/context/base/math-lbr.mkii
index 048559700..6392c762e 100644
--- a/tex/context/base/math-lbr.mkii
+++ b/tex/context/base/math-lbr.mkii
@@ -295,12 +295,12 @@
\stopmathcollection
-% \startmathcollection[lbr]
-%
-% \definemathcharacter [:] [punct] [tf] ["3A] % unbelievable
-% \definemathcharacter [;] [punct] [tf] ["3B] % unbelievable
-%
-% \stopmathcollection
+\startmathcollection[lbr]
+
+\definemathcharacter [:] [punct] [tf] ["3A] % unbelievable, but enabled again for Mojca
+\definemathcharacter [;] [punct] [tf] ["3B] % unbelievable, but enabled again for Mojca
+
+\stopmathcollection
\startmathcollection[lbr]
diff --git a/tex/context/base/page-lay.mkii b/tex/context/base/page-lay.mkii
index 0bf375102..d40e1ccb7 100644
--- a/tex/context/base/page-lay.mkii
+++ b/tex/context/base/page-lay.mkii
@@ -295,7 +295,7 @@
{\doifelsenothing{#2}
{\expanded{\dodosetuppapersize
[\executeifdefined{\??pp:1:#1}{#1}]%
- [\executeifdefined{\??pp:2:#1}{}]}}
+ [\executeifdefined{\??pp:2:#1}{\v!default}]}}
{\doifassignmentelse{#2}
{\getparameters[\??pp\executeifdefined{\??pp:1:#1}{#1}][#2]}
{\expanded{\dodosetuppapersize
@@ -1390,9 +1390,14 @@
\c!height=\dimexpr2\paperwidth +1.5cm\relax]
\definepapersize
- [samesized]
- [ \c!width=\paperwidth,
- \c!height=\paperheight]
+ [\v!default]
+ [ \c!width=\paperwidth,
+ \c!height=\paperheight]
+
+\definepapersize
+ [samesized]
+ [ \c!width=\paperwidth,
+ \c!height=\paperheight]
\setuppapersize
[A4][samesized]
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index ddd731194..453aa9d08 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ