| 1 |
%%% ==================================================================== |
| 2 |
%%% @TeX-font-metrics-file{ |
| 3 |
%%% author = "Lars Hellstr{\"o}m", |
| 4 |
%%% date = "2003-03-29", |
| 5 |
%%% time = "16:16:56 +01:00", |
| 6 |
%%% filename = "lsbuild.mtx", |
| 7 |
%%% email = "[email protected]", |
| 8 |
%%% URL = "http://www.tug.org/applications/fontinst/", |
| 9 |
%%% checksum = "", |
| 10 |
%%% codetable = "ISO/ASCII", |
| 11 |
%%% keywords = "metrics, TeX, PostScript", |
| 12 |
%%% supported = "yes", |
| 13 |
%%% abstract = "This is a font metrics file, for use with the |
| 14 |
%%% fontinst utility. It builds less common |
| 15 |
%%% small caps letters from plain ones and |
| 16 |
%%% accents.", |
| 17 |
%%% package = "fontinst", |
| 18 |
%%% dependencies = "fontinst.sty, fontdoc.sty", |
| 19 |
%%% } |
| 20 |
%%% ==================================================================== |
| 21 |
|
| 22 |
\relax |
| 23 |
|
| 24 |
\documentclass[twocolumn]{article} |
| 25 |
|
| 26 |
\usepackage{fontdoc}[2002/03/01] |
| 27 |
\showbranches |
| 28 |
|
| 29 |
\title{Building latin smallcaps letters} |
| 30 |
\author{Lars Hellstr\"om} |
| 31 |
\date{3 January 2003} |
| 32 |
|
| 33 |
\begin{document} |
| 34 |
\maketitle |
| 35 |
|
| 36 |
This file contains commands that build some proper small capital |
| 37 |
glyphs from other small capital glyphs, but nothing is done is those |
| 38 |
base glyphs have not already been set. |
| 39 |
|
| 40 |
If you want to \emph{fake} small capitals using full capitals, then |
| 41 |
have a look at \texttt{lsfake.mtx} instead. |
| 42 |
|
| 43 |
\metrics |
| 44 |
|
| 45 |
\needsfontinstversion{1.917} |
| 46 |
|
| 47 |
\usemtxpackage{ltcmds} |
| 48 |
\ProvidesMtxPackage{lsbuild} |
| 49 |
|
| 50 |
\begincomment |
| 51 |
\section{Proper latin small capitals} |
| 52 |
|
| 53 |
\subsection{Some utility commands} |
| 54 |
\endcomment |
| 55 |
|
| 56 |
\setcommand\setcsctopglyph#1#2#3#4{ |
| 57 |
\ifareglyphs{#2small,#3}\then |
| 58 |
\setglyph{#1} |
| 59 |
\topaccent{#2small}{#3}{#4} |
| 60 |
\endsetglyph |
| 61 |
\setleftrightkerning{#1}{#2small}{1000} |
| 62 |
\Fi |
| 63 |
} |
| 64 |
\setcommand\setcscbotglyph#1#2#3#4{ |
| 65 |
\ifareglyphs{#2small,#3}\then |
| 66 |
\setglyph{#1} |
| 67 |
\botaccent{#2small}{#3}{#4} |
| 68 |
\endsetglyph |
| 69 |
\setleftrightkerning{#1}{#2small}{1000} |
| 70 |
\Fi |
| 71 |
} |
| 72 |
\begincomment\medskip |
| 73 |
A ``\textbf{Try: Set glyph}'' is an ordinary \textbf{Set glyph} which is |
| 74 |
conditional on that a set of glyphs (those used to construct the |
| 75 |
composite glyph) are available. Technically the command definitions |
| 76 |
are |
| 77 |
\begin{quotation} |
| 78 |
\verb|\setcsctopglyph|\textit{\#1\#2\#3\#4} $\mapsto$\\ |
| 79 |
\setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}% |
| 80 |
{\macroparameter{3}}{\macroparameter{4}} |
| 81 |
\par\medskip |
| 82 |
|
| 83 |
\verb|\setcscbotglyph|\textit{\#1\#2\#3\#4} $\mapsto$\\ |
| 84 |
\setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}% |
| 85 |
{\macroparameter{3}}{\macroparameter{4}}\par |
| 86 |
\end{quotation} |
| 87 |
but in the list of commands below those two commands will |
| 88 |
be typeset as |
| 89 |
\resetcommand\setcsctopglyph#1#2#3#4{% |
| 90 |
\Aheading{Try: Set glyph `\TypesetStringExpression{#1}'} |
| 91 |
\topaccent{#2small}{#3}{#4} |
| 92 |
\setleftrightkerning{#1}{#2small}{1000} |
| 93 |
} |
| 94 |
\resetcommand\setcscbotglyph#1#2#3#4{% |
| 95 |
\Aheading{Try: Set glyph `\TypesetStringExpression{#1}'} |
| 96 |
\botaccent{#2small}{#3}{#4} |
| 97 |
\setleftrightkerning{#1}{#2small}{1000} |
| 98 |
} |
| 99 |
\begin{quotation} |
| 100 |
\setcsctopglyph{\macroparameter{1}}{\macroparameter{2}}% |
| 101 |
{\macroparameter{3}}{\macroparameter{4}} |
| 102 |
\setcscbotglyph{\macroparameter{1}}{\macroparameter{2}}% |
| 103 |
{\macroparameter{3}}{\macroparameter{4}} |
| 104 |
\end{quotation} |
| 105 |
\endcomment |
| 106 |
|
| 107 |
\begincomment |
| 108 |
\subsection{Getting the \textit{smallcapsscale} right} |
| 109 |
|
| 110 |
The \textit{smallcapsscale} integer is normally only used when |
| 111 |
faking smallcaps by shrinking capitals, but with one of the |
| 112 |
glyphs below (\texttt{Lcaron}) it is actually used for shrinking |
| 113 |
the right quote. Thus a suitable default value has to be assigned |
| 114 |
to it. |
| 115 |
\endcomment |
| 116 |
|
| 117 |
\ifareglyphs{L,Lsmall}\then |
| 118 |
\setint{smallcapsscale}{ |
| 119 |
\div{\mul{1000}{\height{Lsmall}}}{\height{L}} |
| 120 |
} |
| 121 |
\Else |
| 122 |
\setint{smallcapsscale}{800} |
| 123 |
\Fi |
| 124 |
|
| 125 |
\begincomment |
| 126 |
\subsection{Accenting smallcaps glyphs} |
| 127 |
|
| 128 |
The commands below build accented smallcaps letters from existing |
| 129 |
smallcaps letters and normal accents. The accent positions are the |
| 130 |
ones traditionally used in \texttt{latin.mtx}. |
| 131 |
|
| 132 |
\endcomment |
| 133 |
|
| 134 |
|
| 135 |
\setcsctopglyph{Aacutesmall}{A}{acute}{500} |
| 136 |
\setcsctopglyph{Abrevesmall}{A}{breve}{500} |
| 137 |
\setcsctopglyph{Acircumflexsmall}{A}{circumflex}{500} |
| 138 |
\setcsctopglyph{Adieresissmall}{A}{dieresis}{500} |
| 139 |
\setcsctopglyph{Agravesmall}{A}{grave}{500} |
| 140 |
\setcscbotglyph{Aogoneksmall}{A}{ogonek}{900} |
| 141 |
\setcsctopglyph{Aringsmall}{A}{ring}{500} |
| 142 |
\setcsctopglyph{Atildesmall}{A}{tilde}{500} |
| 143 |
|
| 144 |
\setcsctopglyph{Cacutesmall}{C}{acute}{500} |
| 145 |
\setcsctopglyph{Ccaronsmall}{C}{caron}{500} |
| 146 |
\setcsctopglyph{Ccedillasmall}{C}{cedilla}{500} |
| 147 |
|
| 148 |
\setcsctopglyph{Dcaronsmall}{D}{caron}{500} |
| 149 |
|
| 150 |
\setcsctopglyph{Eacutesmall}{E}{acute}{500} |
| 151 |
\setcsctopglyph{Ecaronsmall}{E}{caron}{500} |
| 152 |
\setcsctopglyph{Ecircumflexsmall}{E}{circumflex}{500} |
| 153 |
\setcsctopglyph{Edieresissmall}{E}{dieresis}{500} |
| 154 |
\setcsctopglyph{Egravesmall}{E}{grave}{500} |
| 155 |
\setcscbotglyph{Eogoneksmall}{E}{ogonek}{850} |
| 156 |
|
| 157 |
\setcsctopglyph{Gbrevesmall}{G}{breve}{500} |
| 158 |
|
| 159 |
\setcsctopglyph{Iacutesmall}{I}{acute}{500} |
| 160 |
\setcsctopglyph{Icircumflexsmall}{I}{circumflex}{500} |
| 161 |
\setcsctopglyph{Idieresissmall}{I}{dieresis}{500} |
| 162 |
\setcsctopglyph{Idotaccentsmall}{I}{dotaccent}{500} |
| 163 |
\setcsctopglyph{Igravesmall}{I}{grave}{500} |
| 164 |
|
| 165 |
\setcsctopglyph{Lacutesmall}{L}{acute}{250} |
| 166 |
|
| 167 |
\ifareglyphs{Lsmall,quoteright}\then |
| 168 |
\setglyph{Lcaronsmall} |
| 169 |
\glyph{Lsmall}{1000} |
| 170 |
\ifisint{monowidth}\then\Else \movert{-100} \Fi |
| 171 |
\glyph{quoteright}{\int{smallcapsscale}} |
| 172 |
\endsetglyph |
| 173 |
\setleftkerning{Lcaronsmall}{Lsmall}{1000} |
| 174 |
\Fi |
| 175 |
|
| 176 |
\setcsctopglyph{Nacutesmall}{N}{acute}{500} |
| 177 |
\setcsctopglyph{Ncaronsmall}{N}{caron}{500} |
| 178 |
\setcsctopglyph{Ntildesmall}{N}{tilde}{500} |
| 179 |
|
| 180 |
\setcsctopglyph{Oacutesmall}{O}{acute}{500} |
| 181 |
\setcsctopglyph{Ocircumflexsmall}{O}{circumflex}{500} |
| 182 |
\setcsctopglyph{Odieresissmall}{O}{dieresis}{500} |
| 183 |
\setcsctopglyph{Ogravesmall}{O}{grave}{500} |
| 184 |
\setcsctopglyph{Ohungarumlautsmall}{O}{hungarumlaut}{500} |
| 185 |
\setcsctopglyph{Otildesmall}{O}{tilde}{500} |
| 186 |
|
| 187 |
\setcsctopglyph{Racutesmall}{R}{acute}{500} |
| 188 |
\setcsctopglyph{Rcaronsmall}{R}{caron}{500} |
| 189 |
|
| 190 |
\setcsctopglyph{Sacutesmall}{S}{acute}{500} |
| 191 |
\setcsctopglyph{Scaronsmall}{S}{caron}{500} |
| 192 |
\setcscbotglyph{Scedillasmall}{S}{cedilla}{500} |
| 193 |
|
| 194 |
\setcsctopglyph{Tcaronsmall}{T}{caron}{500} |
| 195 |
\setcscbotglyph{Tcedillasmall}{T}{cedilla}{500} |
| 196 |
|
| 197 |
\setcsctopglyph{Uacutesmall}{U}{acute}{500} |
| 198 |
\setcsctopglyph{Ucircumflexsmall}{U}{circumflex}{500} |
| 199 |
\setcsctopglyph{Udieresissmall}{U}{dieresis}{500} |
| 200 |
\setcsctopglyph{Ugravesmall}{U}{grave}{500} |
| 201 |
\setcsctopglyph{Uhungarumlautsmall}{U}{hungarumlaut}{500} |
| 202 |
\setcsctopglyph{Uringsmall}{U}{ring}{500} |
| 203 |
|
| 204 |
\setcsctopglyph{Yacutesmall}{Y}{acute}{500} |
| 205 |
\setcsctopglyph{Ydieresissmall}{Y}{dieresis}{500} |
| 206 |
|
| 207 |
\setcsctopglyph{Zacutesmall}{Z}{acute}{500} |
| 208 |
\setcsctopglyph{Zcaronsmall}{Z}{caron}{500} |
| 209 |
\setcsctopglyph{Zdotaccentsmall}{Z}{dotaccent}{500} |
| 210 |
|
| 211 |
|
| 212 |
\begincomment |
| 213 |
\subsection{Other glyphs that can be built} |
| 214 |
\endcomment |
| 215 |
|
| 216 |
\ifisglyph{Dcroatsmall}\then |
| 217 |
\setglyph{Dbarsmall} |
| 218 |
\glyph{Dcroatsmall}{1000} |
| 219 |
\endsetglyph |
| 220 |
\setleftrightkerning{Dbarsmall}{Dcroatsmall}{1000} |
| 221 |
\Else\ifisglyph{Ethsmall}\then |
| 222 |
\setglyph{Dbarsmall} |
| 223 |
\glyph{Ethsmall}{1000} |
| 224 |
\endsetglyph |
| 225 |
\setleftrightkerning{Dbarsmall}{Ethsmall}{1000} |
| 226 |
\Fi\Fi |
| 227 |
|
| 228 |
|
| 229 |
\endmetrics |
| 230 |
|
| 231 |
\texttt{Dbar} and \texttt{Dbarsmall} are old names for this glyph; |
| 232 |
nowadays the standard names are rather \texttt{Dcroat} and |
| 233 |
\texttt{Dcroatsmall}, but using those names throughout would require |
| 234 |
a coordinated change of the ETX files. |
| 235 |
It is probably possible to build a decent \texttt{Dbarsmall} from |
| 236 |
\texttt{Dsmall} and an \texttt{lslashslash} (or the like), similarly |
| 237 |
to the case with \texttt{dbar}, but that would require some |
| 238 |
experimentation. |
| 239 |
|
| 240 |
\section{Changes} |
| 241 |
|
| 242 |
This file was created 2003/01/02--05. It is loosely based on parts |
| 243 |
of \texttt{latin.mtx}. (LH) |
| 244 |
|
| 245 |
2003/02/06: Added setting of \textit{smallcapsscale}, and made |
| 246 |
\texttt{Lcaron} kern like \texttt{L} only on the left (not on the |
| 247 |
right). (LH) |
| 248 |
|
| 249 |
\end{document} |
| 250 |
|
| 251 |
% Copyright 2003 the fontinst maintenance team and any individual |
| 252 |
% authors listed elsewhere in this file. All rights reserved. |
| 253 |
% |
| 254 |
% This file is part of the fontinst system version 1.9. |
| 255 |
% ----------------------------------------------------- |
| 256 |
% |
| 257 |
% It may be distributed under the terms of the LaTeX Project Public |
| 258 |
% License, as described in lppl.txt in the base LaTeX distribution. |
| 259 |
% Either version 1.2 or, at your option, any later version. |
| 260 |
% |