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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
|
%%% ====================================================================
%%% @TeX-font-metrics-file{
%%% author = "Lars Hellstr{\"o}m",
%%% date = "2003-03-29",
%%% time = "16:16:56 +01:00",
%%% filename = "lsbuild.mtx",
%%% email = "fontinst@tug.org",
%%% URL = "http://www.tug.org/applications/fontinst/",
%%% checksum = "",
%%% codetable = "ISO/ASCII",
%%% keywords = "metrics, TeX, PostScript",
%%% supported = "yes",
%%% abstract = "This is a font metrics file, for use with the
%%% fontinst utility. It builds less common
%%% small caps letters from plain ones and
%%% accents.",
%%% package = "fontinst",
%%% dependencies = "fontinst.sty, fontdoc.sty",
%%% }
%%% ====================================================================
\relax
\documentclass[twocolumn]{article}
\usepackage{fontdoc}[2002/03/01]
\showbranches
\title{Building latin smallcaps letters}
\author{Lars Hellstr\"om}
\date{3 January 2003}
\begin{document}
\maketitle
This file contains commands that build some proper small capital
glyphs from other small capital glyphs, but nothing is done is those
base glyphs have not already been set.
If you want to \emph{fake} small capitals using full capitals, then
have a look at \texttt{lsfake.mtx} instead.
\metrics
\needsfontinstversion{1.917}
\usemtxpackage{ltcmds}
\ProvidesMtxPackage{lsbuild}
\begincomment
\section{Proper latin small capitals}
\subsection{Some utility commands}
\endcomment
\setcommand\setcsctopglyph#1#2#3#4{
\ifareglyphs{#2small,#3}\then
\setglyph{#1}
\topaccent{#2small}{#3}{#4}
\endsetglyph
\setleftrightkerning{#1}{#2small}{1000}
\Fi
}
\setcommand\setcscbotglyph#1#2#3#4{
\ifareglyphs{#2small,#3}\then
\setglyph{#1}
\botaccent{#2small}{#3}{#4}
\endsetglyph
\setleftrightkerning{#1}{#2small}{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. Technically the command definitions
are
\begin{quotation}
\verb|\setcsctopglyph|\textit{\#1\#2\#3\#4} $\mapsto$\\
\setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}%
{\macroparameter{3}}{\macroparameter{4}}
\par\medskip
\verb|\setcscbotglyph|\textit{\#1\#2\#3\#4} $\mapsto$\\
\setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}%
{\macroparameter{3}}{\macroparameter{4}}\par
\end{quotation}
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{#2small}{#3}{#4}
\setleftrightkerning{#1}{#2small}{1000}
}
\resetcommand\setcscbotglyph#1#2#3#4{%
\Aheading{Try: Set glyph `\TypesetStringExpression{#1}'}
\botaccent{#2small}{#3}{#4}
\setleftrightkerning{#1}{#2small}{1000}
}
\begin{quotation}
\setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}%
{\macroparameter{3}}{\macroparameter{4}}
\setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}%
{\macroparameter{3}}{\macroparameter{4}}
\end{quotation}
\endcomment
\begincomment
\subsection{Getting the \textit{smallcapsscale} right}
The \textit{smallcapsscale} integer is normally only used when
faking smallcaps by shrinking capitals, but with one of the
glyphs below (\texttt{Lcaron}) it is actually used for shrinking
the right quote. Thus a suitable default value has to be assigned
to it.
\endcomment
\ifareglyphs{L,Lsmall}\then
\setint{smallcapsscale}{
\div{\mul{1000}{\height{Lsmall}}}{\height{L}}
}
\Else
\setint{smallcapsscale}{800}
\Fi
\begincomment
\subsection{Accenting smallcaps glyphs}
The commands below build accented smallcaps letters from existing
smallcaps letters and normal accents. The accent positions are the
ones traditionally used in \texttt{latin.mtx}.
\endcomment
\setcsctopglyph{Aacutesmall}{A}{acute}{500}
\setcsctopglyph{Abrevesmall}{A}{breve}{500}
\setcsctopglyph{Acircumflexsmall}{A}{circumflex}{500}
\setcsctopglyph{Adieresissmall}{A}{dieresis}{500}
\setcsctopglyph{Agravesmall}{A}{grave}{500}
\setcscbotglyph{Aogoneksmall}{A}{ogonek}{900}
\setcsctopglyph{Aringsmall}{A}{ring}{500}
\setcsctopglyph{Atildesmall}{A}{tilde}{500}
\setcsctopglyph{Cacutesmall}{C}{acute}{500}
\setcsctopglyph{Ccaronsmall}{C}{caron}{500}
\setcsctopglyph{Ccedillasmall}{C}{cedilla}{500}
\setcsctopglyph{Dcaronsmall}{D}{caron}{500}
\setcsctopglyph{Eacutesmall}{E}{acute}{500}
\setcsctopglyph{Ecaronsmall}{E}{caron}{500}
\setcsctopglyph{Ecircumflexsmall}{E}{circumflex}{500}
\setcsctopglyph{Edieresissmall}{E}{dieresis}{500}
\setcsctopglyph{Egravesmall}{E}{grave}{500}
\setcscbotglyph{Eogoneksmall}{E}{ogonek}{850}
\setcsctopglyph{Gbrevesmall}{G}{breve}{500}
\setcsctopglyph{Iacutesmall}{I}{acute}{500}
\setcsctopglyph{Icircumflexsmall}{I}{circumflex}{500}
\setcsctopglyph{Idieresissmall}{I}{dieresis}{500}
\setcsctopglyph{Idotaccentsmall}{I}{dotaccent}{500}
\setcsctopglyph{Igravesmall}{I}{grave}{500}
\setcsctopglyph{Lacutesmall}{L}{acute}{250}
\ifareglyphs{Lsmall,quoteright}\then
\setglyph{Lcaronsmall}
\glyph{Lsmall}{1000}
\ifisint{monowidth}\then\Else \movert{-100} \Fi
\glyph{quoteright}{\int{smallcapsscale}}
\endsetglyph
\setleftkerning{Lcaronsmall}{Lsmall}{1000}
\Fi
\setcsctopglyph{Nacutesmall}{N}{acute}{500}
\setcsctopglyph{Ncaronsmall}{N}{caron}{500}
\setcsctopglyph{Ntildesmall}{N}{tilde}{500}
\setcsctopglyph{Oacutesmall}{O}{acute}{500}
\setcsctopglyph{Ocircumflexsmall}{O}{circumflex}{500}
\setcsctopglyph{Odieresissmall}{O}{dieresis}{500}
\setcsctopglyph{Ogravesmall}{O}{grave}{500}
\setcsctopglyph{Ohungarumlautsmall}{O}{hungarumlaut}{500}
\setcsctopglyph{Otildesmall}{O}{tilde}{500}
\setcsctopglyph{Racutesmall}{R}{acute}{500}
\setcsctopglyph{Rcaronsmall}{R}{caron}{500}
\setcsctopglyph{Sacutesmall}{S}{acute}{500}
\setcsctopglyph{Scaronsmall}{S}{caron}{500}
\setcscbotglyph{Scedillasmall}{S}{cedilla}{500}
\setcsctopglyph{Tcaronsmall}{T}{caron}{500}
\setcscbotglyph{Tcedillasmall}{T}{cedilla}{500}
\setcsctopglyph{Uacutesmall}{U}{acute}{500}
\setcsctopglyph{Ucircumflexsmall}{U}{circumflex}{500}
\setcsctopglyph{Udieresissmall}{U}{dieresis}{500}
\setcsctopglyph{Ugravesmall}{U}{grave}{500}
\setcsctopglyph{Uhungarumlautsmall}{U}{hungarumlaut}{500}
\setcsctopglyph{Uringsmall}{U}{ring}{500}
\setcsctopglyph{Yacutesmall}{Y}{acute}{500}
\setcsctopglyph{Ydieresissmall}{Y}{dieresis}{500}
\setcsctopglyph{Zacutesmall}{Z}{acute}{500}
\setcsctopglyph{Zcaronsmall}{Z}{caron}{500}
\setcsctopglyph{Zdotaccentsmall}{Z}{dotaccent}{500}
\begincomment
\subsection{Other glyphs that can be built}
\endcomment
\ifisglyph{Dcroatsmall}\then
\setglyph{Dbarsmall}
\glyph{Dcroatsmall}{1000}
\endsetglyph
\setleftrightkerning{Dbarsmall}{Dcroatsmall}{1000}
\Else\ifisglyph{Ethsmall}\then
\setglyph{Dbarsmall}
\glyph{Ethsmall}{1000}
\endsetglyph
\setleftrightkerning{Dbarsmall}{Ethsmall}{1000}
\Fi\Fi
\endmetrics
\texttt{Dbar} and \texttt{Dbarsmall} are old names for this glyph;
nowadays the standard names are rather \texttt{Dcroat} and
\texttt{Dcroatsmall}, but using those names throughout would require
a coordinated change of the ETX files.
It is probably possible to build a decent \texttt{Dbarsmall} from
\texttt{Dsmall} and an \texttt{lslashslash} (or the like), similarly
to the case with \texttt{dbar}, but that would require some
experimentation.
\section{Changes}
This file was created 2003/01/02--05. It is loosely based on parts
of \texttt{latin.mtx}. (LH)
2003/02/06: Added setting of \textit{smallcapsscale}, and made
\texttt{Lcaron} kern like \texttt{L} only on the left (not on the
right). (LH)
\end{document}
% Copyright 2003 the fontinst maintenance team and any individual
% authors listed elsewhere in this file. All rights reserved.
%
% This file is part of the fontinst system version 1.9.
% -----------------------------------------------------
%
% It may be distributed under the terms of the LaTeX Project Public
% License, as described in lppl.txt in the base LaTeX distribution.
% Either version 1.2 or, at your option, any later version.
%
|