lucida-typeone-math.lfg /size: 11 Kb    last modification: 2020-07-01 14:35
1local mathencodings = fonts.encodings.math
2
3mathencodings["lbr-ma"] = {
4    [0x025CB] = 0x00, -- circle
5    [0x025CF] = 0x01, -- blackcircle
6    [0x025A1] = 0x02, -- square
7    [0x025A0] = 0x03, -- blacksquare
8    [0x025B3] = 0x04, -- triangleup
9    [0x025B2] = 0x05, -- blacktriangleup
10    [0x025BD] = 0x06, -- triangledown
11    [0x025BC] = 0x07, -- blacktriangledown
12    [0x02B28] = 0x08, -- lozenge
13    [0x02B27] = 0x09, -- blacklozenge
14    [0x02B29] = 0x0A, -- blackdiamond
15    [0x02571] = 0x0B, -- upright
16    [0x02572] = 0x0C, -- downright
17    [0x022E4] = 0x0D, -- squareimageofnoteq
18    [0x022E5] = 0x0E, -- squareoriginalofnoteq
19    [0x02A4F] = 0x0F, -- dblsquareunion
20    [0x02A4E] = 0x10, -- dblsquareintersection
21    [0x02A64] = 0x11, -- zdomainantirestriction
22    [0x02A65] = 0x12, -- zrangeantirestriction
23    [0x022EE] = 0x13, -- verticalellipsis
24    [0x022EF] = 0x14, -- ellipsis
25    [0x022F0] = 0x15, -- uprightellipsis
26    [0x022F1] = 0x16, -- downrightellipsis
27    [0x022D5] = 0x17, -- equalparallel
28
29    [0x0225B] = 0x1A, -- stareq
30    [0x00127] = 0x1B, -- hbar
31    [0x022F6] = 0x1C, -- barelementof
32    [0x02209] = 0x1D, -- notelementof
33    [0x022FD] = 0x1E, -- barcontains
34    [0x0220C] = 0x1F, -- notcontain
35    [0x02204] = 0x20, -- nexists
36    [0x02194] = 0x21, -- leftrightarrow
37    [0x02195] = 0x22, -- updownarrow
38    [0x0219E] = 0x23, -- leftleftarrow
39    [0x0219F] = 0x24, -- upuparrow
40    [0x021A0] = 0x25, -- rightrightarrow
41--  [0x00026] = 0x26, -- amperand
42    [0x021A1] = 0x27, -- downdownarrow
43    [0x021A2] = 0x28, -- leftarrowtail
44    [0x021A3] = 0x29, -- rightarrowtail
45    [0x021A4] = 0x2A, -- leftarrowbar
46    [0x021A6] = 0x2B, -- rightarrowbar
47    [0x021A5] = 0x2C, -- uparrowbar
48--  [0x02212] = 0x2D, -- minus
49--  [0x0002D] = 0x2D, -- minus
50    [0x021A7] = 0x2E, -- downarrowbar
51    [0x021E4] = 0x2F, -- barleftarrow
52    [0x021E5] = 0x30, -- barrightarrow
53
54    [0x021E0] = 0x38, -- dashleftarrow
55    [0x021E1] = 0x39, -- dashuparrow
56    [0x021E2] = 0x3A, -- dashrightarrow
57    [0x021E3] = 0x3B, -- dashdownarrow
58    [0x021A9] = 0x3C, -- hookleftarrow
59--  [0x0003D] = 0x3D, -- equalto
60    [0x021AA] = 0x3E, -- hookrightarrow
61    [0x021AB] = 0x3F, -- looparrowleft
62    [0x021AC] = 0x40, -- looparrowright
63    [0x1D538] = 0x41, -- A                     (blackboard A)
64    [0x1D539] = 0x42, -- B
65    [0x02102] = 0x43, -- C
66    [0x1D53B] = 0x44, -- D
67    [0x1D53C] = 0x45, -- E
68    [0x1D53D] = 0x46, -- F
69    [0x1D53E] = 0x47, -- G
70    [0x0210D] = 0x48, -- H
71    [0x1D540] = 0x49, -- I
72    [0x1D541] = 0x4A, -- J
73    [0x1D542] = 0x4B, -- K
74    [0x1D543] = 0x4C, -- L
75    [0x1D544] = 0x4D, -- M
76    [0x02115] = 0x4E, -- N
77    [0x1D546] = 0x4F, -- O
78    [0x02119] = 0x50, -- P
79    [0x0211A] = 0x51, -- Q
80    [0x0211D] = 0x52, -- R
81    [0x1D54A] = 0x53, -- S
82    [0x1D54B] = 0x54, -- T
83    [0x1D54C] = 0x55, -- U
84    [0x1D54D] = 0x56, -- V
85    [0x1D54E] = 0x57, -- W
86    [0x1D54F] = 0x58, -- X
87    [0x1D550] = 0x59, -- Y
88    [0x02124] = 0x5A, -- Z                     (blackboard Z)
89    [0x0231C] = 0x5B, -- ulcorner
90    [0x0231D] = 0x5C, -- urcorner
91    [0x0231E] = 0x5D, -- llcorner
92    [0x0231F] = 0x5E, -- lrcorner
93    [0x02225] = 0x5F, -- parallel, Vert, lVert, rVert, arrowvert
94    [0x021D5] = 0x60, -- Updownarrow
95    [0x021D4] = 0x61, -- Leftrightarrow
96    [0x021D6] = 0x62, -- Upleftarrow
97    [0x021D7] = 0x63, -- Uprightarrow
98    [0x021D9] = 0x64, -- Downleftarrow
99    [0x021D8] = 0x65, -- Downrightarrow
100    [0x021CD] = 0x66, -- nLeftarrow
101    [0x021CE] = 0x67, -- nLeftrightarrow
102    [0x021CF] = 0x68, -- nRightarrow
103--  [0x021CE] = 0x69, -- nLeftrightarrow -- what's the difference between this and 0x0067[0x021CE]
104    [0x021DA] = 0x6A, -- Lleftarrow
105    [0x1D55C] = 0x6B, -- k                     \Bbbk (blackboard k)
106    [0x021DB] = 0x6C, -- Rrightarrow
107    [0x021C4] = 0x6D, -- rlarrow
108    [0x021C6] = 0x6E, -- lrarrow
109    [0x021C5] = 0x6F, -- udarrow
110--  [0x021C5] = 0x70, -- duarrow
111    [0x021C7] = 0x71, -- llarrow
112    [0x021C8] = 0x72, -- uuarrow
113    [0x021C9] = 0x73, -- rrarrow
114    [0x021CA] = 0x74, -- ddarrow
115    [0x021BE] = 0x75, -- rupharpoon
116    [0x021BF] = 0x76, -- lupharpoon
117    [0x021C2] = 0x77, -- rdownharpoon
118    [0x021C3] = 0x78, -- ldownharpoon
119    [0x021CB] = 0x79, -- lrharpoon
120    [0x021CC] = 0x7A, -- rlharpoon
121    [0x021B0] = 0x7B, -- upthenleftarrow
122--  [0x00000] = 0x7C, -- part
123    [0x021B1] = 0x7D, -- upthenrightarrow
124--  [0x00000] = 0x7E, -- part
125    [0x02276] = 0x7F, -- ltgt
126    [0x021B2] = 0x81, -- downthenleftarrow
127    [0x021B3] = 0x82, -- downthenrightarrow
128    [0x02B0E] = 0x83, -- rightthendownarrow
129    [0x02B10] = 0x84, -- leftthendownarrow
130    [0x02B0F] = 0x85, -- rightthenuparrow
131    [0x02B11] = 0x86, -- leftthenuparrow
132    [0x021B6] = 0x87, -- leftarcarrow
133    [0x021B7] = 0x88, -- rightarcarrow
134    [0x0293D] = 0x89, -- leftarcarrowplus
135    [0x0293C] = 0x8A, -- rightarcarrowminus
136    [0x021BA] = 0x8B, -- anticlockwise
137    [0x021BB] = 0x8C, -- clockwise
138
139    [0x02260] = 0x94, -- noteq
140    [0x02262] = 0x95, -- notidentical
141    [0x02241] = 0x96, -- nottilde
142    [0x02244] = 0x97, -- notasymptoticallyequal
143    [0x02249] = 0x98, -- notalmostequal
144    [0x02247] = 0x99, -- notapproximatelyeq
145    [0x0226E] = 0x9A, -- nless
146    [0x0226F] = 0x9B, -- ngtr
147    [0x02270] = 0x9C, -- nleq
148    [0x02271] = 0x9D, -- ngeq
149    [0x022E6] = 0x9E, -- lnsim
150    [0x022E7] = 0x9F, -- gnsim
151    [0x02605] = 0xAB, -- black star
152    [0x02713] = 0xAC, -- check
153    [0x02277] = 0xC5, -- gtlt
154    [0x02284] = 0xC6, -- nsubsetof
155    [0x02285] = 0xC7, -- nsupsetof
156    [0x02288] = 0xC8, -- nsubseteq
157    [0x02289] = 0xC9, -- nsupseteq
158
159    [0x0228A] = 0xCC, -- subsetneq
160    [0x0228B] = 0xCD, -- supsetneq
161
162--  [0x0228A] = 0xD0, -- subsetneq
163--  [0x0228B] = 0xD1, -- supsetneq
164
165    [0x02270] = 0xD6, -- nleq
166    [0x02271] = 0xD7, -- ngeq
167
168    [0x02268] = 0xDC, -- lneqq
169    [0x02269] = 0xDD, -- gneqq
170
171    [0x022E6] = 0xE0, -- lnsim
172    [0x02219] = 0xE1, -- bullet
173    [0x022E7] = 0xE2, -- gnsim
174
175    [0x02280] = 0xE5, -- nprec
176    [0x02281] = 0xE6, -- nsucc
177
178    [0x022E8] = 0xEB, -- precnsim
179    [0x022E9] = 0xEC, -- succnsim
180
181    [0x022EA] = 0xEF, -- nnormalsub
182    [0x022EB] = 0xF0, -- ncontainnormalsub
183    [0x022EC] = 0xF1, -- nnormalsubeq
184    [0x022ED] = 0xF2, -- ncontainnormalsubeq
185
186    [0x02226] = 0xF7, -- nparallel
187    [0x022AC] = 0xF8, -- nvdash
188    [0x022AE] = 0xF9, -- nVdash
189    [0x022AD] = 0xFA, -- nvDash
190    [0x022AF] = 0xFB, -- nVDash
191}
192
193mathencodings["lbr-mb"] = {
194    [0x00393] = 0x00, -- Gamma
195    [0x00394] = 0x01, -- Delta
196    [0x00398] = 0x02, -- Theta
197    [0x0039B] = 0x03, -- Lambda
198    [0x0039E] = 0x04, -- Xi
199    [0x003A0] = 0x05, -- Pi
200    [0x003A3] = 0x06, -- Sigma
201    [0x003A5] = 0x07, -- Upsilon
202    [0x003A6] = 0x08, -- Phi
203    [0x003A8] = 0x09, -- Psi
204    [0x003A9] = 0x0A, -- Omega
205    [0x0210F] = 0x9D, -- hslash
206    [0x02127] = 0x92, -- mho
207    [0x02132] = 0x90, -- Finv
208    [0x02136] = 0x95, -- beth
209    [0x02137] = 0x96, -- gimel
210    [0x02138] = 0x97, -- daleth
211    [0x02141] = 0x91, -- Game
212    [0x02201] = 0x94, -- complement
213    [0x0226C] = 0xF2, -- between
214    [0x0227C] = 0xE4, -- preccurlyeq
215    [0x0227D] = 0xE5, -- succcurlyeq
216    [0x0229D] = 0xCC, -- circleddash
217    [0x022A8] = 0xD6, -- vDash
218    [0x022AA] = 0xD3, -- Vvdash
219    [0x022B8] = 0xC7, -- multimap
220    [0x022BB] = 0xD2, -- veebar
221    [0x022C7] = 0xF7, -- divideontimes
222    [0x022C9] = 0xCF, -- ltimes
223    [0x022CA] = 0xCE, -- rtimes
224    [0x022CB] = 0xD0, -- leftthreetimes
225    [0x022CC] = 0xD1, -- rightthreetimes
226    [0x022D6] = 0xDC, -- lessdot
227    [0x022D7] = 0xDD, -- gtrdot
228    [0x022D8] = 0xDE, -- lll
229    [0x022D9] = 0xDF, -- ggg
230    [0x022DA] = 0xE8, -- lesseqgtr
231    [0x022DB] = 0xE9, -- gtreqless
232    [0x022DE] = 0xE6, -- curlyeqprec
233    [0x022DF] = 0xE7, -- curlyeqsucc
234    [0x024C7] = 0xC9, -- circledR
235    [0x024C8] = 0xCA, -- circledS
236    [0x025B6] = 0xF1, -- blacktriangleright
237    [0x025B8] = 0xF0, -- blacktriangleleft
238    [0x02720] = 0xCB, -- maltese
239    [0x02A7D] = 0xE0, -- leqslant
240    [0x02A7E] = 0xE1, -- geqslant
241    [0x02A85] = 0xDA, -- lessapprox
242    [0x02A86] = 0xDB, -- gtrapprox
243    [0x02A8B] = 0xEA, -- lesseqqgtr
244    [0x02A8C] = 0xEB, -- gtreqqless
245    [0x02A95] = 0xE2, -- eqslantless
246    [0x02A96] = 0xE3, -- eqslantgtr
247    [0x02AB7] = 0xEC, -- precapprox
248    [0x02AB8] = 0xED, -- succapprox
249    [0x02AC5] = 0xEE, -- subseteqq
250    [0x02AC6] = 0xEF, -- supseteqq
251    [0x12035] = 0xC8, -- backprime
252    [0x1D718] = 0x9B, -- varkappa
253}
254
255
256mathencodings["lbr-sy"] = {
257
258 -- [0x022C5] = 0x01, -- cdot,
259
260    [0x0002B] = 0x82, -- plus
261    [0x0003D] = 0x83, -- equal
262
263    [0x021CB] = 0x8D, -- leftrightharpoons
264    [0x021CC] = 0x8E, -- rightleftharpoons
265    [0x02214] = 0x89, -- dotplus
266    [0x02220] = 0x8B, -- angle
267    [0x02221] = 0x8C, -- measuredangle
268    [0x02222] = 0x8D, -- sphericalangle
269    [0x02234] = 0x90, -- therefore
270    [0x02235] = 0x91, -- because
271    [0x0223D] = 0x24, -- backsim
272    [0x02242] = 0x99, -- eqsim
273    [0x02245] = 0x9B, -- cong
274    [0x0224A] = 0x9D, -- approxeq
275    [0x0224E] = 0xC7, -- Bumpeq
276    [0x02252] = 0xCB, -- fallingdotseq
277    [0x02253] = 0xCC, -- risingdotseq
278    [0x02256] = 0xCF, -- eqcirc
279    [0x02257] = 0xD0, -- circeq
280    [0x0225C] = 0xD5, -- triangleq
281    [0x02266] = 0xDA, -- leqq
282    [0x02267] = 0xDB, -- geqq
283    [0x02272] = 0xDC, -- lesssim
284    [0x02273] = 0xDD, -- gtrsim
285    [0x02276] = 0xDE, -- lessgtr
286    [0x02277] = 0xDF, -- gtrless
287    [0x0227E] = 0xE0, -- precsim
288    [0x0227F] = 0xE1, -- succsim
289    [0x0228F] = 0xE4, -- sqsubset
290    [0x02290] = 0xE5, -- sqsupset
291    [0x0229A] = 0xE6, -- circledcirc
292    [0x0229B] = 0xE7, -- circledast
293    [0x0229E] = 0xEA, -- boxplus
294    [0x0229F] = 0xEB, -- boxminus
295    [0x022A0] = 0xEC, -- boxtimes
296    [0x022A1] = 0xED, -- boxdot
297    [0x022A7] = 0xEE, -- models
298    [0x022A9] = 0xF0, -- Vdash
299    [0x022BC] = 0xF6, -- barwedge
300    [0x022CE] = 0x85, -- curlyvee
301    [0x022CF] = 0x84, -- curlywedge
302    [0x022D0] = 0xF8, -- Subset
303    [0x022D1] = 0xF9, -- Supset
304    [0x02300] = 0x53, -- varnothing
305    [0x025CA] = 0x05, -- lozenge
306}
307
308
309mathencodings["lbr-sy"] = table.merged(mathencodings["tex-sy"],mathencodings["lbr-sy"])
310
311mathencodings["lbr-fraktur"] = { }
312
313fonts.handlers.vf.math.setletters(mathencodings, "lbr-fraktur",  0x1D504, 0x1D51E)
314
315return {
316    name = "lucida-math",
317    version = "1.00",
318    comment = "Goodies that complement lucida math.",
319    author = "Aditya, Hans, Mojca with help from Zhichu Chen",
320    copyright = "ConTeXt development team",
321    mathematics = {
322        mapfiles = {
323            "lucida.map",
324        },
325        virtuals = {
326            ["lucida-math"] = {
327                { name = "file:lbr.afm", features = "virtualmath", main = true },
328                { name = "hlcrim.tfm", vector = "tex-mi", skewchar=0x7F },
329                { name = "hlcrim.tfm", vector = "tex-it", skewchar=0x7F },
330                { name = "hlcry.tfm", vector = "lbr-sy", skewchar=0x30, parameters = true },
331                { name = "hlcrv.tfm", vector = "tex-ex", extension = true },
332                { name = "hlcra.tfm", vector = "lbr-ma" },
333                { name = "hlcrm.tfm", vector = "lbr-mb" },
334             -- { name = "hlcrim.tfm", vector = "lbr-mb" },  -- LucidaNewMath-Italic     <-> AltItalic
335             -- { name = "hlcdim.tfm", vector = "lbr-mb" },  -- LucidaNewMath-DemiItalic <-> AltDemiItalic
336             -- { name = "hlcrima.tfm", vector = "lbr-mb" }, -- LucidaNewMath-AltItalic <-> Italic
337                { name = "file:lbd.afm", vector = "tex-bf" },
338                { name = "file:lbdi.afm", vector = "tex-bi" } ,
339                { name = "file:lsr.afm", vector = "tex-ss" },
340                { name = "file:lstr.afm", vector = "tex-tt" },
341                { name = "file:lbl.afm", vector = "lbr-fraktur" }, -- more complete
342            },
343        },
344        variables = {
345            joinrelfactor = 4, -- default is 3
346        }
347    }
348}
349