summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-11-03 23:43:54 +0000
committerKarl Berry <karl@freefriends.org>2013-11-03 23:43:54 +0000
commit60d9684691aa95d10a1e12b07b703ccede3f1d9d (patch)
treec06435c6c0ba53a2e297276e77bd2fa31eeb3495
parent1b5f64659e7d32557186d87f525ed3087ee6734b (diff)
substitutefont
git-svn-id: svn://tug.org/texlive/trunk@32052 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/README17
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/README.html20
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.pdfbin111330 -> 152096 bytes
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.tex76
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.pdfbin79287 -> 265285 bytes
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.tex65
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.pdfbin323210 -> 281887 bytes
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.tex29
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.pdfbin0 -> 390694 bytes
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.tex (renamed from Master/texmf-dist/doc/latex/substitutefont/greek-times-bodoni.tex)9
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/greek-times-bodoni.pdfbin374934 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.txt77
12 files changed, 151 insertions, 142 deletions
diff --git a/Master/texmf-dist/doc/latex/substitutefont/README b/Master/texmf-dist/doc/latex/substitutefont/README
index 8229f87484a..588b16a3533 100644
--- a/Master/texmf-dist/doc/latex/substitutefont/README
+++ b/Master/texmf-dist/doc/latex/substitutefont/README
@@ -1,7 +1,7 @@
Combine font families
*********************
-:Date: Last revised 2012-07-05
+:Date: Last revised 2013-10-28
:Copyright: © 2011 Günter Milde <milde@users.sf.net>
:Contributor: Special thanks to Ulrike Fischer who provided
the indirect definition with active ``\nfss@catcodes``.
@@ -19,23 +19,30 @@ or the creators preference.
The `substitutefont` package facilitates the task to set up a font
family as substitute for another one in a specified font encoding.
+News:
+ 2013-10-28 Documentation/Test update.
+
Example:
Palatino with the standard package `mathpazo` for Latin and
`GFS Didot`_ for Greek::
\usepackage[sc,slantedGreek]{mathpazo}
+ \usepackage{substitutefont}
\substitutefont{LGR}{pplx}{udidot}
Source
`<substitutefont.sty>`_, `<substitutefont.sty.html>`__
-Tests
- * Palatino wiht Greek from `GFS Didot`_:
+Tests/Examples
+ * Palatino with Greek from `GFS Didot`_:
`<greek-palatino-didot.tex>`__, `<greek-palatino-didot.pdf>`__
+ * Times (newtx) with GFS Artemisia, GFS Neohellenic, and CB:
+ `<greek-times-bodoni.tex>`__, `<greek-times-bodoni.pdf>`__
* Latin Modern with Cyrillic from `CM LGC`_:
+ `<cyrillic-lm-lgc.tex>`__, `<cyrillic-lm-lgc.tex>`__
+ * Times/Helvetica (TeX Gyre) with Cyrillic ParaType_ fonts:
`<cyrillic-times-paratype.tex>`__, `<cyrillic-times-paratype.pdf>`__
- * `TeX-Gyre` with Cyrillic from `ParaType`_:
- `<cyrillic-times-paratype.tex>`__, `<cyrillic-times-paratype.pdf>`__
+
References:
`LaTeX2e font selection
diff --git a/Master/texmf-dist/doc/latex/substitutefont/README.html b/Master/texmf-dist/doc/latex/substitutefont/README.html
index 201dc3c5b18..50a6b5e05f8 100644
--- a/Master/texmf-dist/doc/latex/substitutefont/README.html
+++ b/Master/texmf-dist/doc/latex/substitutefont/README.html
@@ -3,9 +3,9 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
<title>Combine font families</title>
-<meta name="date" content="Last revised 2012-07-05" />
+<meta name="date" content="Last revised 2013-10-28" />
<meta name="copyright" content="© 2011 Günter Milde &lt;milde&#64;users.sf.net&gt;" />
<link rel="stylesheet" href="../../../../Python/docutils-svn/docutils/docutils/writers/html4strict/html4css1.css" type="text/css" />
<link rel="stylesheet" href="../../../../Python/docutils-svn/docutils/docutils/writers/html4strict/html4css2.css" type="text/css" />
@@ -16,7 +16,7 @@
<dl class="docinfo simple">
<dt class="date">Date</dt>
-<dd class="date">Last revised 2012-07-05</dd>
+<dd class="date">Last revised 2013-10-28</dd>
<dt class="copyright">Copyright</dt>
<dd class="copyright">© 2011 Günter Milde &lt;<a class="reference external" href="mailto:milde&#64;users.sf.net">milde&#64;users.sf.net</a>&gt;</dd>
<dt>Contributor</dt>
@@ -36,23 +36,29 @@ or the creators preference.</p>
<p>The <cite>substitutefont</cite> package facilitates the task to set up a font
family as substitute for another one in a specified font encoding.</p>
<dl class="docutils">
+<dt>News:</dt>
+<dd><p>2013-10-28 Documentation/Test update.</p>
+</dd>
<dt>Example:</dt>
<dd><p>Palatino with the standard package <cite>mathpazo</cite> for Latin and
<a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html">GFS Didot</a> for Greek:</p>
<pre class="literal-block">\usepackage[sc,slantedGreek]{mathpazo}
+\usepackage{substitutefont}
\substitutefont{LGR}{pplx}{udidot}
</pre>
</dd>
<dt>Source</dt>
<dd><p><a class="reference external" href="substitutefont.sty">substitutefont.sty</a>, <a class="reference external" href="substitutefont.sty.html">substitutefont.sty.html</a></p>
</dd>
-<dt>Tests</dt>
+<dt>Tests/Examples</dt>
<dd><ul class="simple">
-<li><p>Palatino wiht Greek from <a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html">GFS Didot</a>:
+<li><p>Palatino with Greek from <a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html">GFS Didot</a>:
<a class="reference external" href="greek-palatino-didot.tex">greek-palatino-didot.tex</a>, <a class="reference external" href="greek-palatino-didot.pdf">greek-palatino-didot.pdf</a></p></li>
+<li><p>Times (newtx) with GFS Artemisia, GFS Neohellenic, and CB:
+<a class="reference external" href="greek-times-bodoni.tex">greek-times-bodoni.tex</a>, <a class="reference external" href="greek-times-bodoni.pdf">greek-times-bodoni.pdf</a></p></li>
<li><p>Latin Modern with Cyrillic from <a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/cm-lgc.html">CM LGC</a>:
-<a class="reference external" href="cyrillic-times-paratype.tex">cyrillic-times-paratype.tex</a>, <a class="reference external" href="cyrillic-times-paratype.pdf">cyrillic-times-paratype.pdf</a></p></li>
-<li><p><cite>TeX-Gyre</cite> with Cyrillic from <a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/paratype.html">ParaType</a>:
+<a class="reference external" href="cyrillic-lm-lgc.tex">cyrillic-lm-lgc.tex</a>, <a class="reference external" href="cyrillic-lm-lgc.tex">cyrillic-lm-lgc.tex</a></p></li>
+<li><p>Times/Helvetica (TeX Gyre) with Cyrillic <a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/paratype.html">ParaType</a> fonts:
<a class="reference external" href="cyrillic-times-paratype.tex">cyrillic-times-paratype.tex</a>, <a class="reference external" href="cyrillic-times-paratype.pdf">cyrillic-times-paratype.pdf</a></p></li>
</ul>
</dd>
diff --git a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.pdf b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.pdf
index 4a3b7b5eea8..fbd70cbf90c 100644
--- a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.pdf
+++ b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.tex b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.tex
index 9ad795778c0..8aba4c02845 100644
--- a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.tex
+++ b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.tex
@@ -1,22 +1,24 @@
\documentclass[a4paper,russian]{scrartcl}
% generated by Docutils <http://docutils.sourceforge.net/>
\usepackage{fixltx2e} % LaTeX patches, \textsubscript
-\usepackage{cmap} % fix search and cut-and-paste in Acrobat
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
-\usepackage[english,russian]{babel}
-\usepackage{hyperref}
-
+\usepackage[german,english,russian]{babel}
+\usepackage{hyperref,bookmark}
+\usepackage{parskip}
\usepackage{substitutefont}
% Combine "Latin Modern" fonts for Latin and
% "CLG" fonts for Cyrillic.
-
\usepackage{lmodern}
\substitutefont{T2A}{lmr}{fcm}
\substitutefont{T2A}{lmss}{fcs}
\substitutefont{T2A}{lmtt}{fct}
+
+\addto\extrasgerman{\fontencoding{T1}\selectfont}
+\addto\noextrasgerman{\fontencoding{T2A}\selectfont}
+
\begin{document}
\section*{Cyrillic fonts to match Latin Modern}
@@ -26,25 +28,65 @@ is installed, it will be used instead. If not, bitmapped LM fonts are used
for cyrillic text. The \emph{cmlgc} package provides free Cyrillic
vector-fonts matching CM.
-\section{Заголовок}
+\section{Тест шрифтов}
-первый пример: \glqq{}Здравствуй, мир!\grqq{}
+\newcommand{\teststring}{Здравствуй, мир!}
-\texttt{"Здравствуй, мир!"}
+\begin{description}
+ \item [Normal:] \teststring
-\section{section title in latin script}
+ \item [it:] \textit{\teststring}
-Babel does not switch the font encoding when changing between Russian and
-English. As a standard font encoding, T2A provides basic Latin. However,
-the TeX Gyre fonts provide better support for accented Latin letters
-(compare the result of drag-and-drop of the following lines from the PDF
-rendering).
+ \item [sl:] \textsl{\teststring}
+
+ \item [bf:] \textbf{\teststring}
+
+ \item [bf it:] \textbf{\textit\teststring}
+
+ \item [sc:] \textsc{\teststring}
+
+ % \item [bf sc:] \textsc{\textbf\teststring} missing in Didot
+
+ \item [sf:] \textsf{\teststring}
+
+ \item [sf bf:] \textsf{\textbf\teststring}
+
+ \item [sf sl:] \textsf{\textsl\teststring}
+
+ \item [sf sc:] \textsf{\textsc\teststring}
+
+ \item [tt:] \texttt{\teststring}
+
+\end{description}
+
+\section{Section title in Latin script}
\selectlanguage{english}
-T2A \glqq{}Viele Grüße!\grqq{} \texttt{"Hello world!"}
+Babel does not switch the font encoding when changing between Russian and
+English or other languages using the Latin script. As a TeX \emph{standard
+text font encoding}, T2A provides basic Latin. However, there are no
+pre-composed accented Latin characters (compare the result of drag-and-drop
+of the following line from the PDF rendering).
+
+\begin{quotation}
+ Résumé of Nathan Söderblom
+\end{quotation}
+For a document that mixes Russian with , e.g., German with its heavy use of
+Umlauts, this may prove a major obstacle. The preamble of this document adds
+font-encoding switches to the \texttt{extrasgerman} and
+\texttt{noextrasgerman} babel macros.
+So lets switch to German and try (again, compare the result of drag-and-drop
+of the following line from the PDF rendering):
+
+\selectlanguage{german}
+
+\begin{quotation}
+ Viele Grüße!
+\end{quotation}
+
+\selectlanguage{russian}
-\fontencoding{T1}\selectfont
-T1 \glqq{}Viele Grüße!\grqq{} \texttt{"Hello world!"}
+До свидания!
\end{document}
diff --git a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.pdf b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.pdf
index d03405109e9..aa71e28726b 100644
--- a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.pdf
+++ b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.tex b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.tex
index 2f721180e48..c311de4dbf0 100644
--- a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.tex
+++ b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.tex
@@ -1,63 +1,76 @@
\documentclass[a4paper,russian]{scrartcl}
-% generated by Docutils <http://docutils.sourceforge.net/>
\usepackage{fixltx2e} % LaTeX patches, \textsubscript
-\usepackage{cmap} % fix search and cut-and-paste in Acrobat
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
-\usepackage{hyperref}
-\usepackage{substitutefont}
+% Combine "TeX Gyre" fonts for Latin and "ParaType" fonts for Cyrillic:
-% Combine "TeX Gyre" fonts for Latin and
-% "ParaType" fonts for Cyrillic.
+\usepackage{substitutefont}
+\usepackage[scaled=0.9]{PTSerif}
\usepackage{tgtermes}
\substitutefont{T2A}{qtm}{PTSerif-TLF}
+\usepackage[scaled=0.9]{PTSans}
\usepackage[scale=.90]{tgheros}
\substitutefont{T2A}{qhv}{PTSans-TLF}
-\usepackage[matchuppercase]{tgcursor}
% \substitutefont{T2A}{qcr}{PTMono-TLF}
%
% !pdfTeX error: pdflatex (file PTMono-Regular-tlf-t2a--base): Font PTMono-Regula
% r-tlf-t2a--base at 657 not found
% ==> Fatal error occurred, no output PDF file produced!
-% Dejavu Sans Mono works but is not the best match for Courier:
+% use DejaVu for tt
+\usepackage[scaled=0.85]{DejaVuSansMono}
+\usepackage[matchlowercase]{tgcursor}
\substitutefont{T2A}{qcr}{DejaVuSansMono-TLF}
-% use it for all teletyped text until PTMono gets fixed
-\renewcommand*{\ttdefault}{DejaVuSansMono-TLF}
+
\begin{document}
-\section*{Cyrillic fonts to match Times}
+\section*{Cyrillic fonts to match Times/Helvetica/Cursor}
TeX-compatible Cyrillic extensions to the URW standard Postscript fonts by
Valek Filippov were part of TeXGyre but removed due to license
-incompatibility. You may use the free cyrillic fonts from the
-\emph{paratype} package instead.
+incompatibility. The cyrillic fonts from the \emph{paratype} package are not
+exact matches but work quite well (the \emph{paratype} package contains also
+basic Latin fonts):
+
+\section{Тест шрифтов}
+
+\newcommand{\teststring}{Здравствуй, мир!
+ {\fontencoding{T1}\selectfont Hello world!}}
+
+\begin{description}
+ \item [Normal:] \teststring
+
+ \item [it:] \textit{\teststring}
+
+ \item [sl:] \textsl{\teststring}
+
+ \item [bf:] \textbf{\teststring}
+
+ \item [bf it:] \textbf{\textit\teststring}
+
+ \item [sc:] missing % \textsc{\teststring}
+
+ \item [bf sc:] missing % \textsc{\textbf\teststring}
-\section{Заголовок}
+ \item [sf:] \textsf{\teststring}
-первый пример: \glqq{}Здравствуй, мир!\grqq{}
+ \item [sf bf:] \textsf{\textbf\teststring}
-\texttt{"Здравствуй, мир!"}
+ \item [sf sl:] \textsf{\textsl\teststring}
-\section{section title in latin script}
+ \item [sf sc:] missing % \textsf{\textsc\teststring}
-Babel does not switch the font encoding when changing between Russian and
-English. As a standard font encoding, T2A provides basic Latin. However,
-the TeX Gyre fonts provide better support for accented Latin letters
-(compare the result of drag-and-drop of the following lines from the PDF
-rendering).
+ \item [tt:] \texttt{\teststring}\footnote{The PTMono font fails to load,
+ so this example uses DejaVuSansMono.}
-\selectlanguage{english}
+\end{description}
-T2A \glqq{}Viele Grüße!\grqq{} \texttt{"Hello world!"}
-\fontencoding{T1}\selectfont
-T1 \glqq{}Viele Grüße!\grqq{} \texttt{"Hello world!"}
\end{document}
diff --git a/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.pdf b/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.pdf
index 031991e82b0..e8e4d725101 100644
--- a/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.pdf
+++ b/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.tex b/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.tex
index 10ac0969a56..e391043feeb 100644
--- a/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.tex
+++ b/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.tex
@@ -3,20 +3,21 @@
\usepackage{parskip}
\usepackage[LGR,T1]{fontenc}
\usepackage[utf8]{inputenc}
+\pagestyle{empty}
\usepackage{substitutefont}
% Serif
\usepackage[sc,slantedGreek]{mathpazo}
-\substitutefont{LGR}{pplx}{udidot}
+\substitutefont{LGR}{ppl}{udidot}
% Sans
-\renewcommand*\sfdefault{uop}
-\substitutefont{LGR}{uop}{neohellenic}
+\usepackage[scale=.90]{tgheros}
+\substitutefont{LGR}{qhv}{neohellenic}
% Monospaced
-\renewcommand*{\ttdefault}{txtt} % from txtt package
-\substitutefont{LGR}{txtt}{cmtt} % CB fonts
+\usepackage[matchlowercase]{tgcursor}
+\substitutefont{LGR}{qcr}{cmtt} % CB fonts
% Teststring
@@ -29,7 +30,9 @@
\begin{document}
-Palatino/Optima/txtt with Didot/Neohellenic/CB for Greek text.
+\section*{Palatino/Helvetica/Courier and Greek replacements}
+
+Palatino (mathpazo) with GFS Didot:
\begin{description}
\item [Normal:] \alphabet
@@ -44,7 +47,13 @@ Palatino/Optima/txtt with Didot/Neohellenic/CB for Greek text.
\item [sc:] \textsc{\alphabet}
- % \item [bf sc:] \textsc{\textbf\alphabet} missing in Didot
+ % \item [bf sc:] \textsc{\textbf\alphabet}
+
+\end{description}
+
+Helvetica (TG Heros) with GFS Neohellenic:
+
+\begin{description}
\item [sf:] \textsf{\alphabet}
@@ -53,6 +62,12 @@ Palatino/Optima/txtt with Didot/Neohellenic/CB for Greek text.
\item [sf sl:] \textsf{\textsl\alphabet}
\item [sf sc:] \textsf{\textsc\alphabet}
+
+\end{description}
+
+Curier (TG Cursor) with CB teletype:
+
+\begin{description}
\item [tt:] \texttt{\alphabet}
diff --git a/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.pdf b/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.pdf
new file mode 100644
index 00000000000..b1020c97870
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/substitutefont/greek-times-bodoni.tex b/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.tex
index 95a81a0381a..7d1e5c3d267 100644
--- a/Master/texmf-dist/doc/latex/substitutefont/greek-times-bodoni.tex
+++ b/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.tex
@@ -3,12 +3,13 @@
\usepackage{parskip}
\usepackage[LGR,T1]{fontenc}
\usepackage[utf8]{inputenc}
+\pagestyle{empty}
\usepackage{substitutefont}
% Serif
-\usepackage{newtxtext}
-\substitutefont{LGR}{ntxr}{bodoni}
+\usepackage[scaled=0.97]{newtxtext}
+\substitutefont{LGR}{ntxr}{artemisia}
% Sans
% \renewcommand*\sfdefault{uop}
@@ -28,7 +29,9 @@
\begin{document}
-Times (newtx) with GFS Bodoni, GFS Neohellenic, and CB for Greek text.
+\section*{Times/Helvetica/Courier (newtx) and Greek replacements}
+
+Use GFS Artemisia, GFS Neohellenic, and CB for Greek text.
\begin{description}
\item [Normal:] \alphabet
diff --git a/Master/texmf-dist/doc/latex/substitutefont/greek-times-bodoni.pdf b/Master/texmf-dist/doc/latex/substitutefont/greek-times-bodoni.pdf
deleted file mode 100644
index 8d427490218..00000000000
--- a/Master/texmf-dist/doc/latex/substitutefont/greek-times-bodoni.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.txt b/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.txt
deleted file mode 100644
index 6d93be456cd..00000000000
--- a/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.txt
+++ /dev/null
@@ -1,77 +0,0 @@
-Easy font substitution
-**********************
-
-:Copyright: © 2010 Günter Milde
-
-:Contributor: Special thanks to Ulrike Fischer who provided
- the indirect definition with active ``\nfss@catcodes``.
-
-:Licence: This work may be distributed and/or modified under the
- conditions of the `LaTeX Project Public License`_, either
- version 1.3 of this license or any later version.
-
-:Abstract: Provide the ``\substitutefont`` macro for defining
- substitute fonts for specified font encodings.
-
-:Identification:
- ::
-
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{substitutefont}
- [2012/07/07 v0.1.3 combine font families]
-
-Changelog:
- .. class:: borderless
-
- ============ ===== =================================================
- 2010-11-04 0.1 initial version
- 2012-04-30 0.1.1 documentation update, upload to CTAN
- 2012-07-05 0.1.2 documentation/example update
- 2012-07-07 0.1.3 bugfix (comment usage example)
- ============ ===== =================================================
-
-
-Usage
-=====
-
-The macro ``\substitutefont{<encoding>}{<family>}{<new-family>}``
-selects the font <new-family> as replacement for <family> if the font
-encoding is <encoding> in the variants "normal", "italic", "slanted",
-and "small-caps" and the shapes "medium", "bold", and "bold-extended".
-
-Example:
- Palatino with the standard package `mathpazo` for Latin and
- `GFS Didot`_ for Greek:
-
- .. code:: latex
-
- \usepackage[sc,slantedGreek]{mathpazo}
- \substitutefont{LGR}{pplx}{udidot}
-
-
-Implementation
-==============
-::
-
- \begingroup
- \nfss@catcodes
- \newcommand*{\substitutefont}[3]{%
- \DeclareFontFamily{#1}{#2}{}
- \DeclareFontShape{#1}{#2}{m}{n}{<->ssub * #3/m/n}{}
- \DeclareFontShape{#1}{#2}{m}{it}{<->ssub * #3/m/it}{}
- \DeclareFontShape{#1}{#2}{m}{sl}{<->ssub * #3/m/sl}{}
- \DeclareFontShape{#1}{#2}{m}{sc}{<->ssub * #3/m/sc}{}
- \DeclareFontShape{#1}{#2}{b}{n}{<->ssub * #3/b/n}{}
- \DeclareFontShape{#1}{#2}{b}{it}{<->ssub * #3/b/it}{}
- \DeclareFontShape{#1}{#2}{b}{sl}{<->ssub * #3/b/sl}{}
- \DeclareFontShape{#1}{#2}{b}{sc}{<->ssub * #3/b/sc}{}
- \DeclareFontShape{#1}{#2}{bx}{n}{<->ssub * #3/bx/n}{}
- \DeclareFontShape{#1}{#2}{bx}{it}{<->ssub * #3/bx/it}{}
- \DeclareFontShape{#1}{#2}{bx}{sl}{<->ssub * #3/bx/sl}{}
- \DeclareFontShape{#1}{#2}{bx}{sc}{<->ssub * #3/bx/sc}{}
- }
- \global\let\substitutefont\substitutefont
- \endgroup
-
-.. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt
-.. _GFS Didot: http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html