summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-03-26 11:35:00 +0100
committerHans Hagen <pragma@wxs.nl>2011-03-26 11:35:00 +0100
commitdec8cba9966ab3476fb323b3d6ad7d234f4cea5e (patch)
tree9beedae7627f53b3b76f80e1b28158640d0daee4
parentc33505ae21fb29496297ad43526ba28b648e1e98 (diff)
downloadcontext-dec8cba9966ab3476fb323b3d6ad7d234f4cea5e.tar.gz
beta 2011.03.26 11:35
-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
-rw-r--r--tex/context/fonts/dingbats.lfg212
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
13 files changed, 374 insertions, 94 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
diff --git a/tex/context/fonts/dingbats.lfg b/tex/context/fonts/dingbats.lfg
new file mode 100644
index 000000000..2e2ed7c37
--- /dev/null
+++ b/tex/context/fonts/dingbats.lfg
@@ -0,0 +1,212 @@
+return {
+ name = "dingbats",
+ version = "1.00",
+ comment = "Goodies that complement dingbats (funny names).",
+ author = "Hans Hagen",
+ copyright = "ConTeXt development team",
+ remapping = {
+ unicodes = {
+ a1 = 0x2701,
+ a10 = 0x2721,
+ a100 = 0x275E,
+ a101 = 0x2761,
+ a102 = 0x2762,
+ a103 = 0x2763,
+ a104 = 0x2764,
+ a105 = 0x2710,
+ a106 = 0x2765,
+ a107 = 0x2766,
+ a108 = 0x2767,
+ a109 = 0x2660,
+ a11 = 0x261B,
+ a110 = 0x2665,
+ a111 = 0x2666,
+ a112 = 0x2663,
+ a117 = 0x2709,
+ a118 = 0x2708,
+ a119 = 0x2707,
+ a12 = 0x261E,
+ a120 = 0x2460,
+ a121 = 0x2461,
+ a122 = 0x2462,
+ a123 = 0x2463,
+ a124 = 0x2464,
+ a125 = 0x2465,
+ a126 = 0x2466,
+ a127 = 0x2467,
+ a128 = 0x2468,
+ a129 = 0x2469,
+ a13 = 0x270C,
+ a130 = 0x2776,
+ a131 = 0x2777,
+ a132 = 0x2778,
+ a133 = 0x2779,
+ a134 = 0x277A,
+ a135 = 0x277B,
+ a136 = 0x277C,
+ a137 = 0x277D,
+ a138 = 0x277E,
+ a139 = 0x277F,
+ a14 = 0x270D,
+ a140 = 0x2780,
+ a141 = 0x2781,
+ a142 = 0x2782,
+ a143 = 0x2783,
+ a144 = 0x2784,
+ a145 = 0x2785,
+ a146 = 0x2786,
+ a147 = 0x2787,
+ a148 = 0x2788,
+ a149 = 0x2789,
+ a15 = 0x270E,
+ a150 = 0x278A,
+ a151 = 0x278B,
+ a152 = 0x278C,
+ a153 = 0x278D,
+ a154 = 0x278E,
+ a155 = 0x278F,
+ a156 = 0x2790,
+ a157 = 0x2791,
+ a158 = 0x2792,
+ a159 = 0x2793,
+ a16 = 0x270F,
+ a160 = 0x2794,
+ a161 = 0x2192,
+ a162 = 0x27A3,
+ a163 = 0x2194,
+ a164 = 0x2195,
+ a165 = 0x2799,
+ a166 = 0x279B,
+ a167 = 0x279C,
+ a168 = 0x279D,
+ a169 = 0x279E,
+ a17 = 0x2711,
+ a170 = 0x279F,
+ a171 = 0x27A0,
+ a172 = 0x27A1,
+ a173 = 0x27A2,
+ a174 = 0x27A4,
+ a175 = 0x27A5,
+ a176 = 0x27A6,
+ a177 = 0x27A7,
+ a178 = 0x27A8,
+ a179 = 0x27A9,
+ a18 = 0x2712,
+ a180 = 0x27AB,
+ a181 = 0x27AD,
+ a182 = 0x27AF,
+ a183 = 0x27B2,
+ a184 = 0x27B3,
+ a185 = 0x27B5,
+ a186 = 0x27B8,
+ a187 = 0x27BA,
+ a188 = 0x27BB,
+ a189 = 0x27BC,
+ a19 = 0x2713,
+ a190 = 0x27BD,
+ a191 = 0x27BE,
+ a192 = 0x279A,
+ a193 = 0x27AA,
+ a194 = 0x27B6,
+ a195 = 0x27B9,
+ a196 = 0x2798,
+ a197 = 0x27B4,
+ a198 = 0x27B7,
+ a199 = 0x27AC,
+ a2 = 0x2702,
+ a20 = 0x2714,
+ a200 = 0x27AE,
+ a201 = 0x27B1,
+ a202 = 0x2703,
+ a203 = 0x2750,
+ a204 = 0x2752,
+ a205 = 0xF8DD,
+ a206 = 0xF8DF,
+ a21 = 0x2715,
+ a22 = 0x2716,
+ a23 = 0x2717,
+ a24 = 0x2718,
+ a25 = 0x2719,
+ a26 = 0x271A,
+ a27 = 0x271B,
+ a28 = 0x271C,
+ a29 = 0x2722,
+ a3 = 0x2704,
+ a30 = 0x2723,
+ a31 = 0x2724,
+ a32 = 0x2725,
+ a33 = 0x2726,
+ a34 = 0x2727,
+ a35 = 0x2605,
+ a36 = 0x2729,
+ a37 = 0x272A,
+ a38 = 0x272B,
+ a39 = 0x272C,
+ a4 = 0x260E,
+ a40 = 0x272D,
+ a41 = 0x272E,
+ a42 = 0x272F,
+ a43 = 0x2730,
+ a44 = 0x2731,
+ a45 = 0x2732,
+ a46 = 0x2733,
+ a47 = 0x2734,
+ a48 = 0x2735,
+ a49 = 0x2736,
+ a5 = 0x2706,
+ a50 = 0x2737,
+ a51 = 0x2738,
+ a52 = 0x2739,
+ a53 = 0x273A,
+ a54 = 0x273B,
+ a55 = 0x273C,
+ a56 = 0x273D,
+ a57 = 0x273E,
+ a58 = 0x273F,
+ a59 = 0x2740,
+ a6 = 0x271D,
+ a60 = 0x2741,
+ a61 = 0x2742,
+ a62 = 0x2743,
+ a63 = 0x2744,
+ a64 = 0x2745,
+ a65 = 0x2746,
+ a66 = 0x2747,
+ a67 = 0x2748,
+ a68 = 0x2749,
+ a69 = 0x274A,
+ a7 = 0x271E,
+ a70 = 0x274B,
+ a71 = 0x25CF,
+ a72 = 0x274D,
+ a73 = 0x25A0,
+ a74 = 0x274F,
+ a75 = 0x2751,
+ a76 = 0x25B2,
+ a77 = 0x25BC,
+ a78 = 0x25C6,
+ a79 = 0x2756,
+ a8 = 0x271F,
+ a81 = 0x25D7,
+ a82 = 0x2758,
+ a83 = 0x2759,
+ a84 = 0x275A,
+ a85 = 0xF8DE,
+ a86 = 0xF8E0,
+ a87 = 0xF8E1,
+ a88 = 0xF8E2,
+ a89 = 0xF8D7,
+ a9 = 0x2720,
+ a90 = 0xF8D8,
+ a91 = 0xF8DB,
+ a92 = 0xF8DC,
+ a93 = 0xF8D9,
+ a94 = 0xF8DA,
+ a95 = 0xF8E3,
+ a96 = 0xF8E4,
+ a97 = 0x275B,
+ a98 = 0x275C,
+ a99 = 0x275D,
+ },
+ },
+}
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index cfe417ab9..840e64e4a 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 : 03/25/11 19:31:40
+-- merge date : 03/26/11 11:35:06
do -- begin closure to overcome local limits and interference