font-pre.mkiv /size: 28 Kb    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=font-pre,
3
%D version=2012.01.04, % moved from font-ini
4
%D title=\CONTEXT\ Font Macros,
5
%D subtitle=Predefined,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\writestatus
{
loading
}{
ConTeXt
Font
Macros
/
Predefined
}
15 16
\unprotect
17 18
%D A basic set of features is defined here.
19 20
% beware, base mode + dynamics can give weird effects
21 22
% frac : with numr dnom
23
%
24
% vkrn valt vert vrt2 vpal : when vertical
25
%
26
% rtlm rtla : in r2l runs
27
% ltrm ltra : in l2r runs
28
%
29
% rvrn : variable fonts
30
%
31
% rtbd lfbd : opbd
32
%
33
% rkrf rphf vatu vjmo tjmo rclt psts pstf ljmo haln
34
% pres pref nukt
35
% abvs abvm blwm blws cjct blwf akhn (indic)
36
% half
37
% abvf cfar (khmer)
38
%
39
% ccmp locl calt clig liga rlig
40
%
41
% mkmk mark kern (palt pwid) curs (by choice but some fonts need it)
42
%
43
% init medi isol fina (unicode)
44
% fin3 fin2 med2 : syriac
45
%
46
% cpsp : percentage spacing (todo)
47
%
48
% dtls flac :math
49 50
\definefontfeature
51
[
always
]
52
[
mode
=
node
,
% we had 'auto', but let's try 'node' for a while and see what the impact is
53
script
=
auto
,
% on speed; 'base' just doesn't play well with dynamics; some day we can even
54
autoscript
=
position
,
55
autolanguage
=
position
,
56
kern
=
yes
,
% consider skipping the base passes when no base mode is used
57
mark
=
yes
,
58
mkmk
=
yes
,
59
curs
=
yes
]
60 61
\definefontfeature
62
[
default
]
63
[
always
]
64
[
liga
=
yes
,
65
% ccmp=yes, % maybe too
66
% locl=yes, % maybe too
67
% calt=yes, % maybe too
68
% clig=yes, % maybe too
69
% rlig=yes, % maybe too
70
tlig
=
yes
,
71
trep
=
yes
]
% texligatures=yes,texquotes=yes
72 73
\definefontfeature
74
[
original
]
% a clone of default so we can revert
75
[
default
]
76 77
\definefontfeature
78
[
smallcaps
]
79
[
always
]
80
[
smcp
=
yes
,
81
tlig
=
yes
,
82
trep
=
yes
]
% texligatures=yes,texquotes=yes
83 84
\definefontfeature
85
[
oldstyle
]
86
[
always
]
87
[
onum
=
yes
,
88
liga
=
yes
,
89
tlig
=
yes
,
90
trep
=
yes
]
% texligatures=yes,texquotes=yes
91 92
\definefontfeature
93
[
inlinenumbers
]
94
[
pnum
=
yes
,
95
tnum
=
no
]
96 97
\definefontfeature
98
[
tabularnumbers
]
99
[
tnum
=
yes
,
100
pnum
=
no
]
101 102
\definefontfeature
103
[
oldstylenumbers
]
104
[
onum
=
yes
]
105 106
\definefontfeature
107
[
zero
]
108
[
zero
=
yes
]
109 110
% \definefontfeature
111
% [newstyle]
112
% [onum=no]
113 114
\definefontfeature
% == default unless redefined
115
[
ligatures
]
116
[
always
]
117
[
liga
=
yes
,
118
tlig
=
yes
,
119
trep
=
yes
]
120 121
\definefontfeature
122
[
letterspacing
]
123
[
liga
=
no
,
124
rlig
=
no
,
125
clig
=
no
,
126
dlig
=
no
,
127
ccmp
=
yes
,
128
keepligatures
=
auto
]
129 130
\definefontfeature
% can be used for type1 fonts
131
[
complete
]
132
[
always
]
133
[
compose
=
yes
,
134
liga
=
yes
,
135
% ccmp=yes,
136
% locl=yes,
137
% calt=yes,
138
% clig=yes,
139
% rlig=yes,
140
tlig
=
yes
,
141
trep
=
yes
]
142 143
\definefontfeature
144
[
none
]
145
[
mode
=
none
,
146
features
=
no
]
147 148
\definefontfeature
149
[
semitic
-
complete
]
150
[
mode
=
node
,
analyze
=
yes
,
language
=
dflt
,
ccmp
=
yes
,
151
autoscript
=
position
,
autolanguage
=
position
,
152
init
=
yes
,
medi
=
yes
,
fina
=
yes
,
isol
=
yes
,
153
% fin2=yes,fin3=yes,med2=yes,
154
mark
=
yes
,
mkmk
=
yes
,
kern
=
yes
,
curs
=
yes
,
155
liga
=
yes
,
dlig
=
yes
,
rlig
=
yes
,
clig
=
yes
,
calt
=
yes
]
156 157
\definefontfeature
158
[
semitic
-
simple
]
159
[
mode
=
node
,
analyze
=
yes
,
language
=
dflt
,
ccmp
=
yes
,
160
autoscript
=
position
,
autolanguage
=
position
,
161
init
=
yes
,
medi
=
yes
,
fina
=
yes
,
isol
=
yes
,
162
% fin2=yes,fin3=yes,med2=yes,
163
mark
=
yes
,
mkmk
=
yes
,
kern
=
yes
,
curs
=
yes
,
164
rlig
=
yes
,
calt
=
yes
]
165 166
\definefontfeature
167
[
arabic
]
168
[
semitic
-
complete
]
169
[
script
=
arab
]
170 171
\definefontfeature
172
[
syriac
]
173
[
arabic
]
174
[
fin
2
=
yes
,
fin
3
=
yes
,
med
2
=
yes
]
175 176
\definefontfeature
177
[
reordercombining
]
178
[
reordercombining
=
yes
]
179 180
\definefontfeature
181
[
hebrew
]
182
[
semitic
-
complete
]
183
[
script
=
hebr
,
184
reordercombining
=
yes
]
% seems to work best with reasonable fonts
185 186
\definefontfeature
187
[
simplearabic
]
188
[
semitic
-
simple
]
189
[
script
=
arab
]
190 191
\definefontfeature
192
[
simplehebrew
]
193
[
semitic
-
simple
]
194
[
script
=
hebr
]
195 196
% indic
197 198
\definefontfeature
199
[
indic
-
common
]
200
[
mode
=
node
,
201
language
=
dflt
,
202
% localized
203
locl
=
yes
,
204
% positioning
205
kern
=
yes
,
206
dist
=
yes
,
207
% above/below base marks
208
abvm
=
yes
,
209
blwm
=
yes
,
210
% basic shaping
211
nukt
=
yes
,
212
akhn
=
yes
,
213
rphf
=
yes
,
214
% presentation
215
pres
=
yes
,
216
abvs
=
yes
,
217
blws
=
yes
,
218
psts
=
yes
,
219
haln
=
yes
,
220
calt
=
yes
]
221 222
\definefontfeature
223
[
devanagari
-
one
]
224
[
indic
-
common
]
225
[
script
=
deva
,
226
% basic shaping
227
rkrf
=
yes
,
228
blwf
=
yes
,
229
half
=
yes
,
230
vatu
=
yes
,
231
cjct
=
yes
]
232 233
\definefontfeature
234
[
bengali
-
one
]
235
[
indic
-
common
]
236
[
script
=
beng
,
237
% basic shaping
238
blwf
=
yes
,
239
half
=
yes
,
240
pstf
=
yes
,
241
vatu
=
yes
,
242
cjct
=
yes
,
243
% presentation
244
init
=
yes
]
245 246
\definefontfeature
247
[
gujarati
-
one
]
248
[
indic
-
common
]
249
[
script
=
gujr
,
250
% basic shaping
251
rkrf
=
yes
,
252
blwf
=
yes
,
253
half
=
yes
,
254
vatu
=
yes
,
255
cjct
=
yes
]
256 257
\definefontfeature
258
[
gurmukhi
-
one
]
259
[
indic
-
common
]
260
[
script
=
guru
,
261
% basic shaping
262
blwf
=
yes
,
263
half
=
yes
,
264
pstf
=
yes
,
265
vatu
=
yes
,
266
cjct
=
yes
]
267 268
\definefontfeature
269
[
kannada
-
one
]
270
[
indic
-
common
]
271
[
script
=
knda
,
272
% basic shaping
273
pref
=
yes
,
274
blwf
=
yes
,
275
half
=
yes
,
276
pstf
=
yes
,
277
cjct
=
yes
]
278 279
\definefontfeature
280
[
malayalam
-
one
]
281
[
indic
-
common
]
282
[
script
=
mlym
,
283
% basic shaping
284
pref
=
yes
,
285
blwf
=
yes
,
286
half
=
yes
,
287
pstf
=
yes
,
288
cjct
=
yes
]
289 290
\definefontfeature
291
[
oriya
-
one
]
292
[
indic
-
common
]
293
[
script
=
orya
,
294
% basic shaping
295
blwf
=
yes
,
296
pstf
=
yes
,
297
cjct
=
yes
]
298 299
\definefontfeature
300
[
tamil
-
one
]
301
[
indic
-
common
]
302
[
script
=
taml
,
303
% basic shaping
304
pref
=
yes
,
305
half
=
yes
]
306 307
\definefontfeature
308
[
telugu
-
one
]
309
[
indic
-
common
]
310
[
script
=
telu
,
311
% basic shaping
312
pref
=
yes
,
313
blwf
=
yes
,
314
half
=
yes
,
315
pstf
=
yes
,
316
cjct
=
yes
]
317 318
\definefontfeature
[
devanagari
-
two
]
[
devanagari
-
one
]
[
script
=
dev
2
]
319
\definefontfeature
[
bengali
-
two
]
[
bengali
-
one
]
[
script
=
bng
2
]
320
\definefontfeature
[
gujarati
-
two
]
[
gujarati
-
one
]
[
script
=
gjr
2
]
321
\definefontfeature
[
gurmukhi
-
two
]
[
gurmukhi
-
one
]
[
script
=
gur
2
]
322
\definefontfeature
[
kannada
-
two
]
[
kannada
-
one
]
[
script
=
knd
2
]
323
\definefontfeature
[
malayalam
-
two
]
[
malayalam
-
one
]
[
script
=
mlm
2
]
324
\definefontfeature
[
oriya
-
two
]
[
oriya
-
one
]
[
script
=
ory
2
]
325
\definefontfeature
[
tamil
-
two
]
[
tamil
-
one
]
[
script
=
tml
2
]
326
\definefontfeature
[
telugu
-
two
]
[
telugu
-
one
]
[
script
=
tel
2
]
327 328
% mongolian
329 330
\definefontfeature
331
[
mongolian
]
332
[
default
]
333
[
script
=
mong
,
334
init
=
yes
,
medi
=
yes
,
fina
=
yes
,
isol
=
yes
,
335
rlig
=
yes
,
rclt
=
yes
,
calt
=
yes
,
336
%dlig=yes,cswh=yes, % optional
337
mset
]
338 339
% tibetan
340 341
\definefontfeature
342
[
tibetan
]
343
[
always
]
344
[
script
=
tibt
,
345
language
=
dflt
,
346
locl
=
yes
,
347
ccmp
=
yes
,
348
abvs
=
yes
,
349
blws
=
yes
,
350
calt
=
yes
,
351
liga
=
yes
,
352
abvm
=
yes
,
353
blwm
=
yes
]
354 355
% cjk
356 357
\definefontfeature
358
[
jamoforms
]
359
[
ljmo
=
yes
,
360
tjmo
=
yes
,
361
vjmo
=
yes
]
362 363
% \definefontfeature
364
% [japanese]
365
% [default]
366
% [language=jan]
367 368
% \definefontfeature
369
% [simplified-chinese]
370
% [default]
371
% [language=zhs]
372 373
% \definefontfeature
374
% [traditional-chinese]
375
% [default]
376
% [language=zht]
377 378
% \definefontfeature
379
% [chinese]
380
% [simplified-chinese]
381 382
% \definefontfeature
383
% [korean]
384
% [default]
385
% [language=kor]
386 387
% symbols:
388 389
\definefontfeature
390
[
dingbats
]
391
[
mode
=
base
,
392
goodies
=
dingbats
,
393
unicoding
=
yes
]
394 395
% math:
396 397
\definefontfeature
398
[
mathematics
]
399
[
mode
=
base
,
400
kern
=
yes
,
401
% liga=yes, % makes no sense
402
% tlig=yes, % makes no sense
403
% trep=yes, % makes no sense
404
mathnolimitsmode
=
{
0
,
8
0
0
}
,
% this looks okay on the average font
405
mathalternates
=
yes
,
406
mathitalics
=
yes
,
% we pass them
407
mathdimensions
=
all
,
408
% mathgaps=yes,
409
language
=
dflt
,
410
script
=
math
]
411 412
\ifdefined
\mathnolimitsmode
413
\mathnolimitsmode
\plusone
% font driven (only opentype)
414
\fi
415 416
\ifdefined
\mathitalicsmode
417
\mathitalicsmode
\plusone
% simple noads become zero
418
% \mathitalicsmode\plustwo % idem but inner is kept (for testing)
419
\fi
420 421
% \adaptfontfeature[*math*][mathnolimitsmode=1000] % only subscript
422 423
\definefontfeature
424
[
mathematics
-
l
2
r
]
425
[
mathematics
]
426
[]
427 428
% \definefontfeature
429
% [mathematics-r2l]
430
% [mathematics]
431
% [language=ara,
432
% rtlm=yes,
433
% locl=yes]
434 435
\definefontfeature
436
[
mathematics
-
r
2
l
]
437
[
mathematics
]
438
[
rtlm
=
yes
,
439
locl
=
yes
]
440 441
\definefontfeature
[
virtualmath
]
[
mathematics
]
% downward compatibility
442
\definefontfeature
[
virtualmath
-
l
2
r
]
[
mathematics
-
l
2
r
]
% downward compatibility
443
\definefontfeature
[
virtualmath
-
r
2
l
]
[
mathematics
-
r
2
l
]
% downward compatibility
444 445
\definefontfeature
[
math
-
text
]
[
mathematics
]
[
ssty
=
no
]
446
\definefontfeature
[
math
-
script
]
[
mathematics
]
[
ssty
=
1
,
mathsize
=
yes
]
447
\definefontfeature
[
math
-
scriptscript
]
[
mathematics
]
[
ssty
=
2
,
mathsize
=
yes
]
448 449
\definefontfeature
[
math
-
text
-
l
2
r
]
[
mathematics
-
l
2
r
]
[
ssty
=
no
]
450
\definefontfeature
[
math
-
script
-
l
2
r
]
[
mathematics
-
l
2
r
]
[
ssty
=
1
,
mathsize
=
yes
]
451
\definefontfeature
[
math
-
scriptscript
-
l
2
r
]
[
mathematics
-
l
2
r
]
[
ssty
=
2
,
mathsize
=
yes
]
452 453
\definefontfeature
[
math
-
text
-
r
2
l
]
[
mathematics
-
r
2
l
]
[
ssty
=
no
]
454
\definefontfeature
[
math
-
script
-
r
2
l
]
[
mathematics
-
r
2
l
]
[
ssty
=
1
,
mathsize
=
yes
]
455
\definefontfeature
[
math
-
scriptscript
-
r
2
l
]
[
mathematics
-
r
2
l
]
[
ssty
=
2
,
mathsize
=
yes
]
456 457
\definefontfeature
[
math
-
nostack
-
text
]
[
math
-
text
]
[
nostackmath
=
yes
]
458
\definefontfeature
[
math
-
nostack
-
script
]
[
math
-
script
]
[
nostackmath
=
yes
]
459
\definefontfeature
[
math
-
nostack
-
scriptscript
][
math
-
scriptscript
][
nostackmath
=
yes
]
460 461
% \definefontfeature[mathtext] [math-text]
462
% \definefontfeature[mathscript] [math-script]
463
% \definefontfeature[mathscriptscript] [math-scriptscript]
464 465
\definefontfeature
466
[
missing
]
467
[
missing
=
yes
]
468 469
%D Nice to have too:
470 471
\definefontfeature
472
[
quality
]
473
[
expansion
=
quality
,
474
protrusion
=
quality
]
475 476
\definefontfeature
477
[
fullprotrusion
]
478
[
protrusion
=
pure
]
479 480
\definefontfeature
481
[
slanted
]
482
[
slant
=
.
2
]
483 484
% \definefontfeature
485
% [boldened]
486
% [extend=1.2]
487 488
%D Neat:
489 490
% By eye:
491
%
492
% \definefontfeature[boldened-10][effect={width=0.10,delta=1.0,hdelta=0.500,ddelta=0.150,vshift=0.125,extend=1.025,squeeze=0.99250}]
493
% \definefontfeature[boldened-15][effect={width=0.15,delta=1.0,hdelta=0.500,ddelta=0.150,vshift=0.250,extend=1.050,squeeze=0.98750}]
494
% \definefontfeature[boldened-20][effect={width=0.20,delta=1.0,hdelta=0.500,ddelta=0.150,vshift=0.375,extend=1.075,squeeze=0.98125}]
495
% \definefontfeature[boldened-30][effect={width=0.30,delta=1.0,hdelta=0.500,ddelta=0.150,vshift=0.500,extend=1.100,squeeze=0.97500}]
496
%
497
% By calculation:
498
%
499
% \definefontfeature[boldened-10][effect={width=0.10,delta=1.0,hdelta=0.02500,ddelta=0.02500,vshift=0.02500,extend=1.050,squeeze=0.99500}]
500
% \definefontfeature[boldened-15][effect={width=0.15,delta=1.0,hdelta=0.05625,ddelta=0.05625,vshift=0.05625,extend=1.075,squeeze=0.99250}]
501
% \definefontfeature[boldened-20][effect={width=0.20,delta=1.0,hdelta=0.10000,ddelta=0.10000,vshift=0.10000,extend=1.100,squeeze=0.99000}]
502
% \definefontfeature[boldened-30][effect={width=0.30,delta=1.0,hdelta=0.22500,ddelta=0.22500,vshift=0.22500,extend=1.150,squeeze=0.98500}]
503
%
504
% So we can do this:
505 506
\definefontfeature
[
boldened
-
1
0
][
effect
=
{
width
=
0
.
1
0
,
auto
=
yes
}
]
507
\definefontfeature
[
boldened
-
1
5
][
effect
=
{
width
=
0
.
1
5
,
auto
=
yes
}
]
508
\definefontfeature
[
boldened
-
2
0
][
effect
=
{
width
=
0
.
2
0
,
auto
=
yes
}
]
509
\definefontfeature
[
boldened
-
2
5
][
effect
=
{
width
=
0
.
2
5
,
auto
=
yes
}
]
510
\definefontfeature
[
boldened
-
3
0
][
effect
=
{
width
=
0
.
3
0
,
auto
=
yes
}
]
511 512
\definefontfeature
513
[
boldened
]
514
[
boldened
-
3
0
]
515 516
%D Emoji etc:
517 518
\definefontfeature
[
bandw
:
overlay
][
ccmp
=
yes
,
dist
=
yes
]
519
\definefontfeature
[
color
:
overlay
][
ccmp
=
yes
,
dist
=
yes
,
colr
=
yes
]
520
%definefontfeature[bandw:svg] [ccmp=yes,dist=yes]
521
\definefontfeature
[
color
:
svg
]
[
ccmp
=
yes
,
dist
=
yes
,
svg
=
yes
]
522
%definefontfeature[bandw:bitmap] [ccmp=yes,dist=yes,sbix=yes]
523
\definefontfeature
[
color
:
bitmap
]
[
ccmp
=
yes
,
dist
=
yes
,
sbix
=
yes
]
% also cblc
524 525
% Plus an automatic one:
526 527
\definefontfeature
[
color
]
[
ccmp
=
yes
,
dist
=
yes
,
color
=
auto
]
528 529
%D We define some colors that are used in tracing (for instance \OPENTYPE\
530
%D features). We cannot yet inherit because no colors are predefined.
531 532
\definecolor
[
font
:
init
][
r
=
.
7
5
]
533
\definecolor
[
font
:
medi
][
g
=
.
7
5
]
534
\definecolor
[
font
:
fina
][
b
=
.
7
5
]
535
\definecolor
[
font
:
isol
][
r
=
.
7
5
,
g
=
.
7
5
]
% [y=.75]
536
\definecolor
[
font
:
mark
][
r
=
.
7
5
,
b
=
.
7
5
]
% [m=.75]
537
\definecolor
[
font
:
rest
][
b
=
.
7
5
,
g
=
.
7
5
]
% [c=.75]
538 539
\definecolor
[
font
:
0
]
[
s
=
1
]
540
\definecolor
[
font
:
1
]
[
r
=
.
7
5
]
541
\definecolor
[
font
:
2
]
[
g
=
.
7
5
]
542
\definecolor
[
font
:
3
]
[
b
=
.
7
5
]
543
\definecolor
[
font
:
4
]
[
r
=
.
7
5
,
g
=
.
7
5
]
544
\definecolor
[
font
:
5
]
[
r
=
.
7
5
,
b
=
.
7
5
]
545
\definecolor
[
font
:
6
]
[
b
=
.
7
5
,
g
=
.
7
5
]
546
\definecolor
[
font
:
7
]
[
r
=
.
7
5
]
547
\definecolor
[
font
:
8
]
[
g
=
.
7
5
]
548
\definecolor
[
font
:
9
]
[
b
=
.
7
5
]
549 550
\definecolor
[
f
:
r
:
t
][
a
=
1
,
t
=
.
2
5
,
r
=
1
]
551
\definecolor
[
f
:
g
:
t
][
a
=
1
,
t
=
.
2
5
,
g
=
1
]
552
\definecolor
[
f
:
b
:
t
][
a
=
1
,
t
=
.
2
5
,
b
=
1
]
553
\definecolor
[
f
:
c
:
t
][
a
=
1
,
t
=
.
2
5
,
c
=
1
]
554
\definecolor
[
f
:
m
:
t
][
a
=
1
,
t
=
.
2
5
,
m
=
1
]
555
\definecolor
[
f
:
y
:
t
][
a
=
1
,
t
=
.
2
5
,
y
=
1
]
556
\definecolor
[
f
:
k
:
t
][
a
=
1
,
t
=
.
2
5
,
s
=
0
]
557
\definecolor
[
f
:
s
:
t
][
a
=
1
,
t
=
.
2
5
,
s
=
0
]
558 559
\definepalet
% weird place
560
[
layout
]
561
[
grid
=
trace
:
dr
,
562
page
=
trace
:
dg
,
563
profile
=
f
:
s
:
t
,
564
one
=
f
:
y
:
t
,
565
mix
=
f
:
b
:
t
]
566 567
%D Now we're up to some definitions.
568 569
\definebodyfontenvironment
570
[
\s!default
]
571
[
\s!text
=
1
.
0
,
572
\s!script
=
0
.
7
,
573
\s!scriptscript
=
0
.
5
,
574
\s!a
=
1
.
2
0
0
,
575
\s!b
=
1
.
4
4
0
,
576
\s!c
=
1
.
7
2
8
,
577
\s!d
=
2
.
0
7
4
,
578
*
=
\font_currentfontscale
,
% wildcard
579
\s!x
=
0
.
8
,
580
\s!xx
=
0
.
6
,
581
\v!big
=
1
.
2
,
582
\v!small
=
0
.
8
,
583
\c!interlinespace
=
,
584
\s!em
=
\v!slanted
]
585 586
\definebodyfontenvironment
587
[
2
0
.
7
pt
]
588
[
\s!text
=
2
0
.
7
pt
,
589
\s!script
=
\!!fourteenpointfour
,
590
\s!scriptscript
=
\!!twelvepoint
,
591
\s!x
=
1
7
.
3
pt
,
592
\s!xx
=
\!!fourteenpointfour
,
593
\v!big
=
2
0
.
7
pt
,
% !!!!
594
\v!small
=
1
7
.
3
pt
]
595 596
\definebodyfontenvironment
597
[
1
7
.
3
pt
]
598
[
\s!text
=
1
7
.
3
pt
,
599
\s!script
=
\!!twelvepoint
,
600
\s!scriptscript
=
\!!tenpoint
,
601
\s!x
=
\!!fourteenpointfour
,
602
\s!xx
=
\!!twelvepoint
,
603
\v!big
=
2
0
.
7
pt
,
604
\v!small
=
\!!fourteenpointfour
]
605 606
\definebodyfontenvironment
607
[
\!!fourteenpointfour
]
608
[
\s!text
=
\!!fourteenpointfour
,
609
\s!script
=
\!!elevenpoint
,
610
\s!scriptscript
=
\!!ninepoint
,
611
\s!x
=
\!!twelvepoint
,
612
\s!xx
=
\!!tenpoint
,
613
\v!big
=
1
7
.
3
pt
,
614
\v!small
=
\!!twelvepoint
]
615 616
\definebodyfontenvironment
617
[
\!!twelvepoint
]
618
[
\s!text
=
\!!twelvepoint
,
619
\s!script
=
\!!ninepoint
,
620
\s!scriptscript
=
\!!sevenpoint
,
621
\s!x
=
\!!tenpoint
,
622
\s!xx
=
\!!eightpoint
,
623
\v!big
=
\!!fourteenpointfour
,
624
\v!small
=
\!!tenpoint
]
625 626
\definebodyfontenvironment
627
[
\!!elevenpoint
]
628
[
\s!text
=
\!!elevenpoint
,
629
\s!script
=
\!!eightpoint
,
630
\s!scriptscript
=
\!!sixpoint
,
631
\s!x
=
\!!ninepoint
,
632
\s!xx
=
\!!sevenpoint
,
633
\v!big
=
\!!twelvepoint
,
634
\v!small
=
\!!ninepoint
]
635 636
\definebodyfontenvironment
637
[
\!!tenpoint
]
638
[
\s!text
=
\!!tenpoint
,
639
\s!script
=
\!!sevenpoint
,
640
\s!scriptscript
=
\!!fivepoint
,
641
\s!x
=
\!!eightpoint
,
642
\s!xx
=
\!!sixpoint
,
643
\v!big
=
\!!twelvepoint
,
644
\v!small
=
\!!eightpoint
]
645 646
\definebodyfontenvironment
647
[
\!!ninepoint
]
648
[
\s!text
=
\!!ninepoint
,
649
\s!script
=
\!!sevenpoint
,
650
\s!scriptscript
=
\!!fivepoint
,
651
\s!x
=
\!!sevenpoint
,
652
\s!xx
=
\!!fivepoint
,
653
\v!big
=
\!!elevenpoint
,
654
\v!small
=
\!!sevenpoint
]
655 656
\definebodyfontenvironment
657
[
\!!eightpoint
]
658
[
\s!text
=
\!!eightpoint
,
659
\s!script
=
\!!sixpoint
,
660
\s!scriptscript
=
\!!fivepoint
,
661
\s!x
=
\!!sixpoint
,
662
\s!xx
=
\!!fivepoint
,
663
\v!big
=
\!!tenpoint
,
664
\v!small
=
\!!sixpoint
]
665 666
\definebodyfontenvironment
667
[
\!!sevenpoint
]
668
[
\s!text
=
\!!sevenpoint
,
669
\s!script
=
\!!sixpoint
,
670
\s!scriptscript
=
\!!fivepoint
,
671
\s!x
=
\!!sixpoint
,
672
\s!xx
=
\!!fivepoint
,
673
\v!big
=
\!!ninepoint
,
674
\v!small
=
\!!fivepoint
]
675 676
\definebodyfontenvironment
677
[
\!!sixpoint
]
678
[
\s!text
=
\!!sixpoint
,
679
\s!script
=
\!!fivepoint
,
680
\s!scriptscript
=
\!!fivepoint
,
681
\s!x
=
\!!fivepoint
,
682
\s!xx
=
\!!fivepoint
,
683
\v!big
=
\!!eightpoint
,
684
\v!small
=
\!!fivepoint
]
685 686
\definebodyfontenvironment
687
[
\!!fivepoint
]
688
[
\s!text
=
\!!fivepoint
,
689
\s!script
=
\!!fivepoint
,
690
\s!scriptscript
=
\!!fivepoint
,
691
\s!x
=
\!!fivepoint
,
692
\s!xx
=
\!!fivepoint
,
693
\v!big
=
\!!sevenpoint
,
694
\v!small
=
\!!fivepoint
]
695 696
\definebodyfontenvironment
697
[
\!!fourpoint
]
698
[
\s!text
=
\!!fourpoint
,
699
\s!script
=
\!!fourpoint
,
700
\s!scriptscript
=
\!!fourpoint
,
701
\s!x
=
\!!fourpoint
,
702
\s!xx
=
\!!fourpoint
,
703
\v!big
=
\!!sixpoint
,
704
\v!small
=
\!!fourpoint
]
705 706
\definebodyfontswitch
[
fourteenpointfour
]
[
\!!fourteenpointfour
]
707
\definebodyfontswitch
[
twelvepoint
]
[
\!!twelvepoint
]
708
\definebodyfontswitch
[
elevenpoint
]
[
\!!elevenpoint
]
709
\definebodyfontswitch
[
tenpoint
]
[
\!!tenpoint
]
710
\definebodyfontswitch
[
ninepoint
]
[
\!!ninepoint
]
711
\definebodyfontswitch
[
eightpoint
]
[
\!!eightpoint
]
712
\definebodyfontswitch
[
sevenpoint
]
[
\!!sevenpoint
]
713
\definebodyfontswitch
[
sixpoint
]
[
\!!sixpoint
]
714
\definebodyfontswitch
[
fivepoint
]
[
\!!fivepoint
]
715
\definebodyfontswitch
[
fourpoint
]
[
\!!fourpoint
]
716 717
%D So far.
718 719
\definefontstyle
[
\s!hw
]
[
\s!hw
]
720
\definefontstyle
[
\s!cg
]
[
\s!cg
]
721 722
\definefontstyle
[
\v!roman
,
\v!serif
,
\v!regular
]
[
\s!rm
]
723
\definefontstyle
[
\v!sansserif
,
\v!sans
,
\v!support
]
[
\s!ss
]
724
\definefontstyle
[
\v!teletype
,
\v!type
,
\v!mono
]
[
\s!tt
]
725
\definefontstyle
[
\v!handwritten
]
[
\s!hw
]
726
\definefontstyle
[
\v!calligraphic
]
[
\s!cg
]
727
\definefontstyle
[
\v!math
,
\v!mathematics
]
[
\s!mm
]
728 729
\definefontalternative
[
\s!tf
]
730
\definefontalternative
[
\s!bf
]
731
\definefontalternative
[
\s!it
]
732
\definefontalternative
[
\s!sl
]
733
\definefontalternative
[
\s!bs
]
734
\definefontalternative
[
\s!bi
]
735
\definefontalternative
[
\s!sc
]
736 737
\definefontsize
[
\s!a
]
\definefontsize
[
\s!b
]
738
\definefontsize
[
\s!c
]
\definefontsize
[
\s!d
]
739 740
\definealternativestyle
[
\v!mediaeval
]
[
\os
]
[]
741
\definealternativestyle
[
\v!normal
]
[
\tf
]
[]
742
\definealternativestyle
[
\v!bold
]
[
\bf
]
[]
743
\definealternativestyle
[
\v!type
]
[
\tt
]
[]
744
\definealternativestyle
[
\v!mono
]
[
\tt
]
[]
745
\definealternativestyle
[
\v!slanted
]
[
\sl
]
[]
746
\definealternativestyle
[
\v!italic
]
[
\it
]
[]
747
\definealternativestyle
[
\v!boldslanted
,
\v!slantedbold
]
[
\bs
]
[]
748
\definealternativestyle
[
\v!bolditalic
,
\v!italicbold
]
[
\bi
]
[]
749 750
\definealternativestyle
[
\v!small
,
\v!smallnormal
]
[
\setsmallbodyfont
\tf
]
[]
751
\definealternativestyle
[
\v!smallbold
]
[
\setsmallbodyfont
\bf
]
[]
752
\definealternativestyle
[
\v!smalltype
]
[
\setsmallbodyfont
\tt
]
[]
753
\definealternativestyle
[
\v!smallitalic
,
\v!smallslanted
]
[
\setsmallbodyfont
\sl
]
[]
754
\definealternativestyle
[
\v!smallboldslanted
,
\v!smallslantedbold
]
[
\setsmallbodyfont
\bs
]
[]
755
\definealternativestyle
[
\v!smallbolditalic
,
\v!smallitalicbold
]
[
\setsmallbodyfont
\bi
]
[]
756 757
\definealternativestyle
[
\v!bigger
]
[
\setbigbodyfont
\tf
]
[]
758
\definealternativestyle
[
\v!smaller
]
[
\setsmallbodyfont
\tf
]
[]
759 760
\definealternativestyle
[
\v!sans
,
\v!sansserif
]
[
\ss
]
761
\definealternativestyle
[
\v!roman
,
\v!serif
,
\v!regular
]
[
\rm
]
762
\definealternativestyle
[
\v!handwritten
]
[
\hw
]
763
\definealternativestyle
[
\v!calligraphic
]
[
\cg
]
764 765
\definealternativestyle
[
\v!sansnormal
]
[
\ss
\tf
]
[]
766
\definealternativestyle
[
\v!sansbold
]
[
\ss
\bf
]
[]
767
\definealternativestyle
[
\v!serifnormal
]
[
\rm
\tf
]
[]
768
\definealternativestyle
[
\v!serifbold
]
[
\rm
\bf
]
[]
769
\definealternativestyle
[
\v!mononormal
]
[
\tt
\tf
]
[]
770
\definealternativestyle
[
\v!monobold
]
[
\tt
\bf
]
[]
771 772
\definealternativestyle
[
typeface
]
[
\typeface
]
[]
% no translation here (quite basic)
773
\definealternativestyle
[
boldface
]
[
\boldface
]
[]
774
\definealternativestyle
[
slantedface
]
[
\slantedface
]
[]
775
\definealternativestyle
[
italicface
]
[
\italicface
]
[]
776
\definealternativestyle
[
swapface
]
[
\swapface
]
[]
777 778
\definealternativestyle
[
emphasize
]
[
\em
]
[
\em
]
% new
779 780
% For Alan:
781 782
\definealternativestyle
783
[
\v!camel
]
784
[
{
\setcharactercasing
[
\v!camel
]
}
]
785
[
{
\setcharactercasing
[
\v!camel
]
}
]
786 787
% % maybe we need interface neutral as well (for use in cld):
788
%
789
% \letcscsname\mediaeval \csname\v!mediaeval \endcsname
790
% \letcscsname\normal \csname\v!normal \endcsname
791
% \letcscsname\bold \csname\v!bold \endcsname
792
% \letcscsname\mono \csname\v!mono \endcsname
793
% \letcscsname\slanted \csname\v!slanted \endcsname
794
% \letcscsname\italic \csname\v!italic \endcsname
795
% \letcscsname\boldslanted \csname\v!boldslanted \endcsname
796
% \letcscsname\slantedbold \csname\v!slantedbold \endcsname
797
% \letcscsname\bolditalic \csname\v!bolditalic \endcsname
798
% \letcscsname\italicbold \csname\v!italicbold \endcsname
799
%
800
% \letcscsname\small \csname\v!small \endcsname
801
% \letcscsname\smallnormal \csname\v!smallnormal \endcsname
802
% \letcscsname\smallbold \csname\v!smallbold \endcsname
803
% \letcscsname\smalltype \csname\v!smalltype \endcsname
804
% \letcscsname\smallslanted \csname\v!smallslanted \endcsname
805
% \letcscsname\smallboldslanted\csname\v!smallboldslanted\endcsname
806
% \letcscsname\smallslantedbold\csname\v!smallslantedbold\endcsname
807
% \letcscsname\smallbolditalic \csname\v!smallbolditalic \endcsname
808
% \letcscsname\smallitalicbold \csname\v!smallitalicbold \endcsname
809
%
810
% \letcscsname\bigger \csname\v!bigger \endcsname
811
% \letcscsname\smaller \csname\v!smaller \endcsname
812
%
813
% \letcscsname\sans \csname\v!sans \endcsname
814
% \letcscsname\sansserif \csname\v!sansserif \endcsname
815
% \letcscsname\sansbold \csname\v!sansbold \endcsname
816 817
%D We can go on and on and on:
818
%D
819
%D \starttyping
820
%D \setupbodyfontenvironment[default][p=0.8,q=0.6]
821
%D \definefontsize[p]
822
%D \definefontsize[q]
823
%D \stoptyping
824 825
%D Slow but handy:
826 827
\definealternativestyle
[
\v!smallbodyfont
]
[
\setsmallbodyfont
]
[]
828
\definealternativestyle
[
\v!bigbodyfont
]
[
\setbigbodyfont
]
[]
829 830
%D We treat {\sc Small Caps} and \cap {Pseudo Caps} a bit
831
%D different. We also provide an \WORD {uppercase} style.
832 833
\definealternativestyle
[
\v!WORD
]
[
{
\setcharactercasing
[
\v!WORD
]
}
]
[
{
\setcharactercasing
[
\v!WORD
]
}
]
834
\definealternativestyle
[
\v!word
]
[
{
\setcharactercasing
[
\v!word
]
}
]
[
{
\setcharactercasing
[
\v!word
]
}
]
835
\definealternativestyle
[
\v!Word
]
[
{
\setcharactercasing
[
\v!Word
]
}
]
[
{
\setcharactercasing
[
\v!Word
]
}
]
836
\definealternativestyle
[
\v!Words
]
[
{
\setcharactercasing
[
\v!Words
]
}
]
[
{
\setcharactercasing
[
\v!Words
]
}
]
837
\definealternativestyle
[
\v!capital
]
[
{
\setcharactercasing
[
\v!capital
]
}
]
[
{
\setcharactercasing
[
\v!capital
]
}
]
838
\definealternativestyle
[
\v!Capital
]
[
{
\setcharactercasing
[
\v!Capital
]
}
]
[
{
\setcharactercasing
[
\v!Capital
]
}
]
839
\definealternativestyle
[
\v!mixed
]
[
{
\setcharactercasing
[
\v!mixed
]
}
]
[
{
\setcharactercasing
[
\v!mixed
]
}
]
840 841
\definealternativestyle
[
\v!cap
]
[
{
\setcharactercasing
[
\v!cap
]
}
]
[
{
\setcharactercasing
[
\v!cap
]
}
]
842
\definealternativestyle
[
\v!Cap
]
[
{
\setcharactercasing
[
\v!Cap
]
}
]
[
{
\setcharactercasing
[
\v!Cap
]
}
]
843 844
%D From now (2013-03-17) on we have:
845 846
\definefontfeature
[
f
:
smallcaps
][
smcp
=
yes
]
847
\definefontfeature
[
f
:
oldstyle
]
[
onum
=
yes
]
848
\definefontfeature
[
f
:
tabular
]
[
tnum
=
yes
]
849
\definefontfeature
[
f
:
superiors
][
sups
=
yes
]
850
\definefontfeature
[
f
:
inferiors
][
subs
=
yes
]
851
\definefontfeature
[
f
:
fractions
][
frac
=
yes
]
852
\definefontfeature
[
f
:
kern
]
[
kern
=
yes
]
853
\definefontfeature
[
f
:
kerns
]
[
kern
=
yes
]
854 855
\definealternativestyle
[
\v!smallcaps
]
[
\setsmallcaps
]
[
\setsmallcaps
]
856
\definealternativestyle
[
\v!oldstyle
]
[
\setoldstyle
]
[
\setoldstyle
]
857
\definealternativestyle
[
\v!fractions
]
[
\setfractions\resetbreakpoints
]
[
\setfractions\resetbreakpoints
]
858 859
\unexpanded
\def
\setsmallcaps
{
\doaddfeature
{
f
:
smallcaps
}}
860
\unexpanded
\def
\setoldstyle
{
\doaddfeature
{
f
:
oldstyle
}}
861
\unexpanded
\def
\settabular
{
\doaddfeature
{
f
:
tabular
}}
862
\unexpanded
\def
\setsuperiors
{
\doaddfeature
{
f
:
superiors
}}
863
\unexpanded
\def
\setfractions
{
\doaddfeature
{
f
:
fractions
}}
864 865
% \unexpanded\def\frc#1#2%
866
% {\dontleavehmode
867
% \begingroup
868
% \addff{frac}%
869
% \resetbreakpoints
870
% #1/#2%
871
% \endgroup}
872 873
%D \macros
874
%D {uppercasing, lowercasing}
875 876
\definefontfeature
[
lowercasing
][
lowercasing
=
yes
]
877
\definefontfeature
[
uppercasing
][
uppercasing
=
yes
]
878 879
\unexpanded
\def
\uppercasing
{
\addff
{
uppercasing
}}
880
\unexpanded
\def
\lowercasing
{
\addff
{
lowercasing
}}
881 882
%D \macros
883
%D {tinyfont}
884
%D
885
%D By default we load the Computer Modern Roman fonts (but
886
%D not yet at this moment) and activate the 12pt roman
887
%D bodyfont. Sans serif and teletype are also available and
888
%D can be called for by \type{\ss} and \type{\tt}. Loading
889
%D takes place elsewhere.
890
%D
891
%D For tracing purposes we define:
892 893
\definefont
[
tinyfont
][
file
:
dejavusansmono
at
1
ex
]
894 895
%D \macros
896
%D {infofont}
897
%D
898
%D The second situation occurs when we enable the info mode,
899
%D and put all kind of status information in the margin. We
900
%D don't want huge switches to the main bodyfont and style, so
901
%D here too we use a direct method.
902 903
\let
\infofont
\relax
904
\let
\infofontbold
\relax
905
\let
\smallinfofont
\relax
906
\let
\smallinfofontbold
\relax
907 908
\definefont
[
infofont
]
[
file
:
dejavusansmono
*
none
at
6
pt
]
909
\definefont
[
infofontbold
]
[
file
:
dejavusansmono
-
bold
*
none
at
6
pt
]
910
\definefont
[
smallinfofont
]
[
file
:
dejavusansmono
*
none
at
3
pt
]
911
\definefont
[
smallinfofontbold
][
file
:
dejavusansmono
-
bold
*
none
at
3
pt
]
912 913
%D Optimization (later we overload in math). Also needed in order to get \type {\ss}
914
%D properly defined.
915 916
\unexpanded
\def
\normaltf
{
\let
\fontalternative
\s!tf
\font_helpers_synchronize_font
}
917
\unexpanded
\def
\normalbf
{
\let
\fontalternative
\s!bf
\font_helpers_synchronize_font
}
918
\unexpanded
\def
\normalit
{
\let
\fontalternative
\s!it
\font_helpers_synchronize_font
}
919
\unexpanded
\def
\normalsl
{
\let
\fontalternative
\s!sl
\font_helpers_synchronize_font
}
920
\unexpanded
\def
\normalbi
{
\let
\fontalternative
\s!bi
\font_helpers_synchronize_font
}
921
\unexpanded
\def
\normalbs
{
\let
\fontalternative
\s!bs
\font_helpers_synchronize_font
}
922 923
\let
\tf
\normaltf
924
\let
\bf
\normalbf
925
\let
\it
\normalit
926
\let
\sl
\normalsl
927
\let
\bi
\normalbi
928
\let
\bs
\normalbs
929 930
\unexpanded
\def
\normalrm
{
\font_helpers_set_current_font_style
{
\s!rm
}}
931
\unexpanded
\def
\normalss
{
\font_helpers_set_current_font_style
{
\s!ss
}}
932
\unexpanded
\def
\normaltt
{
\font_helpers_set_current_font_style
{
\s!tt
}}
933 934
\let
\rm
\normalrm
935
\let
\ss
\normalss
936
\let
\tt
\normaltt
937 938
\protect
\endinput
939 940
% LM math vs CM math (analysis by Taco):
941
%
942
% Computer Modern Roman : Donald Knuth
943
% Latin Modern : LM Font Revision Team
944
%
945
% lmex10.tfm % identical
946
% lmmi5.tfm % identical
947
% lmmi6.tfm % identical
948
% lmmi7.tfm % identical
949
% lmmi8.tfm % identical
950
% lmmi9.tfm % identical
951
% lmmi10.tfm % identical
952
% lmmi12.tfm % identical
953
% lmmib10.tfm % identical
954
% lmsy5.tfm % extra chars: 254,255 (octal)
955
% lmsy6.tfm % extra chars: 254,255 (octal)
956
% lmsy7.tfm % extra chars: 254,255 (octal)
957
% lmsy8.tfm % extra chars: 254,255 (octal)
958
% lmsy9.tfm % extra chars: 254,255 (octal)
959
% lmsy10.tfm % extra chars: 254,255 (octal)
960
% lmbsy10.tfm % extra chars: 254,255 (octal)
961
%
962
% From the 'AMS' set:
963
%
964
% lmmib5.tfm % identical
965
% lmmib7.tfm % identical
966
% lmbsy5.tfm % extra chars: 254,255 (octal)
967
% lmbsy7.tfm % extra chars: 254,255 (octal)
968
%
969
% The two extra characters are:
970
%
971
% /lessorequalslant
972
% /greaterorequalslant
973 974
% \unprotect
975
%
976
% \definehighlight[\v!italic ][\c!command=\v!no,\c!style=\v!italic]
977
% \definehighlight[\v!bold ][\c!command=\v!no,\c!style=\v!bold]
978
% \definehighlight[\v!bolditalic][\c!command=\v!no,\c!style=\v!bolditalic]
979
% \definehighlight[\v!mono] [\c!command=\v!no,\c!style=\v!mono]
980
% \definehighlight[\v!monobold] [\c!command=\v!no,\c!style=\v!monobold]
981
%
982
% \definehighlight[important] [\c!command=\v!no,\c!style=\v!bold]
983
% \definehighlight[unimportant] [\c!command=\v!no,\c!color=darkgray]
984
% \definehighlight[warning] [\c!command=\v!no,\c!style=\v!bold,\c!color=darkblue]
985
% \definehighlight[error] [\c!command=\v!no,\c!style=\v!bold,\c!color=darkred]
986
%
987
% \protect
988
%
989
% \starttext
990
% \highlight[italic] {italic}
991
% \highlight[bolditalic] {bolditalic}
992
% \highlight[bold] {bold}
993
% \highlight[mono] {mono}
994
% \highlight[monobold] {monobold}
995
% \highlight[important] {important}
996
% \highlight[unimportant]{unimportant}
997
% \highlight[warning] {warning}
998
% \highlight[error] {error}
999
% \stoptext
1000