| 1 |
% Copyright 1993, 1994, 1995, 1996 Alan Jeffrey, |
| 2 |
% hacked and maintained 1997, 1998 Sebastian Rahtz, |
| 3 |
% copyright 1998, 1999 the fontinst maintenance team and any individual |
| 4 |
% authors listed elsewhere in this file. All rights reserved. |
| 5 |
% |
| 6 |
% This file is part of the fontinst system version 1.9. |
| 7 |
% ----------------------------------------------------- |
| 8 |
% |
| 9 |
% It may be distributed under the terms of the LaTeX Project Public |
| 10 |
% License, as described in lppl.txt in the base LaTeX distribution. |
| 11 |
% Either version 1.0 or, at your option, any later version. |
| 12 |
% |
| 13 |
%%% ==================================================================== |
| 14 |
%%% @TeX-font-metrics-file{ |
| 15 |
%%% author = "Alan Jeffrey and Ulrik Vieth", |
| 16 |
%%% version = "1.915", |
| 17 |
%%% date = "2003-03-29", |
| 18 |
%%% time = "16:07:18 +01:00", |
| 19 |
%%% filename = "ltcmds.mtx", |
| 20 |
%%% email = "[email protected]", |
| 21 |
%%% URL = "http://www.tug.org/applications/fontinst/", |
| 22 |
%%% checksum = "", |
| 23 |
%%% codetable = "ISO/ASCII", |
| 24 |
%%% keywords = "metrics, TeX, PostScript", |
| 25 |
%%% supported = "yes", |
| 26 |
%%% abstract = "This is a font metrics file, for use with the |
| 27 |
%%% fontinst utility. It provides the defaults |
| 28 |
%%% used to install the Latin glyphs.", |
| 29 |
%%% package = "fontinst", |
| 30 |
%%% dependencies = "fontinst.sty, fontdoc.sty", |
| 31 |
%%% } |
| 32 |
%%% ==================================================================== |
| 33 |
|
| 34 |
\relax |
| 35 |
|
| 36 |
\documentclass[twocolumn]{article} |
| 37 |
\usepackage{fontdoc}[1999/11/04] |
| 38 |
|
| 39 |
\title{The file \texttt{ltcmds.mtx}} |
| 40 |
\author{Alan Jeffrey\and Ulrik Vieth\and Lars Hellstr\"om} |
| 41 |
\date{20 October 2000\\Version 1.915} |
| 42 |
|
| 43 |
\showbranches |
| 44 |
|
| 45 |
\begin{document} |
| 46 |
\maketitle |
| 47 |
|
| 48 |
\metrics |
| 49 |
|
| 50 |
\needsfontinstversion{1.917} |
| 51 |
\ProvidesMtxPackage{ltcmds} |
| 52 |
|
| 53 |
\begincomment |
| 54 |
\section{Some commands for making latin glyphs} |
| 55 |
|
| 56 |
\endcomment |
| 57 |
|
| 58 |
% \unfakable is a glyph which can't be faked. |
| 59 |
\setcommand\unfakable#1{ |
| 60 |
\setglyph{#1} |
| 61 |
\glyphrule{\int{xheight}}{\int{xheight}} |
| 62 |
\glyphwarning{missing glyph `#1'} |
| 63 |
\endsetglyph |
| 64 |
} |
| 65 |
\begincomment\medskip |
| 66 |
An \textbf{Unfakable} is a glyph which can't be faked. An |
| 67 |
``\textbf{Unfakable `\#1'}\,'' is equivalent to |
| 68 |
\begin{quotation}\unfakable{\macroparameter{1}}\end{quotation} |
| 69 |
|
| 70 |
\resetcommand\unfakable#1{% |
| 71 |
\Aheading{Unfakable `\TypesetStringExpression{#1}'}% |
| 72 |
} |
| 73 |
\endcomment |
| 74 |
|
| 75 |
|
| 76 |
\setcommand\topaccent#1#2#3{ |
| 77 |
\push |
| 78 |
\moveup{\max{0}{\sub{\height{#1}}{\int{xheight}}}} |
| 79 |
\movert{\add{\sub{\scale{\width{#1}}{#3}}{\half{\width{#2}}}} |
| 80 |
{\scale{\sub{\height{#1}}{\int{xheight}}}{\int{italicslant}}}} |
| 81 |
\glyph{#2}{1000} |
| 82 |
\pop |
| 83 |
\glyph{#1}{1000} |
| 84 |
} |
| 85 |
\begincomment\medskip |
| 86 |
A \textbf{Top accent} is built by placing the center of the accent at |
| 87 |
the given position along the width of the letter, raised up by the |
| 88 |
difference between the height of the letter and the xheight. This is |
| 89 |
the algorithm used by the \TeX\ \verb|\accent| primitive. |
| 90 |
A ``\textbf{Top accent} `\#1' with `\#2' at \#3'' is equivalent to |
| 91 |
\begin{quotation} |
| 92 |
\topaccent{\macroparameter{1}}{\macroparameter{2}}{\macroparameter{3}} |
| 93 |
\end{quotation} |
| 94 |
\resetcommand\topaccent#1#2#3{% |
| 95 |
\Bheading{Top accent} `\TypesetStringExpression{#1}' with |
| 96 |
`\TypesetStringExpression{#2}' at $\TypesetIntegerExpression{#3}$% |
| 97 |
} |
| 98 |
\endcomment |
| 99 |
|
| 100 |
|
| 101 |
\setcommand\topaccentas#1#2#3#4{ |
| 102 |
\push |
| 103 |
\moveup{\sub{\height{#4}}{\height{#2}}} |
| 104 |
\movert{\add{ |
| 105 |
\sub{\scale{\width{#1}}{#3}}{\half{\width{#2}}} |
| 106 |
}{ |
| 107 |
\scale{\sub{\height{#4}}{\height{#2}}}{\int{italicslant}} |
| 108 |
}} |
| 109 |
\glyph{#2}{1000} |
| 110 |
\pop |
| 111 |
\glyph{#1}{1000} |
| 112 |
} |
| 113 |
\begincomment\medskip |
| 114 |
A \textbf{Top accent \dots\ as} is built by placing the center of the |
| 115 |
accent at the given position along the width of the letter, raised up |
| 116 |
by the difference between the height of the accent and the height of |
| 117 |
the model glyph. A ``\textbf{Top accent} `\#1' with `\#2' at \#3 as |
| 118 |
\#4'' is equivalent to |
| 119 |
\begin{quotation} |
| 120 |
\topaccentas{\macroparameter{1}}{\macroparameter{2}} |
| 121 |
{\macroparameter{3}}{\macroparameter{4}} |
| 122 |
\end{quotation} |
| 123 |
\resetcommand\topaccentas#1#2#3#4{% |
| 124 |
\Bheading{Top accent} `\TypesetStringExpression{#1}' with |
| 125 |
`\TypesetStringExpression{#2}' at $\TypesetIntegerExpression{#3}$ |
| 126 |
as `\TypesetStringExpression{#4}'% |
| 127 |
} |
| 128 |
\endcomment |
| 129 |
|
| 130 |
|
| 131 |
\setcommand\botaccent#1#2#3{ |
| 132 |
\push |
| 133 |
\movert{\sub{\scale{\width{#1}}{#3}}{\half{\width{#2}}}} |
| 134 |
\glyph{#2}{1000} |
| 135 |
\pop |
| 136 |
\glyph{#1}{1000} |
| 137 |
} |
| 138 |
\begincomment\medskip |
| 139 |
A \textbf{Bottom accent} is built by placing the center of the accent at |
| 140 |
the given position along the width of the letter. A ``\textbf{Bottom |
| 141 |
accent} `\#1' with `\#2' at \#3'' is equivalent to |
| 142 |
\begin{quotation} |
| 143 |
\botaccent{\macroparameter{1}}{\macroparameter{2}}{\macroparameter{3}} |
| 144 |
\end{quotation} |
| 145 |
\resetcommand\botaccent#1#2#3{% |
| 146 |
\Bheading{Bottom accent} `\TypesetStringExpression{#1}' with |
| 147 |
`\TypesetStringExpression{#2}' at $\TypesetIntegerExpression{#3}$% |
| 148 |
} |
| 149 |
\endcomment |
| 150 |
|
| 151 |
|
| 152 |
\setcommand\unfakabletopaccent#1{ |
| 153 |
\setglyph{#1} |
| 154 |
\moveup{\add{\int{xheight}}{50}} |
| 155 |
\glyphrule{\half{\int{xheight}}}{\half{\int{xheight}}} |
| 156 |
\glyphwarning{missing glyph `#1'} |
| 157 |
\moveup{\neg{\add{\int{xheight}}{50}}} |
| 158 |
\endsetglyph |
| 159 |
} |
| 160 |
\begincomment\medskip |
| 161 |
An \textbf{Unfakable top accent} is the same as an |
| 162 |
\textbf{Unfakable}, except that the rule is smaller and has a more |
| 163 |
accent-like position. An ``\textbf{Unfakable top accent `\#1'}\,'' |
| 164 |
is equivalent to |
| 165 |
\begin{quotation}\unfakabletopaccent{\macroparameter{1}}\end{quotation} |
| 166 |
|
| 167 |
\resetcommand\unfakabletopaccent#1{% |
| 168 |
\Aheading{Unfakable top accent `\TypesetStringExpression{#1}'}% |
| 169 |
} |
| 170 |
\endcomment |
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
% A c&sc top accent glyph is placed using the small glyphs if |
| 175 |
% available, and otherwise by shrinking the equivalent capital. |
| 176 |
|
| 177 |
\setcommand\csctopaccent#1#2#3{ |
| 178 |
% \ifareglyphs{#1small,#2small}\then |
| 179 |
% \topaccent{#1small}{#2small}{#3} |
| 180 |
% \Else |
| 181 |
\cscglyph{#1#2} |
| 182 |
% \Fi |
| 183 |
} |
| 184 |
|
| 185 |
% A c&sc bot accent glyph is placed using the small glyphs if |
| 186 |
% available, and otherwise by shrinking the equivalent capital. |
| 187 |
|
| 188 |
\setcommand\cscbotaccent#1#2#3{ |
| 189 |
% \ifisglyph{#1small}\then |
| 190 |
% \botaccent{#1small}{#2small}{#3} |
| 191 |
% \Else |
| 192 |
\cscglyph{#1#2} |
| 193 |
% \Fi |
| 194 |
} |
| 195 |
|
| 196 |
% A c&sc accent is created by moving a shrunk accent up by the |
| 197 |
% difference between a scaled x and a scaled X. |
| 198 |
|
| 199 |
\setcommand\cscaccent#1{ |
| 200 |
\moveup{\scale{\int{xheight}}{\sub{1000}{\int{smallcapsscale}}}} |
| 201 |
\cscglyph{#1} |
| 202 |
\moveup{\scale{\int{xheight}}{\sub{\int{smallcapsscale}}{1000}}} |
| 203 |
} |
| 204 |
|
| 205 |
|
| 206 |
\begincomment |
| 207 |
\section{Default values} |
| 208 |
\endcomment |
| 209 |
|
| 210 |
\setint{italicslant}{0} |
| 211 |
|
| 212 |
\ifisglyph{x}\then |
| 213 |
\setint{xheight}{\height{x}} |
| 214 |
\Else |
| 215 |
\setint{xheight}{500} |
| 216 |
\Fi |
| 217 |
|
| 218 |
\ifisglyph{A}\then |
| 219 |
\setint{capheight}{\height{A}} |
| 220 |
\comment{\texttt{t1.etx} has traditionally measured the capheight |
| 221 |
on \texttt{X}, whereas \texttt{latin.mtx} measured it on |
| 222 |
\texttt{A}. There is probably no good reason for this |
| 223 |
difference.} |
| 224 |
\Else\ifisglyph{X}\then |
| 225 |
\setint{capheight}{\height{X}} |
| 226 |
\Else |
| 227 |
\setint{capheight}{750} |
| 228 |
\Fi\Fi |
| 229 |
|
| 230 |
\ifisglyph{d}\then |
| 231 |
\setint{ascender}{\height{d}} |
| 232 |
\Else |
| 233 |
\setint{ascender}{\int{capheight}} |
| 234 |
\Fi |
| 235 |
|
| 236 |
\ifisint{descender_neg}\then |
| 237 |
\setint{descender}{\neg{\int{descender_neg}}} |
| 238 |
\Else\ifisglyph{g}\then |
| 239 |
\setint{descender}{\depth{g}} |
| 240 |
\comment{Similarly, \texttt{t1.etx} has traditionally measured |
| 241 |
the descender depth on \texttt{p}, whereas \texttt{latin.mtx} |
| 242 |
measured it on \texttt{g}.} |
| 243 |
\Else\ifisglyph{p}\then |
| 244 |
\setint{descender}{\depth{p}} |
| 245 |
\Else |
| 246 |
\setint{descender}{250} |
| 247 |
\Fi\Fi\Fi |
| 248 |
|
| 249 |
\setint{underlinethickness}{40} |
| 250 |
\setint{visiblespacedepth}{200} |
| 251 |
\setint{visiblespacewidth}{400} |
| 252 |
\setint{visiblespacesurround}{50} |
| 253 |
|
| 254 |
|
| 255 |
\ifisglyph{parenleft}\then |
| 256 |
\setint{vaxis}{\half{\sub{\height{parenleft}}{\depth{parenleft}}}} |
| 257 |
\Else |
| 258 |
\setint{vaxis}{\half{\int{xheight}}} |
| 259 |
\Fi |
| 260 |
|
| 261 |
|
| 262 |
\endmetrics |
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
\section{Changes} |
| 269 |
|
| 270 |
1999/10/25: Added \verb|\setglyphs| for \texttt{Macronsmall} and |
| 271 |
\texttt{macronsmall}. (LH) |
| 272 |
|
| 273 |
1999/10/25: Simplified definition of \verb|\unfakable|. (UV\&LH) |
| 274 |
Rationale: It is thoroughly confusing if the size of the black box |
| 275 |
created by \verb|\unfakable| depends on the metrics of an unencoded |
| 276 |
glyph that isn't accessible and therefore unavailable for all pratical |
| 277 |
purposes. |
| 278 |
|
| 279 |
2000/10/20--2003/03/15: File split off from \texttt{latin.mtx} and |
| 280 |
reorganised into a separate package. (LH) (It took until the last of |
| 281 |
these dates before all the useless code had been removed.) Also made |
| 282 |
special typeset definitions of many commands and modernized the |
| 283 |
conditionals. |
| 284 |
|
| 285 |
2003/03/15: Made the \verb|\unfakable| a square with side |
| 286 |
$\TypesetIntegerExpression{\int{xheight}}$ and added the |
| 287 |
\verb|\unfakabletopaccent| command. (LH) Rationale: That the glyph is |
| 288 |
unavailable doesn't mean the rule replacing it has to look bad. This |
| 289 |
should make them blend in better with any glyphs that are actually |
| 290 |
available. |
| 291 |
|
| 292 |
2003/03/15: Added \verb|\topaccentas|. (LH) It is based on a command |
| 293 |
|\idotaccent| defined by Walter Schmidt. |
| 294 |
|
| 295 |
2003/03/15: Added calculation of a vertical symmetry axis position |
| 296 |
$\TypesetIntegerExpression{\int{vaxis}}$. (LH) It is based on some |
| 297 |
code by Walter Schmidt. |
| 298 |
|
| 299 |
2004/08/07: Fixed typo in vertical symmetry axis code. (LH) |
| 300 |
|
| 301 |
2005/05/21: Moved default for |
| 302 |
$\TypesetIntegerExpression{\int{capspacing}}$ to \texttt{lubuild.mtx}, |
| 303 |
which is where it is used. (LH) |
| 304 |
|
| 305 |
\end{document} |