font-var.mkvi /size: 2039 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=font-var,
3
%D version=2011.01.13, % (copied fron font-ini)
4
%D title=\CONTEXT\ Font Macros,
5
%D subtitle=Common Variables,
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
/
Common
Variables
}
15 16
\unprotect
17 18
% some more will move here
19 20
%D \macros
21
%D {fontstyle,fontalternative,fontsize,fontbody}
22
%D
23
%D Within a bodyfont, fonts can come in different sizes. For instance
24
%D \type {\tf} is accompanied by \type {\tfa}, \type {\tfb} etc. The
25
%D first two characters denote the alternative, while the third
26
%D character in these sequences represents the size. The actual size
27
%D is saved in a macro. The styles, being roman (\type {\rm}), sans
28
%D serif (\type {\ss}) etc. are also available in macros in \type {rm},
29
%D \type {ss} etc. form.
30 31
% fontclass % modern dejavu
32
% fontbody % ... 10pt 11pt 12pt ...
33
% fontstyle % rm ss tt mm hw cg ...
34
% fontalternative % tf bf sl it bs bi sc ...
35
% fontsize % a b c d ...
36
% fontface % 0=normal 1=text 2=script 3=scriptscript 4=x 5=xx (math are temporary)
37 38
\def
\normalizedbodyfontsize
{
1
2
pt
}
39 40
\def
\defaultfontbody
{
\normalizedbodyfontsize
}
41
\let
\defaultfontstyle
\empty
42
\let
\defaultfontalternative
\s!tf
43
\let
\defaultfontsize
\empty
44 45
\let
\globalfontclass
\empty
46
\let
\fontclass
\empty
47
\let
\fontbody
\defaultfontbody
48
\let
\fontstyle
\defaultfontstyle
49
\let
\fontalternative
\defaultfontalternative
50
\let
\fontsize
\defaultfontsize
51
\let
\fontface
\!!zerocount
52 53
\installmacrostack\fontstyle
54 55
% we can use an indirect mapping for fontclasses (map string onto numbers) and indeed this
56
% is somewhat more efficient but also makes the code messy ... maybe some day ...
57 58
\protect
\endinput
59