From 0cd28a83f858291b8e2421c64e44d7759e5b7f1b Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Wed, 24 Oct 2007 23:59:07 +0000
Subject: new latex package anyfontsize (3feb07)

git-svn-id: svn://tug.org/texlive/trunk@5272 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/anyfontsize/anyfontsize.sty          | 109 +++++++++++++++++++++
 1 file changed, 109 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/anyfontsize/anyfontsize.sty

(limited to 'Master/texmf-dist/tex/latex/anyfontsize/anyfontsize.sty')

diff --git a/Master/texmf-dist/tex/latex/anyfontsize/anyfontsize.sty b/Master/texmf-dist/tex/latex/anyfontsize/anyfontsize.sty
new file mode 100644
index 00000000000..de5815136c9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/anyfontsize/anyfontsize.sty
@@ -0,0 +1,109 @@
+%
+% anyfontsize.sty -- allow font size substitutions
+% by Péter Szabó <pts@fazekas.hu> at Sat Feb  3 13:56:49 CET 2007
+%
+% anyfontsize.sty is a LaTeX2e package that lets the user select any font
+% size (via e.g. \fontsize{...}{...}\selectfont), even those sizes that are
+% not listed in the .fd file. If such a size is requested, LaTeX will search
+% the nearest listed size, and anyfontsize.sty will scale that font to the
+% requested size. For a similar functionality that works only for the CM
+% fonts, try the type1cm.sty package, or, even better, use the new Latin
+% Modern (LM) fonts, which are available at any size.
+%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%    http://www.latex-project.org/lppl.txt
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%
+%
+% For PostScript Type1 fonts (such as Times (with times.sty) or Latin Modern
+% (with lmodern.sty)), you usually don't need anyfontsize.sty, because these
+% fonts are available at all sizes.
+%
+% anyfontsize.sty doesn't work well with pdfLaTeX + the EC fonts (because
+% pdfTeX won't regenarate missing PK fonts for you). Compile the document
+% with latex(1) first (which will regenarte the missing PK fonts), and after
+% that you can use pdflatex(1).
+%
+% Test with this document:
+%
+%   \documentclass{article}
+%   \usepackage{anyfontsize}
+%   \usepackage{t1enc}
+%   %\input t1cmr.fd
+%   %\DeclareFontFamily{T1}{cmr}{}
+%   %\DeclareFontShape{T1}{cmr}{m}{n}{<10>ecrm1000}{}
+%   \begin{document}
+%   \fontsize{23}{28}\selectfont foo
+%   \end{document}
+%
+% vvv Dat: test with:
+%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{anyfontsize}[2006/02/04 anyfontsize.sty by pts]
+
+%** Don't warn on font substitutions made.
+\def\fontsubfuzz{9999pt}
+
+% vvv Dat: only for testing
+%\input t1cmr.fd
+%\DeclareFontFamily{T1}{cmr}{}
+%\DeclareFontShape{T1}{cmr}{m}{n}{<10>ecrm1000}{}
+
+%** Overrides \externalfont by specifying the ` at <requested-fontsize>pt'
+%** clause. The requested font size is in \f@user@size.
+\def\anyfontsize@set#1 #2\hfuzz{
+  \@tempdimb=\f@user@size\p@
+  \edef\external@font{#1 at\the\@tempdimb}%
+}%
+
+%** Overrides definition in latex.ltx
+%** See %%%% pts %%%% for the overridden part.
+\gdef\tryif@simple#1-#2\tryif@simple{%
+  \let \reserved@f \try@simples
+  \if>#2%
+    \dimen@ #1\p@
+    \ifdim \dimen@<\@M\p@
+      \ifdim \f@size\p@<\dimen@
+        \@tempdimc \dimen@     
+        \advance\@tempdimc -\f@size\p@
+      \else                           
+        \@tempdimc \f@size\p@
+        \advance\@tempdimc -\dimen@
+      \fi                          
+      \ifdim \@tempdimc<\@tempdimb
+        \@tempdimb \@tempdimc     
+        \def \best@size{#1}% 
+      \fi                   
+    \else
+  \ifx \external@font\@empty
+    \ifx \best@size\@empty  
+    \else                 
+      \ifdim \@tempdimb>\font@submax \relax
+        \xdef \font@submax {\the\@tempdimb}%
+      \fi                                   
+      \let \f@user@size \f@size
+      \let \f@size \best@size  
+      \ifdim \@tempdimb>\fontsubfuzz\relax
+        \@font@warning{Font\space shape\space
+            `\curr@fontshape'\space in\space size\space
+             <\f@user@size>\space not\space available\MessageBreak
+             size\space <\f@size>\space substituted}%             
+      \fi                                            
+      \try@simple@size
+      %
+      %%%% pts %%%%
+      \expandafter\anyfontsize@set\external@font\hfuzz
+      %      
+      \do@subst@correction
+    \fi                   
+ \fi
+      \let \reserved@f \remove@to@nnil
+    \fi                               
+  \fi
+  \reserved@f}
+
+\endinput
-- 
cgit v1.2.3

