summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fonttable
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-13 23:36:18 +0000
committerKarl Berry <karl@freefriends.org>2011-02-13 23:36:18 +0000
commitc7e46de6460a5f1a70081a27033654c5e0b8ec22 (patch)
tree690026068852ef405790d99ff72504ea15e6f0c5 /Master/texmf-dist/tex/latex/fonttable
parent694f30a239c1e636b21e6ec9f11746c98c8ac3cf (diff)
fonttable (13feb11)
git-svn-id: svn://tug.org/texlive/trunk@21399 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fonttable')
-rw-r--r--Master/texmf-dist/tex/latex/fonttable/fonttable.sty48
1 files changed, 33 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/fonttable/fonttable.sty b/Master/texmf-dist/tex/latex/fonttable/fonttable.sty
index e1e5cd8a85b..6c2ede06a20 100644
--- a/Master/texmf-dist/tex/latex/fonttable/fonttable.sty
+++ b/Master/texmf-dist/tex/latex/fonttable/fonttable.sty
@@ -21,8 +21,8 @@
%% This work consists of the files listed in the README file.
%% ------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fonttable}[2009/10/15 v1.6 displays a font]
-
+\ProvidesPackage{fonttable}
+ [2011/02/13 v1.6b displays a font]
\providecommand*{\sevenrm}{\fontsize{7}{9pt}\rmfamily}
\newcount\f@tm \newcount\f@tn \newcount\f@tp \newdimen\f@tdim
@@ -36,21 +36,39 @@
\DeclareRobustCommand{\pikfont}[4]{%
\fontencoding{#1}\fontfamily{#2}\fontseries{#3}\fontshape{#4}\selectfont}
-\newcommand*{\xfonttable}[4]{\bgroup
- \pikfont{#1}{#2}{#3}{#4}%
- \edef\f@tfontname{\fontname\font}\normalfont
- \f@tstartfont
- \ftable
- \egroup}
-
-\newcommand*{\f@tstartfont}{\font\f@ttestfont=\f@tfontname
+\newcommand*{\xfonttable}[4]{%
+ \begingroup
+ \pikfont{#1}{#2}{#3}{#4}%
+ \edef\f@tfontname{\fontname\font}%
+ \edef\@tempa{\string a\string t}%
+ \edef\@tempb{\noexpand\in@{\@tempa}{\f@tfontname}}%
+ \@tempb
+ \ifin@
+ \edef\f@tfontname{\expandafter\f@tstripsize\f@tfontname}%
+ \fi
+ \normalfont
+ \f@tstartfont
+ \ftable
+ \endgroup
+}
+\edef\@tempa{%
+ \def\noexpand\f@tstripsize
+ ##1\string a\string t##2\string p\string t{##1}%
+}
+\@tempa
+\newcommand*{\f@tstartfont}{%
+ \@tempdima=\f@size pt
+ \font\f@ttestfont=\f@tfontname\space at 0.9999\@tempdima\relax
\f@ttestfont \f@tsetbaselineskip
- \ifdim\fontdimen6\f@ttestfont<10pt \rightskip=0pt plus 20pt
- \else\rightskip=0pt plus 2em \fi
+ \ifdim\fontdimen6\f@ttestfont<10pt\relax
+ \rightskip=0pt plus 20pt\relax
+ \else
+ \rightskip=0pt plus 2em\relax
+ \fi
\spaceskip=\fontdimen2\f@ttestfont % space between words (\raggedright)
- \xspaceskip=\fontdimen2\f@ttestfont \advance\xspaceskip
- by\fontdimen7\f@ttestfont}
-
+ \xspaceskip=\fontdimen2\f@ttestfont
+ \advance\xspaceskip by\fontdimen7\f@ttestfont
+}
\newcommand*{\f@tsetbaselineskip}{\setbox0=\hbox{\f@tn=0
\loop\char\f@tn \ifnum \f@tn<255 \advance\f@tn 1 \repeat}
\baselineskip=6pt \advance\baselineskip\ht0 \advance\baselineskip\dp0 }