| 1 |
%%% ==================================================================== |
| 2 |
%%% @TeX-font-metrics-file{ |
| 3 |
%%% author = "Lars Hellstr{\"o}m", |
| 4 |
%%% version = "1.923", |
| 5 |
%%% date = "2005-04-15", |
| 6 |
%%% time = "12:13:38 +02:00", |
| 7 |
%%% filename = "lsfake.mtx", |
| 8 |
%%% email = "[email protected]", |
| 9 |
%%% URL = "http://www.tug.org/applications/fontinst/", |
| 10 |
%%% checksum = "", |
| 11 |
%%% codetable = "ISO/ASCII", |
| 12 |
%%% keywords = "metrics, TeX, PostScript", |
| 13 |
%%% supported = "yes", |
| 14 |
%%% abstract = "This is a font metrics file, for use with the |
| 15 |
%%% fontinst utility. It fakes latin smallcaps.", |
| 16 |
%%% package = "fontinst", |
| 17 |
%%% dependencies = "fontinst.sty, fontdoc.sty, lubuild.mtx", |
| 18 |
%%% } |
| 19 |
%%% ==================================================================== |
| 20 |
|
| 21 |
\relax |
| 22 |
|
| 23 |
\documentclass[twocolumn]{article} |
| 24 |
|
| 25 |
\usepackage{fontdoc}[2002/03/01] |
| 26 |
\showbranches |
| 27 |
|
| 28 |
\newcommand{\IEint}[1]{\ensuremath{\TypesetIntegerExpression{\int{#1}}}} |
| 29 |
|
| 30 |
\title{Faking smallcaps} |
| 31 |
\author{Lars Hellstr\"om} |
| 32 |
\date{5 January 2003\\Version 1.923} |
| 33 |
|
| 34 |
\begin{document} |
| 35 |
\maketitle |
| 36 |
|
| 37 |
\section{Introduction} |
| 38 |
|
| 39 |
This file is used to fake small capitals (the \texttt{s} case) for a |
| 40 |
font by shrinking the full capitals (the \texttt{u} case) by a |
| 41 |
certain factor (\IEint{smallcapsscale}). This effectively changes the |
| 42 |
weight of the font so that it becomes lighter, but that effect is |
| 43 |
(for scaling factors near the default value) not too large, even |
| 44 |
though it is quite visible. |
| 45 |
|
| 46 |
Optimal distance between two letters generally grows slower than the |
| 47 |
dimensions of the letters themself. Conversely, to linearly shrink a |
| 48 |
line of text usually places the letters a bit too close. To counteract |
| 49 |
that, the \textbf{Small glyph} commands used below insert a bit of |
| 50 |
extra space (\IEint{smallcapsextraspace}) before and after the actual |
| 51 |
glyph. |
| 52 |
|
| 53 |
Besides the letters, there is also manufactured a special set of |
| 54 |
diacritical marks (skrunk by the same factor as the letters), with |
| 55 |
names such as \texttt{Acutesmall}. These are meant to be used as |
| 56 |
accent characters in a font where the fake small capitals are used as |
| 57 |
small letters, so that clashes within a single character when \TeX's |
| 58 |
\verb|\accent| primitive is used can be less pronounced. |
| 59 |
\textsf{Fontinst} users should however be aware that this is not |
| 60 |
necessarily the right thing to do; some fonts might look better with |
| 61 |
the \texttt{acute} etc.\@ glyphs as \texttt{Acutesmall} and friends. |
| 62 |
|
| 63 |
|
| 64 |
\metrics |
| 65 |
|
| 66 |
\needsfontinstversion{1.910} |
| 67 |
\usemtxpackage{lubuild} |
| 68 |
|
| 69 |
\ProvidesMtxPackage{lsfake} |
| 70 |
|
| 71 |
|
| 72 |
\begincomment |
| 73 |
\section{Some commands and default values} |
| 74 |
|
| 75 |
\endcomment |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
% A c&sc glyph is created by shrinking the cap glyph, and adding extra |
| 80 |
% space. |
| 81 |
|
| 82 |
\setcommand\cscglyph#1{ |
| 83 |
\movert{\int{smallcapsextraspace}} |
| 84 |
\glyph{#1}{\int{smallcapsscale}} |
| 85 |
\movert{\int{smallcapsextraspace}} |
| 86 |
} |
| 87 |
\begincomment |
| 88 |
A \textbf{Small glyph} is mainly the special case of a \textbf{Glyph} |
| 89 |
when the glyph is scaled |
| 90 |
$\TypesetIntegerExpression{\int{smallcapsscale}}$. This is used to |
| 91 |
fake smallcaps from full capitals. The exact meaning of |
| 92 |
``\textbf{Small glyph} `\#1'\,'' is |
| 93 |
\begin{quotation}\cscglyph{\macroparameter{1}}\end{quotation} |
| 94 |
|
| 95 |
\resetcommand\cscglyph#1{% |
| 96 |
\Bheading{Small glyph} `\TypesetStringExpression{#1}'% |
| 97 |
} |
| 98 |
\endcomment |
| 99 |
|
| 100 |
\setcommand\fakecscglyph#1#2{ |
| 101 |
\setglyph{#1small} |
| 102 |
\cscglyph{#2} |
| 103 |
\setleftrightkerning{#1small}{#2}{\int{smallcapskerning}} |
| 104 |
\endsetglyph |
| 105 |
} |
| 106 |
% If you supply a definition of \fakecscglyph which has #1medium |
| 107 |
% instead of #1small, then you can use this file to fake medium |
| 108 |
% capitals instead of small capitals. |
| 109 |
|
| 110 |
|
| 111 |
\setint{smallcapsscale}{800} |
| 112 |
\setint{smallcapskerning}{900} |
| 113 |
|
| 114 |
\ifisint{monowidth}\then |
| 115 |
\setint{smallcapsextraspace} |
| 116 |
{\half{\scale{\width{x}}{\sub{1000}{\int{smallcapsscale}}}}} |
| 117 |
\Else |
| 118 |
\setint{smallcapsextraspace}{25} |
| 119 |
\Fi |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
\begincomment |
| 124 |
\section{Unaccented letters} |
| 125 |
\endcomment |
| 126 |
|
| 127 |
\fakecscglyph{A}{A} |
| 128 |
\fakecscglyph{AE}{AE} |
| 129 |
\fakecscglyph{B}{B} |
| 130 |
\fakecscglyph{C}{C} |
| 131 |
\fakecscglyph{D}{D} |
| 132 |
\fakecscglyph{Eth}{Eth} |
| 133 |
\fakecscglyph{E}{E} |
| 134 |
\fakecscglyph{F}{F} |
| 135 |
\fakecscglyph{G}{G} |
| 136 |
\fakecscglyph{H}{H} |
| 137 |
\fakecscglyph{I}{I} |
| 138 |
\fakecscglyph{J}{J} |
| 139 |
\fakecscglyph{K}{K} |
| 140 |
\fakecscglyph{Lslash}{Lslash} |
| 141 |
\fakecscglyph{L}{L} |
| 142 |
\fakecscglyph{M}{M} |
| 143 |
\fakecscglyph{N}{N} |
| 144 |
\fakecscglyph{Ng}{Ng} |
| 145 |
\fakecscglyph{O}{O} |
| 146 |
\fakecscglyph{OE}{OE} |
| 147 |
\fakecscglyph{Oslash}{Oslash} |
| 148 |
\fakecscglyph{P}{P} |
| 149 |
\fakecscglyph{Q}{Q} |
| 150 |
\fakecscglyph{R}{R} |
| 151 |
\fakecscglyph{S}{S} |
| 152 |
\fakecscglyph{T}{T} |
| 153 |
\fakecscglyph{Thorn}{Thorn} |
| 154 |
\fakecscglyph{U}{U} |
| 155 |
\fakecscglyph{V}{V} |
| 156 |
\fakecscglyph{W}{W} |
| 157 |
\fakecscglyph{X}{X} |
| 158 |
\fakecscglyph{Y}{Y} |
| 159 |
\fakecscglyph{Z}{Z} |
| 160 |
|
| 161 |
\setglyph{Dbarsmall} |
| 162 |
\glyph{Ethsmall}{1000} |
| 163 |
\setleftrightkerning{Dbarsmall}{Ethsmall}{1000} |
| 164 |
\endsetglyph |
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
\begincomment |
| 170 |
\section{Accented letters} |
| 171 |
\endcomment |
| 172 |
|
| 173 |
|
| 174 |
\fakecscglyph{Aacute}{Aacute} |
| 175 |
\fakecscglyph{Abreve}{Abreve} |
| 176 |
\fakecscglyph{Acircumflex}{Acircumflex} |
| 177 |
\fakecscglyph{Adieresis}{Adieresis} |
| 178 |
\fakecscglyph{Agrave}{Agrave} |
| 179 |
\fakecscglyph{Aogonek}{Aogonek} |
| 180 |
\fakecscglyph{Aring}{Aring} |
| 181 |
\fakecscglyph{Atilde}{Atilde} |
| 182 |
\fakecscglyph{Cacute}{Cacute} |
| 183 |
\fakecscglyph{Ccaron}{Ccaron} |
| 184 |
\fakecscglyph{Ccedilla}{Ccedilla} |
| 185 |
\fakecscglyph{Dcaron}{Dcaron} |
| 186 |
\fakecscglyph{Eacute}{Eacute} |
| 187 |
\fakecscglyph{Ecaron}{Ecaron} |
| 188 |
\fakecscglyph{Ecircumflex}{Ecircumflex} |
| 189 |
\fakecscglyph{Edieresis}{Edieresis} |
| 190 |
\fakecscglyph{Egrave}{Egrave} |
| 191 |
\fakecscglyph{Eogonek}{Eogonek} |
| 192 |
\fakecscglyph{Gbreve}{Gbreve} |
| 193 |
\fakecscglyph{Iacute}{Iacute} |
| 194 |
\fakecscglyph{Icircumflex}{Icircumflex} |
| 195 |
\fakecscglyph{Idieresis}{Idieresis} |
| 196 |
\fakecscglyph{Idotaccent}{Idotaccent} |
| 197 |
\fakecscglyph{Igrave}{Igrave} |
| 198 |
\fakecscglyph{Lacute}{Lacute} |
| 199 |
\fakecscglyph{Lcaron}{Lcaron} |
| 200 |
\fakecscglyph{Nacute}{Nacute} |
| 201 |
\fakecscglyph{Ncaron}{Ncaron} |
| 202 |
\fakecscglyph{Ntilde}{Ntilde} |
| 203 |
\fakecscglyph{Oacute}{Oacute} |
| 204 |
\fakecscglyph{Ocircumflex}{Ocircumflex} |
| 205 |
\fakecscglyph{Odieresis}{Odieresis} |
| 206 |
\fakecscglyph{Ograve}{Ograve} |
| 207 |
\fakecscglyph{Ohungarumlaut}{Ohungarumlaut} |
| 208 |
\fakecscglyph{Otilde}{Otilde} |
| 209 |
\fakecscglyph{Racute}{Racute} |
| 210 |
\fakecscglyph{Rcaron}{Rcaron} |
| 211 |
\fakecscglyph{Sacute}{Sacute} |
| 212 |
\fakecscglyph{Scaron}{Scaron} |
| 213 |
\fakecscglyph{Scedilla}{Scedilla} |
| 214 |
\fakecscglyph{Tcaron}{Tcaron} |
| 215 |
\fakecscglyph{Tcedilla}{Tcedilla} |
| 216 |
\fakecscglyph{Uacute}{Uacute} |
| 217 |
\fakecscglyph{Ucircumflex}{Ucircumflex} |
| 218 |
\fakecscglyph{Udieresis}{Udieresis} |
| 219 |
\fakecscglyph{Ugrave}{Ugrave} |
| 220 |
\fakecscglyph{Uhungarumlaut}{Uhungarumlaut} |
| 221 |
\fakecscglyph{Uring}{Uring} |
| 222 |
\fakecscglyph{Yacute}{Yacute} |
| 223 |
\fakecscglyph{Ydieresis}{Ydieresis} |
| 224 |
\fakecscglyph{Zacute}{Zacute} |
| 225 |
\fakecscglyph{Zcaron}{Zcaron} |
| 226 |
\fakecscglyph{Zdotaccent}{Zdotaccent} |
| 227 |
|
| 228 |
|
| 229 |
\begincomment |
| 230 |
\section{Shrunk accents} |
| 231 |
\endcomment |
| 232 |
|
| 233 |
% A c&sc accent is created by moving a shrunk accent up by the |
| 234 |
% difference between a scaled x and a scaled X. |
| 235 |
|
| 236 |
\setcommand\cscaccent#1{ |
| 237 |
\moveup{\scale{\int{xheight}}{\sub{1000}{\int{smallcapsscale}}}} |
| 238 |
\cscglyph{#1} |
| 239 |
\moveup{\scale{\int{xheight}}{\sub{\int{smallcapsscale}}{1000}}} |
| 240 |
} |
| 241 |
\begincomment\medskip |
| 242 |
A \textbf{Shrunk accent} is a \textbf{Small glyph} whose vertical |
| 243 |
position has been adjusted so that the |
| 244 |
$\TypesetIntegerExpression{\int{xheight}}$ position of the original |
| 245 |
accent coincides with that of the shrunk accent. Without this |
| 246 |
adjustment, it would instead be the baselines that would coincide, |
| 247 |
but such an accent would be too low. The exact meaning of |
| 248 |
``\textbf{Shrunk accent} `\#1'\,'' is |
| 249 |
\begin{quotation}\cscaccent{\macroparameter{1}}\end{quotation} |
| 250 |
|
| 251 |
\resetcommand\cscaccent#1{% |
| 252 |
\Bheading{Shrunk accent} `\TypesetStringExpression{#1}'% |
| 253 |
} |
| 254 |
\endcomment |
| 255 |
|
| 256 |
|
| 257 |
\setglyph{Acutesmall} |
| 258 |
\cscaccent{Acute} |
| 259 |
\endsetglyph |
| 260 |
|
| 261 |
\setglyph{Gravesmall} |
| 262 |
\cscaccent{Grave} |
| 263 |
\endsetglyph |
| 264 |
|
| 265 |
\setglyph{Circumflexsmall} |
| 266 |
\cscaccent{Circumflex} |
| 267 |
\endsetglyph |
| 268 |
|
| 269 |
\setglyph{Tildesmall} |
| 270 |
\cscaccent{Tilde} |
| 271 |
\endsetglyph |
| 272 |
|
| 273 |
\setglyph{Dieresissmall} |
| 274 |
\cscaccent{Dieresis} |
| 275 |
\endsetglyph |
| 276 |
|
| 277 |
\setglyph{Brevesmall} |
| 278 |
\cscaccent{Breve} |
| 279 |
\endsetglyph |
| 280 |
|
| 281 |
\setglyph{Dotaccentsmall} |
| 282 |
\cscaccent{Dotaccent} |
| 283 |
\endsetglyph |
| 284 |
|
| 285 |
\setglyph{Caronsmall} |
| 286 |
\cscaccent{Caron} |
| 287 |
\endsetglyph |
| 288 |
|
| 289 |
\setglyph{Hungarumlautsmall} |
| 290 |
\cscaccent{Hungarumlaut} |
| 291 |
\endsetglyph |
| 292 |
|
| 293 |
\setglyph{Ringsmall} |
| 294 |
\cscaccent{Ring} |
| 295 |
\endsetglyph |
| 296 |
|
| 297 |
\setglyph{Macronsmall} |
| 298 |
\cscaccent{Macron} |
| 299 |
\endsetglyph |
| 300 |
|
| 301 |
\setglyph{Cedillasmall} |
| 302 |
\cscglyph{Cedilla} |
| 303 |
\endsetglyph |
| 304 |
|
| 305 |
\setglyph{Ogoneksmall} |
| 306 |
\cscglyph{Ogonek} |
| 307 |
\endsetglyph |
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
\endmetrics |
| 312 |
|
| 313 |
\section{Notes} |
| 314 |
|
| 315 |
An important, but rather obscure, difference between what is done by |
| 316 |
this file and what is done by the old \texttt{latin.mtx} concerns the |
| 317 |
manner in which the letters are spaced. In this file, spacing of |
| 318 |
smallcaps is consistently done using the \IEint{smallcapsextraspace} |
| 319 |
parameter, but \texttt{latin.mtx} only uses this mechanism in |
| 320 |
monowidth fonts. For proportional fonts, the default was instead to |
| 321 |
use the \IEint{letterspacing} parameter to space the entire |
| 322 |
font---the same amount for non-faked as for faked letters. |
| 323 |
|
| 324 |
|
| 325 |
\section{Changes} |
| 326 |
|
| 327 |
1999/10/25: Added \verb|\setglyphs| for \texttt{Macronsmall} and |
| 328 |
\texttt{macronsmall}. (LH) |
| 329 |
|
| 330 |
1999/10/25: Simplified definition of \verb|\unfakable|. (UV\&LH) |
| 331 |
Rationale: It is thoroughly confusing if the size of the black box |
| 332 |
created by \verb|\unfakable| depends on the metrics of an unencoded |
| 333 |
glyph that isn't accessible and therefore unavailable for all pratical |
| 334 |
purposes. |
| 335 |
|
| 336 |
2000/10/20: File split off from \texttt{latin.mtx}. |
| 337 |
|
| 338 |
2003/01/02--05: File heavily reorganised. (LH) |
| 339 |
|
| 340 |
2005/04/15: Removed section on \emph{Miscellaneous glyphs}, since |
| 341 |
that should be handled by \texttt{lsmisc.mtx}, and moreover prevented |
| 342 |
the code there from working correctly. (LH) Thanks to Michael Zedler |
| 343 |
for drawing my attention to this error. |
| 344 |
|
| 345 |
|
| 346 |
\end{document} |
| 347 |
|
| 348 |
% Copyright 1993, 1994, 1995, 1996 Alan Jeffrey, |
| 349 |
% hacked and maintained 1997, 1998 Sebastian Rahtz, |
| 350 |
% copyright 1998, 1999 the fontinst maintenance team and any individual |
| 351 |
% authors listed elsewhere in this file. All rights reserved. |
| 352 |
% |
| 353 |
% This file is part of the fontinst system version 1.9. |
| 354 |
% ----------------------------------------------------- |
| 355 |
% |
| 356 |
% It may be distributed under the terms of the LaTeX Project Public |
| 357 |
% License, as described in lppl.txt in the base LaTeX distribution. |
| 358 |
% Either version 1.0 or, at your option, any later version. |
| 359 |
% |