summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/fonttable
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-10 21:58:06 +0000
committerKarl Berry <karl@freefriends.org>2009-05-10 21:58:06 +0000
commit8956ff521f3227536e76de150056dd26ceeb54d4 (patch)
treeafa65286671f1268f7aafcab67a2b8c532813fc5 /Master/texmf-dist/source/latex/fonttable
parent37a6e807d549f9d4c23f446951a303c89cf6373b (diff)
fonttable 1.4 (9may09)
git-svn-id: svn://tug.org/texlive/trunk@13033 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fonttable')
-rw-r--r--Master/texmf-dist/source/latex/fonttable/fonttable.dtx93
1 files changed, 86 insertions, 7 deletions
diff --git a/Master/texmf-dist/source/latex/fonttable/fonttable.dtx b/Master/texmf-dist/source/latex/fonttable/fonttable.dtx
index a4cc3b5a187..60d50113134 100644
--- a/Master/texmf-dist/source/latex/fonttable/fonttable.dtx
+++ b/Master/texmf-dist/source/latex/fonttable/fonttable.dtx
@@ -55,7 +55,7 @@
%
% \fi
%
-% \CheckSum{640}
+% \CheckSum{659}
%
% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
% \DoNotIndex{\@centercr,\@cite}
@@ -103,12 +103,14 @@
% \changes{v1.1}{2006/10/02}{Minor extensions}
% \changes{v1.2}{2006/10/02}{Minor extensions of texts}
% \changes{v1.3}{2009/04/30}{Fix serious bug}
+% \changes{v1.4}{2009/05/06}{Added another way to select a font}
%
% \def\fileversion{v1.0} \def\filedate{2005/11/27}
% \def\fileversion{v1.0a} \def\filedate{2005/12/06}
% \def\fileversion{v1.1} \def\filedate{2006/10/02}
% \def\fileversion{v1.2} \def\filedate{2008/05/08}
% \def\fileversion{v1.3} \def\filedate{2009/04/30}
+% \def\fileversion{v1.4} \def\filedate{2009/05/06}
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
@@ -149,9 +151,54 @@
% a given font and to typeset an example of regular text.
%
% \DescribeMacro{\fonttable}
-% The command \cs{fonttable}\marg{testfont} typesets a table showing all the
-% glyphs in the \meta{testfont}, where \meta{testfont} is the name of a font
-% like \texttt{cmr10}.
+% The command \\
+% \cs{fonttable}\marg{testfont} \\
+% typesets a table showing all the
+% glyphs in the \meta{testfont}, where \meta{testfont} is the name of a
+% font file\footnote{More precisely, the name of a \texttt{.tfm} file.}
+% like \texttt{cmr10} (for Computer Modern Roman) or \texttt{pzdr}
+% (for Zapf Dingbats).
+%
+% \DescribeMacro{\xfonttable}
+% The command \\
+% \cs{xfonttable}\marg{encoding}\marg{family}\marg{series}\marg{shape} \\
+% typesets a table showing all the
+% glyphs in the font with encoding \meta{encoding} (e.g., T1 or OMS),
+% family \meta{family} (e.g., \texttt{ppl} for Palatino or \texttt{cmbrs}
+% for CM Bright Math (OMS)), font series \meta{series} (e.g., \texttt{sb}
+% for semibold of \texttt{m} for medium), and font shape \meta{shape}
+% (e.g., \texttt{n} for normal or \texttt{sc} for small caps).
+% For example: \\
+% \verb?\xfonttable{U}{pzd}{m}{n}? \\
+% for Zapf Dingbats.
+%
+% \DescribeMacro{\pikfont}
+% The command\footnote{The name was chosen in an attempt to avoid
+% clashes with other macros that might perform similar functions.} \\
+% \cs{pikfont}\marg{encoding}\marg{family}\marg{series}\marg{shape} \\
+% selects the font with encoding \meta{encoding} (e.g., T1 or OMS),
+% family \meta{family} (e.g., \texttt{ppl} for Palatino or \texttt{cmbrs}
+% for CM Bright Math (OMS)), font series \meta{series} (e.g., \texttt{sb}
+% for semibold of \texttt{m} for medium), and font shape \meta{shape}
+% (e.g., \texttt{n} for normal or \texttt{sc} for small caps).
+% For example: \\
+% \verb?\pikfont{T1}{ppl}{m}{sc}? \\
+% for Palatino small caps.
+% The size of the font corresponds to the current setting (e.g.,
+% \cs{footnotesize}, \cs{normalsize}, \cs{Large}). It can also be
+% changed after being selected by the incantation \\
+% \cs{fontsize}\marg{size}\marg{baselineskip}\cs{selectfont} \\
+% where \meta{size} is the normal height and \meta{baselineskip} is the
+% distance between text lines; the measurement system is \texttt{pts}
+% but just use numbers with no units specified. For example: \\
+% \verb?\fontsize{12}{15}\selectfont? \\
+% for a 12pt font with 15pts between baselines.
+%
+% If you are unsure about the meaning of the various arguments
+% of \cs{xfonttable} and \cs{pikfont} see
+% \textit{The Companion}~\cite[Chapter 7]{COMPANION} or the
+% \textit{LaTeX2e font selection} manual (\texttt{fntguide.tex}; try
+% \verb?texdoc fntguide?).
%
% \DescribeMacro{\fontrange}
% The package attempts to populate the table with a maximum of 256 glyphs,
@@ -205,14 +252,16 @@
%
% \DescribeMacro{\regulartext}
% The command \cs{regulartext}\marg{fontspec} typesets the example text
-% using \meta{fontspec}, for example \verb?\rmfamily\itshape?.
+% using \meta{fontspec}, for example \verb?\rmfamily\itshape?
+% or \verb?\pikfont{T1}{pnc}{m}{it}?.
%
% \DescribeMacro{\fonttexts}
% \DescribeMacro{\regulartexts}
% The macro \cs{fonttexts}\marg{testfont}\marg{text} typesets \meta{text} using
% the \meta{testfont} (e.g \texttt{cmr10}). Similarly the macro
% \cs{regulartexts}\marg{fontspec}\marg{text} typesets \meta{text}
-% using \meta{fontspec} (e.g., \verb?\rmfamily\itshape?).
+% using \meta{fontspec} (e.g., \verb?\rmfamily\itshape? or
+% \verb?\pikfont{T1}{ppl}{m}{it}?).
%
% \DescribeMacro{\germantext}
% \DescribeMacro{\latintext}
@@ -270,7 +319,7 @@
% \begin{macrocode}
%<*pack>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fonttable}[2009/04/30 v1.3 displays a font]
+\ProvidesPackage{fonttable}[2009/05/06 v1.4 displays a font]
% \end{macrocode}
%
@@ -309,6 +358,36 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\pikfont}
+% \cs{pikfont}\marg{encoding}\marg{family}\marg{series}\marg{shape}
+% selects the font with \meta{encoding},
+% \meta{family}, \meta{series} and \meta{shape}.
+% \changes{v1.4}{2009/05/06}{Added \cs{pikfont}}
+% \begin{macrocode}
+\DeclareRobustCommand{\pikfont}[4]{%
+ \fontencoding{#1}\fontfamily{#2}\fontseries{#3}\fontshape{#4}\selectfont}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\xfonttable}
+% \cs{xfonttable}\marg{encoding}\marg{family}\marg{series}\marg{shape}
+% typesets a table of all the glyphs in the font with \meta{encoding},
+% \meta{family}, \meta{series} and \meta{shape}
+% (e.g., \verb?\xfonttable{T1}{pnc}{m}{it}? for New Century Schoolbook italic).
+% The original code for the macro was supplied by Enrico Gregorio.
+% \changes{v1.4}{2009/05/06}{Added \cs{xfonttable}}
+% \begin{macrocode}
+\newcommand*{\xfonttable}[4]{\bgroup
+ \pikfont{#1}{#2}{#3}{#4}%
+ \edef\f@tfontname{\fontname\font}\normalfont
+ \f@tstartfont
+ \ftable
+ \egroup}
+
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\f@tstartfont}
% Sets up for a font table.
% \begin{macrocode}