summaryrefslogtreecommitdiff
path: root/tex/context/fonts/mkiv/antykwa-math.lfg
blob: 5bbd2cf6ce589828cb971326e3b0d646f4e7bce3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
local common  = fonts.goodies.load("common-math-jmn.lfg")
local helpers = common.mathematics.helpers

if not fonts.encodings.math["extensible-jmn-private"] then

    local nps = fonts.helpers.newprivateslot

    fonts.encodings.math["extensible-jmn-private"] = {
        [nps("rule middle piece")]         = 200, -- minusjmn
        [nps("rule right piece")]          = 201, -- minusrightjmn
        [nps("rule left piece")]           = 202, -- minusleftjmn
        [nps("double rule middle piece")]  = 203, -- equaljmn
        [nps("double rule right piece")]   = 204, -- equalrightjmn
        [nps("double rule left piece")]    = 205, -- equalleftjmn
        [nps("arrow left piece")]          = 206, -- arrowleftjmn
        [nps("arrow right piece")]         = 207, -- arrowrightjmn
        [nps("double arrow left piece")]   = 208, -- arrowdblleftjmn
        [nps("double arrow right piece")]  = 209, -- arrowdblrightjmn
    }

end

local fraction = .25

local badones = {
    summationtext         = fraction,
    producttext           = fraction,
    integraltext          = fraction,
    uniontext             = fraction,
    intersectiontext      = fraction,
    unionmultitext        = fraction,
    logicalandtext        = fraction,
    logicalortext         = fraction,
    summationdisplay      = fraction,
    productdisplay        = fraction,
    integraldisplay       = fraction,
    uniondisplay          = fraction,
    intersectiondisplay   = fraction,
    unionmultidisplay     = fraction,
    logicalanddisplay     = fraction,
    logicalordisplay      = fraction,
    coproducttext         = fraction,
    coproductdisplay      = fraction,

    braceleftBig          = fraction,
    braceleftBigg         = fraction,
    braceleftbig          = fraction,
    braceleftbigg         = fraction,
    parenleftBig          = fraction,
    parenleftBigg         = fraction,
    parenleftbig          = fraction,
    parenleftbigg         = fraction,
    bracketleftBig        = fraction,
    bracketleftBigg       = fraction,
    bracketleftbig        = fraction,
    bracketleftbigg       = fraction,
    ceilingleftBig        = fraction,
    ceilingleftBigg       = fraction,
    ceilingleftbig        = fraction,
    ceilingleftbigg       = fraction,
    floorleftBig          = fraction,
    floorleftBigg         = fraction,
    floorleftbig          = fraction,
    floorleftbigg         = fraction,
    anglebracketleftBig   = fraction,
    anglebracketleftBigg  = fraction,
    anglebracketleftbig   = fraction,
    anglebracketleftbigg  = fraction,

    bracerightBig         = fraction,
    bracerightBigg        = fraction,
    bracerightbig         = fraction,
    bracerightbigg        = fraction,
    parenrightBig         = fraction,
    parenrightBigg        = fraction,
    parenrightbig         = fraction,
    parenrightbigg        = fraction,
    bracketrightBig       = fraction,
    bracketrightBigg      = fraction,
    bracketrightbig       = fraction,
    bracketrightbigg      = fraction,
    ceilingrightBig       = fraction,
    ceilingrightBigg      = fraction,
    ceilingrightbig       = fraction,
    ceilingrightbigg      = fraction,
    floorrightBig         = fraction,
    floorrightBigg        = fraction,
    floorrightbig         = fraction,
    floorrightbigg        = fraction,
    anglebracketrightBig  = fraction,
    anglebracketrightBigg = fraction,
    anglebracketrightbig  = fraction,
    anglebracketrightbigg = fraction,

    backslashBig          = fraction,
    backslashBigg         = fraction,
    backslashbig          = fraction,
    backslashbigg         = fraction,
}

local uglyones = {
    braceleft     = true,
    braceright    = true,
    vextendsingle = true,
    vextenddouble = true,
}

