font-unk.mkiv /size: 6038 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=font-unk,
3
%D version=1998.09.10,
4
%D title=\CONTEXT\ Font Macros,
5
%D subtitle=Unknown Defaults,
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
%D This module is rather important, because it enables us to
15
%D define and call for not yet defined fonts in a way
16
%D completely independant of real font names. First we map
17
%D some meaningful names onto unknown filenames.
18 19
\unprotect
20 21
\definefontsynonym
[
Serif
]
[
unknown
]
22
\definefontsynonym
[
SerifBold
]
[
unknown
]
23
\definefontsynonym
[
SerifItalic
]
[
unknown
]
24
\definefontsynonym
[
SerifSlanted
]
[
unknown
]
25
\definefontsynonym
[
SerifBoldItalic
]
[
unknown
]
26
\definefontsynonym
[
SerifBoldSlanted
]
[
unknown
]
27
\definefontsynonym
[
SerifCaps
]
[
unknown
]
28 29
\definefontsynonym
[
Sans
]
[
unknown
]
30
\definefontsynonym
[
SansBold
]
[
unknown
]
31
\definefontsynonym
[
SansItalic
]
[
unknown
]
32
\definefontsynonym
[
SansSlanted
]
[
unknown
]
33
\definefontsynonym
[
SansBoldItalic
]
[
unknown
]
34
\definefontsynonym
[
SansBoldSlanted
]
[
unknown
]
35
\definefontsynonym
[
SansCaps
]
[
unknown
]
36 37
\definefontsynonym
[
Mono
]
[
unknown
]
38
\definefontsynonym
[
MonoBold
]
[
unknown
]
39
\definefontsynonym
[
MonoItalic
]
[
unknown
]
40
\definefontsynonym
[
MonoSlanted
]
[
unknown
]
41
\definefontsynonym
[
MonoBoldItalic
]
[
unknown
]
42
\definefontsynonym
[
MonoBoldSlanted
]
[
unknown
]
43
\definefontsynonym
[
MonoCaps
]
[
unknown
]
44 45
\definefontsynonym
[
MathRoman
]
[
unknown
]
46
\definefontsynonym
[
MathRomanL
2
R
]
[
MathRoman
]
47
\definefontsynonym
[
MathRomanR
2
L
]
[
MathRoman
]
48
\definefontsynonym
[
MathRomanBold
]
[
MathRoman
]
49
\definefontsynonym
[
MathRomanBoldL
2
R
]
[
MathRomanBold
]
50
\definefontsynonym
[
MathRomanBoldR
2
L
]
[
MathRomanBold
]
51 52
\definefontsynonym
[
Handwriting
]
[
unknown
]
53
\definefontsynonym
[
Calligraphic
]
[
unknown
]
54 55
%D This permit us to define (use) fonts that refer to the default style (so, Bold
56
%D may expand to SansBold or SerifBold, depending on the default style in the
57
%D typeface). The \LUA\ call is used to set the current alternative in a
58
%D non|-|interfering way. This make sure that the CurrentFont synonym (in font-sym)
59
%D is working as expected (e.g.\ in MixedCaps). Yes, this is complicates stuff.
60 61
\definefontsynonym
[
\s!Normal
]
[
\noexpand
\clf_tf
\noexpand
\v_font_string_d
]
62
\definefontsynonym
[
\s!Bold
]
[
\noexpand
\clf_bf
\noexpand
\v_font_string_d
\noexpand
\s!Bold
]
63
\definefontsynonym
[
\s!Italic
]
[
\noexpand
\clf_it
\noexpand
\v_font_string_d
\noexpand
\s!Italic
]
64
\definefontsynonym
[
\s!Slanted
]
[
\noexpand
\clf_sl
\noexpand
\v_font_string_d
\noexpand
\s!Slanted
]
65
\definefontsynonym
[
\s!BoldItalic
]
[
\noexpand
\clf_bi
\noexpand
\v_font_string_d
\noexpand
\s!BoldItalic
]
66
\definefontsynonym
[
\s!BoldSlanted
][
\noexpand
\clf_bs
\noexpand
\v_font_string_d
\noexpand
\s!BoldSlanted
]
67
\definefontsynonym
[
\s!Caps
]
[
\noexpand
\clf_tf
\noexpand
\v_font_string_d
\noexpand
\s!Caps
]
68 69
%D Also handy:
70 71
\definefontsynonym
[
Regular
]
[
Serif
]
72
\definefontsynonym
[
RegularBold
]
[
SerifBold
]
73
\definefontsynonym
[
RegularItalic
]
[
SerifItalic
]
74
\definefontsynonym
[
RegularSlanted
]
[
SerifSlanted
]
75
\definefontsynonym
[
RegularBoldItalic
]
[
SerifBoldItalic
]
76
\definefontsynonym
[
RegularBoldSlanted
]
[
SerifBoldSlanted
]
77
\definefontsynonym
[
RegularCaps
]
[
SerifCaps
]
78 79
\definefontsynonym
[
Support
]
[
Sans
]
80
\definefontsynonym
[
SupportBold
]
[
SansBold
]
81
\definefontsynonym
[
SupportItalic
]
[
SansItalic
]
82
\definefontsynonym
[
SupportSlanted
]
[
SansSlanted
]
83
\definefontsynonym
[
SupportBoldItalic
]
[
SansBoldItalic
]
84
\definefontsynonym
[
SupportBoldSlanted
]
[
SansBoldSlanted
]
85
\definefontsynonym
[
SupportCaps
]
[
SansCaps
]
86 87
%D Well, not that good an idea:
88 89
\definefontsynonym
[
Roman
]
[
Serif
]
90
\definefontsynonym
[
RomanBold
]
[
SerifBold
]
91
\definefontsynonym
[
RomanItalic
]
[
SerifItalic
]
92
\definefontsynonym
[
RomanSlanted
]
[
SerifSlanted
]
93
\definefontsynonym
[
RomanBoldItalic
]
[
SerifBoldItalic
]
94
\definefontsynonym
[
RomanBoldSlanted
]
[
SerifBoldSlanted
]
95
\definefontsynonym
[
RomanCaps
]
[
SerifCaps
]
96 97
\definefontsynonym
[
Type
]
[
Mono
]
98
\definefontsynonym
[
TypeBold
]
[
MonoBold
]
99
\definefontsynonym
[
TypeItalic
]
[
MonoItalic
]
100
\definefontsynonym
[
TypeSlanted
]
[
MonoSlanted
]
101
\definefontsynonym
[
TypeBoldItalic
]
[
MonoBoldItalic
]
102
\definefontsynonym
[
TypeBoldSlanted
]
[
MonoBoldSlanted
]
103
\definefontsynonym
[
TypeCaps
]
[
MonoCaps
]
104 105
%D Next we define roman, sans and monospaced font sets.
106 107
\definebodyfont
[
default
]
[
rm
]
108
[
\s!tf
=
Serif
sa
1
,
109
\s!bf
=
SerifBold
sa
1
,
110
\s!it
=
SerifItalic
sa
1
,
111
\s!sl
=
SerifSlanted
sa
1
,
112
\s!bi
=
SerifBoldItalic
sa
1
,
113
\s!bs
=
SerifBoldSlanted
sa
1
,
114
\s!sc
=
SerifCaps
sa
1
]
115 116
\definebodyfont
[
default
]
[
ss
]
117
[
\s!tf
=
Sans
sa
1
,
118
\s!bf
=
SansBold
sa
1
,
119
\s!it
=
SansItalic
sa
1
,
120
\s!sl
=
SansSlanted
sa
1
,
121
\s!bi
=
SansBoldItalic
sa
1
,
122
\s!bs
=
SansBoldSlanted
sa
1
,
123
\s!sc
=
SansCaps
sa
1
]
124 125
\definebodyfont
[
default
]
[
tt
]
126
[
\s!tf
=
Mono
sa
1
,
127
\s!bf
=
MonoBold
sa
1
,
128
\s!it
=
MonoItalic
sa
1
,
129
\s!sl
=
MonoSlanted
sa
1
,
130
\s!bi
=
MonoBoldItalic
sa
1
,
131
\s!bs
=
MonoBoldSlanted
sa
1
,
132
\s!sc
=
MonoCaps
sa
1
]
133 134
\definebodyfont
[
default
]
[
mm
]
135
[
\s!mr
=
MathRoman
mo
1
,
136
\s!mrlr
=
MathRomanL
2
R
mo
1
,
137
\s!mrrl
=
MathRomanR
2
L
mo
1
,
138
\s!mb
=
MathRomanBold
mo
1
,
139
\s!mblr
=
MathRomanBoldL
2
R
mo
1
,
140
\s!mbrl
=
MathRomanBoldR
2
L
mo
1
]
141 142
\definebodyfont
[
default
]
[
hw
]
143
[
\s!tf
=
Handwriting
sa
1
]
144 145
\definebodyfont
[
default
]
[
cg
]
146
[
\s!tf
=
Calligraphy
sa
1
]
147 148
%D These definitions come into action as soon as names are mapped onto real file
149
%D names (or names that themselves are mapped).
150 151
\protect
\endinput
152