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
|
%D \module
%D [ file=m-gimmicks,
%D version=2022.08.25
%D title=\CONTEXT\ Extra Modules,
%D subtitle=Whatever comes up,
%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.
\def\MacScale {.7}%
\def\MacRule {.05}%
\def\MacDistance {.05}%
\def\MacKern {0}%
\protected\def\Mac
{\dontleavehmode
\begingroup
\scratchwidth \fontcharwd\font`M\relax
\scratchdistance\MacScale\fontcharwd\font`c\relax
\scratchoffset \dimexpr\fontcharht\font`M -\MacScale\fontcharht\font`c\relax
\scratchdepth \MacRule\exheight
\kern\scratchwidth
\vrule
width \scratchdistance
height \dimexpr \scratchoffset- \scratchdepth-\MacDistance\exheight\relax
depth \dimexpr-\scratchoffset+2\scratchdepth+\MacDistance\exheight\relax
\relax
\kern-\dimexpr\scratchwidth+\scratchdistance\relax
M%
\glyphscale\numexpr\numericscale\MacScale*\glyphyscale/\plusthousand\relax
\glyph
yoffset \scratchoffset `c
\kern\MacKern\emwidth
\endgroup}
\continueifinputfile{m-gimmicks.mkxl}
% Question on mailing list:
\chardef\MacAnulty = \privatecharactercode{MacAnulty}
\startsetups [box:mcanulty:\number\MacAnulty]
\Mac Anulty
\stopsetups
\registerboxglyph category {mcanulty} unicode \MacAnulty \relax
\startluacode
fonts.handlers.otf.addfeature {
name = "mcanulty",
type = "ligature",
nocheck = true,
data = {
-- [\number\MacAnulty] = {
-- [fonts.constructors.privateslots.MacAnulty] = {
[fonts.helpers.privateslot("MacAnulty")] = {
"M", "c", "A", "n", "u", "l", "t", "y",
},
}
}
\stopluacode
\definefontfeature[whatever][default][box=mcanulty,mcanulty=yes]
\definefontfeature[default][default][box=mcanulty,mcanulty=yes]
\startTEXpage [offset=10dk]
% \def\Test#1{%
% \begingroup
% #1%
% \dostepwiserecurse{5}{8}{1}{
% \def\MacScale{.##1}%
% \Mac Anulty
% \par
% }
% \endgroup
% }
% \Test\tf
% \Test\bf
% \Test\it
% \Test\sl
% \Test\bfb
% \def\MacScale{.6}
% \def\MacKern {-.1}
% \Mac Anulty
{\definedfont[Serif*whatever] McAnulty\quad \MacAnulty\par}
{\definedfont[SerifBold*whatever] McAnulty\quad \MacAnulty\par}
{\tf McAnulty\quad \MacAnulty\par}
{\bf McAnulty\quad \MacAnulty\par}
\stopTEXpage
|