summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkxl/font-tra.mkxl
blob: 625e2fe0b870d4c368da783ecfeb74122f15533c (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
%D \module
%D   [       file=font-tra,
%D        version=2009.01.02, % or so
%D          title=\CONTEXT\ Font Macros,
%D       subtitle=Tracing,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\unprotect

\writestatus{loading}{ConTeXt Font Macros / Tracing}

%D just use fontid

%D \macros
%D   {showbodyfont}
%D
%D One can call for a rather simple overview of a bodyfont and the relations between
%D its alternative fonts.
%D
%D \showsetup{showbodyfont}
%D
%D The current bodyfont (here we omitted the argument) looks like:
%D
%D \showbodyfont
%D
%D The implementation is rather straightforward in using \type {\halign}.

\fetchmodulecommand \showbodyfont \f!font_run

%D \macros
%D   {showfontstrip, showminimalbaseline}
%D
%D The next command can come in handy when combining different fonts into a
%D collection (typeface) and determining optimal baseline distances.
%D
%D \showfontstrip \blank \showminimalbaseline

\fetchmodulecommand \showfontstrip       \f!font_run
\fetchmodulecommand \showminimalbaseline \f!font_run

%D \macros
%D   {showkerning}
%D
%D A goody is:
%D
%D \showkerning{Can you guess what kerning is?}

\fetchmodulecommand \showkerning \f!font_run

%D \macros
%D   {showbodyfontenvironment,showfont,showfontstyle,showligatures}
%D
%D The current bodyfontenvironment is:
%D
%D \showbodyfontenvironment
%D
%D This overview is generated using:
%D
%D \showsetup{showbodyfontenvironment}

\fetchmodulecommand \showbodyfontenvironment \f!font_run

%D The following command generates a fontmap:
%D
%D \startbuffer
%D \showfont[SansBold at 12pt]
%D \stopbuffer
%D
%D \typebuffer
%D \getbuffer

\fetchmodulecommand \showfont           \f!font_run
\fetchmodulecommand \showfontstyle      \f!font_run
\fetchmodulecommand \showligature       \f!font_run
\fetchmodulecommand \showligatures      \f!font_run
\fetchmodulecommand \showcharratio      \f!font_run
\fetchmodulecommand \showfontparameters \f!font_run

\permanent\protected\def\showchardata#1{\ctxcommand{showchardata("#1")}}   % todo: direct implementor
\permanent\protected\def\showfontdata  {\ctxcommand{showfontparameters()}} % todo: direct implementor

%D \macros
%D   {doiffontpresentelse}
%D
%D \starttyping
%D \doiffontpresentelse{texnansi-lmr10}{YES}{NO}
%D \doiffontpresentelse{adam-lindsay-modern-serif}{YES}{NO}
%D \stoptyping

\permanent\protected\def\doifelsefontpresent#1{\clf_doifelsefontpresent{#1}}

\aliased\let\doiffontpresentelse\doifelsefontpresent

%D The otf tracer code is now moved. If the individual commands are needed
%D one can just load the module.

\fetchmodulecommand \showotfcomposition      \f!font_run
\fetchmodulecommand \showotfcompositionlist  \f!font_run
\fetchmodulecommand \startotfsample          \f!font_run
\fetchmodulecommand \startotfcompositionlist \f!font_run

% \permanent\protected\def\savefontdata[#1]% not yet in i-*.xml
%   {\begingroup
%    \getdummyparameters[#1]%
%    \clf_savefont {
%       filename {\dummyparameter\c!file}
%       fontname {\dummyparameter\c!name}
%       method   {\dummyparameter\c!method}
%    }%
%    \endgroup}

\protect \endinput