return {
    name = "antykwa-math",
    version = "1.00",
    comment = "Goodies that complement antykwa math.",
    author = "Hans, Mojca, Aditya, Mikael",
    copyright = "ConTeXt development team",
    mathematics = {
        mapfiles = {
            "antt-rm.map",
            "antt-mi.map",
            "antt-sy.map",
            "antt-ex.map",
         -- "mkiv-base.map",
        },
        variables = {
            notshiftfactor = 0.075,
        },
        virtuals = {
            ["antykwa-math"] = {
                { name = "file:LatinModern-Math", features = "virtualmath-antykwa", main = true, parameters = false },
                --
                { name = "rm-anttr.tfm",  vector = "tex-mr", skewchar=0x7F },
                { name = "mi-anttri.tfm", vector = "tex-mi", skewchar=0x7F },
                { name = "mi-anttri.tfm", vector = "tex-it", skewchar=0x7F },
                { name = "mi-anttbi.tfm", vector = "tex-bi", skewchar=0x7F },
                { name = "rm-anttb.tfm",  vector = "tex-bf", skewchar=0x7F },
                { name = "sy-anttrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true
                { name = "sy-anttrz.tfm", vector = "extensible-jmn-private", skewchar=0x30 },
                { name = "file:AntykwaTorunska-Regular", vector = "tex-ex-braces", backmap = false },
                { name = "ex-anttr.tfm",  vector = "tex-ex", extension = true, badones = badones, ignore = uglyones },
            },
            ["antykwa-light-math"] = {
                { name = "file:LatinModern-Math", features = "virtualmath-antykwa-light", main = true, parameters = false },
                --
                { name = "rm-anttl.tfm",  vector = "tex-mr", skewchar=0x7F },
                { name = "mi-anttli.tfm", vector = "tex-mi", skewchar=0x7F },
                { name = "mi-anttli.tfm", vector = "tex-it", skewchar=0x7F },
                { name = "mi-anttri.tfm", vector = "tex-bi", skewchar=0x7F },
                { name = "rm-anttr.tfm",  vector = "tex-bf", skewchar=0x7F },
                { name = "sy-anttlz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true
                { name = "sy-anttlz.tfm", vector = "extensible-jmn-private", skewchar=0x30 },
                { name = "file:AntykwaTorunskaLight-Regular", vector = "tex-ex-braces", backmap = false },
                { name = "ex-anttl.tfm",  vector = "tex-ex", extension = true, badones = badones, ignore = uglyone },
            },
            ["antykwa-cond-math"] = {
                { name = "file:LatinModern-Math", features = "virtualmath-antykwa-cond", main = true, parameters = false },
                --
                { name = "rm-anttcr.tfm",  vector = "tex-mr", skewchar=0x7F },
                { name = "mi-anttcri.tfm", vector = "tex-mi", skewchar=0x7F },
                { name = "mi-anttcri.tfm", vector = "tex-it", skewchar=0x7F },
                { name = "mi-anttcbi.tfm", vector = "tex-bi", skewchar=0x7F },
                { name = "rm-anttcb.tfm",  vector = "tex-bf", skewchar=0x7F },
                { name = "sy-anttcrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true
                { name = "sy-anttcrz.tfm", vector = "extensible-jmn-private", skewchar=0x30 },
                { name = "file:AntykwaTorunskaCond-Regular", vector = "tex-ex-braces", backmap = false },
                { name = "ex-anttcr.tfm",  vector = "tex-ex", extension = true, badones = badones, ignore = uglyone },
            },
            ["antykwa-lightcond-math"] = {
                { name = "file:LatinModern-Math", features = "virtualmath-antykwa-lightcond", main = true, parameters = false },
                --
                { name = "rm-anttcl.tfm",  vector = "tex-mr", skewchar=0x7F },
                { name = "mi-anttcli.tfm", vector = "tex-mi", skewchar=0x7F },
                { name = "mi-anttcli.tfm", vector = "tex-it", skewchar=0x7F },
                { name = "mi-anttcri.tfm", vector = "tex-bi", skewchar=0x7F },
                { name = "rm-anttcr.tfm",  vector = "tex-bf", skewchar=0x7F },
                { name = "sy-anttclz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true
                { name = "sy-anttclz.tfm", vector = "extensible-jmn-private", skewchar=0x30 },
                { name = "file:AntykwaTorunskaCondLight-Regular", vector = "tex-ex-braces", backmap = false },
                { name = "ex-anttcl.tfm",  vector = "tex-ex", extension = true, badones = badones, ignore = uglyone },
            }
        },
        addmissing = helpers.addmissing,
    }
}