summaryrefslogtreecommitdiff
path: root/fonts/electrumadf/source/fonts/electrum/dotscbuild.mtx
blob: 4915d9d729acdc34f70783c64597345394e47d59 (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
%% Based on lsbuild.mtx
%% See that file for commentary.

\relax

\metrics

\needsfontinstversion{1.917}

\usemtxpackage{ltcmds}
\ProvidesMtxPackage{dotscbuild}

\begincomment
\section{Proper latin small capitals}

\subsection{Some utility commands}
\endcomment

\setcommand\setcsctopglyph#1#2#3#4{
   \ifareglyphs{#2.sc,#3}\then
      \setglyph{#1}
         \topaccent{#2.sc}{#3}{#4}
      \endsetglyph
      \setleftrightkerning{#1}{#2.sc}{1000}
   \Fi
}
\setcommand\setcscbotglyph#1#2#3#4{
   \ifareglyphs{#2.sc,#3}\then
      \setglyph{#1}
         \botaccent{#2.sc}{#3}{#4}
      \endsetglyph
      \setleftrightkerning{#1}{#2.sc}{1000}
   \Fi
}
\begincomment\medskip
A \textbf{Try: Set glyph} is an ordinary \textbf{Set glyph} which is 
conditional on that a set of glyphs (those used to construct the 
composite glyph) are available. It is technically e.g.
\begin{quotation}
  \setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}%
    {\macroparameter{3}}{\macroparameter{4}}
  \setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}%
    {\macroparameter{3}}{\macroparameter{4}}\par
\end{quotation}
(both of which are implemented in the code as simple four argument 
commands), but in the list of commands below those two commands will 
be typeset as
\resetcommand\setcsctopglyph#1#2#3#4{%
   \Aheading{Try: Set glyph `\TypesetStringExpression{#1}'}
   \topaccent{#2.sc}{#3}{#4}
   \setleftrightkerning{#1}{#2.sc}{1000}
}
\resetcommand\setcscbotglyph#1#2#3#4{%
   \Aheading{Try: Set glyph `\TypesetStringExpression{#1}'}
   \botaccent{#2.sc}{#3}{#4}
   \setleftrightkerning{#1}{#2.sc}{1000}
}
\begin{quotation}
  \setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}%
    {\macroparameter{3}}{\macroparameter{4}}
  \setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}%
    {\macroparameter{3}}{\macroparameter{4}}
\end{quotation}
\endcomment

\ifareglyphs{L,l.sc}\then
   \setint{smallcapsscale}{
     \div{\mul{1000}{\height{l.sc}}}{\height{L}}
   }
\Else
   \setint{smallcapsscale}{800}
\Fi


\setcsctopglyph{aacute.sc}{a}{acute}{500}
\setcsctopglyph{abreve.sc}{a}{breve}{500}
\setcsctopglyph{acircumflex.sc}{a}{circumflex}{500}
\setcsctopglyph{adieresis.sc}{a}{dieresis}{500}
\setcsctopglyph{agrave.sc}{a}{grave}{500}
\setcscbotglyph{aogonek.sc}{a}{ogonek}{900}
\setcsctopglyph{aring.sc}{a}{ring}{500}
\setcsctopglyph{atilde.sc}{a}{tilde}{500}

\setcsctopglyph{cacute.sc}{c}{acute}{500}
\setcsctopglyph{ccaron.sc}{c}{caron}{500}
\setcsctopglyph{ccedilla.sc}{c}{cedilla}{500}

\setcsctopglyph{dcaron.sc}{d}{caron}{500}

\setcsctopglyph{eacute.sc}{e}{acute}{500}
\setcsctopglyph{ecaron.sc}{e}{caron}{500}
\setcsctopglyph{ecircumflex.sc}{e}{circumflex}{500}
\setcsctopglyph{edieresis.sc}{e}{dieresis}{500}
\setcsctopglyph{egrave.sc}{e}{grave}{500}
\setcscbotglyph{eogonek.sc}{e}{ogonek}{850}

\setcsctopglyph{gbreve.sc}{g}{breve}{500}

\setcsctopglyph{iacute.sc}{i}{acute}{500}
\setcsctopglyph{icircumflex.sc}{i}{circumflex}{500}
\setcsctopglyph{idieresis.sc}{i}{dieresis}{500}
\setcsctopglyph{idotaccent.sc}{i}{dotaccent}{500}
\setcsctopglyph{igrave.sc}{i}{grave}{500}

\setcsctopglyph{lacute.sc}{l}{acute}{250}

\ifareglyphs{l.sc,quoteright}\then
   \setglyph{lcaron.sc}
      \glyph{l.sc}{1000}
      \ifisint{monowidth}\then\Else \movert{-100} \Fi
      \glyph{quoteright}{\int{smallcapsscale}}
   \endsetglyph
   \setleftkerning{lcaron.sc}{l.sc}{1000}
\Fi

\setcsctopglyph{nacute.sc}{n}{acute}{500}
\setcsctopglyph{ncaron.sc}{n}{caron}{500}
\setcsctopglyph{ntilde.sc}{n}{tilde}{500}

\setcsctopglyph{oacute.sc}{o}{acute}{500}
\setcsctopglyph{ocircumflex.sc}{o}{circumflex}{500}
\setcsctopglyph{odieresis.sc}{o}{dieresis}{500}
\setcsctopglyph{ograve.sc}{o}{grave}{500}
\setcsctopglyph{ohungarumlaut.sc}{o}{hungarumlaut}{500}
\setcsctopglyph{otilde.sc}{o}{tilde}{500}

\setcsctopglyph{racute.sc}{r}{acute}{500}
\setcsctopglyph{rcaron.sc}{r}{caron}{500}

\setcsctopglyph{sacute.sc}{s}{acute}{500}
\setcsctopglyph{scaron.sc}{s}{caron}{500}
\setcscbotglyph{scedilla.sc}{s}{cedilla}{500}

\setcsctopglyph{tcaron.sc}{t}{caron}{500}
\setcscbotglyph{tcedilla.sc}{t}{cedilla}{500}

\setcsctopglyph{uacute.sc}{u}{acute}{500}
\setcsctopglyph{ucircumflex.sc}{u}{circumflex}{500}
\setcsctopglyph{udieresis.sc}{u}{dieresis}{500}
\setcsctopglyph{ugrave.sc}{u}{grave}{500}
\setcsctopglyph{uhungarumlaut.sc}{u}{hungarumlaut}{500}
\setcsctopglyph{uring.sc}{u}{ring}{500}

\setcsctopglyph{yacute.sc}{y}{acute}{500}
\setcsctopglyph{ydieresis.sc}{y}{dieresis}{500}

\setcsctopglyph{zacute.sc}{z}{acute}{500}
\setcsctopglyph{zcaron.sc}{z}{caron}{500}
\setcsctopglyph{zdotaccent.sc}{z}{dotaccent}{500}


\begincomment
\subsection{Other glyphs that can be built}
\endcomment

\ifisglyph{dcroat.sc}\then
   \setglyph{dbar.sc}
      \glyph{dcroat.sc}{1000}
   \endsetglyph
   \setleftrightkerning{dbar.sc}{dcroat.sc}{1000}
\Else\ifisglyph{eth.sc}\then
   \setglyph{dbar.sc}
      \glyph{eth.sc}{1000}
   \endsetglyph
   \setleftrightkerning{dbar.sc}{eth.sc}{1000}
\Fi\Fi


\endmetrics