Debian Codegraph @

texmf-dist/tex/latex/carlisle/scalefnt.sty

raw
1
2 % scalefnt package
3 %%%%%%%%%%%%%%%%%%
4
5 % Copyright 1997 David carlisle
6 % This file may be distributed under the terms of the LPPL.
7 % See 00readme.txt for details.
8
9 % 1997/09/28 David Carlisle
10
11 % This package defines a command \scalefont. After \scalefont{.75} then
12 % the current font and baselineskip will be scaled to 75% of their
13 % original size. Any scale factor may be specified.
14
15 % If you are using traditional fd files based on bitmap font sizes,
16 % LaTeX's font system will round the requested font size to the nearest
17 % available size. If you are using scalable fonts, such as the psnfss
18 % or type1cm packages, then the requested font size will be used exactly.
19
20 % Almost all of the code here is in fact dealing with scaling the stretch
21 % components of \baselineskip. This is a bit odd as 99% of documents
22 % have a rigid \baselineskip, however the technique may be useful in
23 % some contexts, and is left here as an example.
24
25 \DeclareRobustCommand\scalefont[1]{%
26 \dimen@\z@
27 \dimen@ii\z@
28 \afterassignment\@scalefont
29 \@tempdima\the\baselineskip\relax\relax\relax\relax\relax
30 \skip@#1\@tempdima\@plus#1\dimen@\@minus#1\dimen@ii
31 \dimen@\f@size\p@
32 \dimen@#1\dimen@
33 \fontsize\dimen@\skip@\selectfont}
34
35 \def\@scalefont#1#2#3#4#5{%
36 \if#1p%
37 \afterassignment\@scalefont\dimen@#5%
38 \else
39 \if#1m%
40 \dimen@ii
41 \fi
42 \fi}
43
44