summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-fonts-pln.html
blob: d9b955e15b58f8bb02680db285be637a33b7c8e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<head>
<title>UK TeX FAQ -- question label fonts-pln</title>
</head><body>
<h3>Using non-standard fonts in Plain TeX</h3>
<p/>Plain TeX (in accordance with its description) doesn&#8217;t do anything
fancy with fonts: it sets up the fonts that Knuth found he needed when
writing the package, and leaves you to do the rest.
<p/>To use something other than Knuth&#8217;s default, you can use Knuth&#8217;s
mechanism, the <code>\</code><code>font</code> primitive:
<blockquote>
<pre>
\font\foo=nonstdfont
...
\foo
Text set using nonstdfont ...
</pre>
</blockquote><p>
The name you use (<code>nonstdfont</code>, above) is the name of the
<code>.tfm</code> file for the font you want.
<p/>If you want to use an italic version of <code>\</code><code>foo</code>, you need to use
<code>\</code><code>font</code> again:
<blockquote>
<pre>
\font\fooi=nonstdfont-italic
...
\fooi
Text set using nonstdfont italic...
</pre>
</blockquote><p>
This is all very elementary stuff, and serves for simple use of fonts.
However, there are wrinkles, the most important of which is the matter
of <a href="FAQ-whatenc.html">font encodings</a>.  Unfortunately, many fonts that
have appeared recently simply don&#8217;t come in versions using Knuth&#8217;s
eccentric font encodings &#8212; but those encodings are built into
Plain TeX, so that some macros of Plain TeX need to be changed to
use the fonts.  LaTeX gets around all these problems by using a
&#8220;font selection scheme&#8221; &#8212; this &#8216;NFSS&#8217; (&#8216;N&#8217; for
&#8216;new&#8217;, as opposed to what LaTeX 2.09 had) carries around with it
separate information about the fonts you use, so the changes to
encoding-specific commands happen automagically.
<p/>If you only want to use the <a href="FAQ-ECfonts.html">EC fonts</a>, you
can in principle use the <i>ec-plain</i> bundle, which gives you a version
of Plain TeX which you can run in the same way that you run
Plain TeX using the original CM fonts, by invoking
<i>tex</i>.  (<i>Ec-plain</i> also extends the EC fonts,
for reasons which aren&#8217;t immediately clear, but which might cause
problems if you&#8217;re hoping to use Type 1 versions of the fonts.)
<p/>The <i>font_selection</i> package provides a sort of halfway house:
it provides font face and size, but not family selection.  This gives
you considerable freedom, but leaves you stuck with the original
CM fonts.  It&#8217;s a compact solution, within its restrictions.
<p/>Other Plain TeX approaches to the problem (packages
<i>plnfss</i>, <i>fontch</i> and <i>ofs</i>) break out of the
Plain TeX model, towards the sort of font selection provided by
ConTeXt and LaTeX &#8212; font selection that allows you to change
family, as well as size and face.  The remaining packages all make
provision for using encodings other than Knuth&#8217;s OT1.
<p/><i>Plnfss</i> has a rather basic set of font family details;
however, it is capable of using font description (<code>.fd</code>) files
created for LaTeX.  (This is useful, since most modern mechanisms
for integrating outline fonts with TeX generate <code>.fd</code> files
in their process.)
<p/><i>Fontch</i> has special provision for T1 and TS1
encodings, which you select by arcane commands, such as:
<blockquote>
<pre>
\let\LMTone\relax
\input fontch.tex
</pre>
</blockquote><p>
for T1.
<p/><i>Ofs</i> seems to be the most thoroughly thought-through of the
alternatives, and can select more than one encoding: as well as
T1 it covers the encoding IL2, which is favoured in the
Czech Republic and Slovakia.  <i>Ofs</i> also covers mathematical fonts,
allowing you the dubious pleasure of using fonts such as the 
<a href="FAQ-psfchoice.html"><i>pxfonts</i> and <i>txfonts</i></a>.
<p/>The <i>pdcmac</i> Plain TeX macro package aims to be a complete
document preparation environment, like <a href="FAQ-eplain.html">Eplain</a>.  One
of its components is a font selection scheme, <i>pdcfsel</i>, which
is rather simple but adequately powerful for many uses.  The package
doesn&#8217;t preload fonts: the user is required to declare the fonts the
document is going to use, and the package provides commands to select
fonts as they&#8217;re needed.  The distribution includes a configuration to
use Adobe &#8216;standard&#8217; fonts for typesetting text.  (Eplain itself
seems not to offer a font selection scheme.)
<p/>The <i>font-change</i> collection takes a rather different
approach &#8212; it supplies what are (in effect) a series of templates
that may be included in a document to change font usage.  The
package&#8217;s documentation shows the effect rather well.
<p/>Simply to change font <em>size</em> in a document (i.e., not changing
the default font itself), may be done using the rather straightforward
<i>varisize</i>, which offers font sizes ranging from 7 points to
20 points (nominal sizes, all).  Font size commands are generated when
any of the package files is loaded, so the <i>11pt.tex</i> defines a
command <code>\</code><code>elevenpoint</code>; each of the files ensures there&#8217;s a &#8220;way
back&#8221;, by defining a <code>\</code><code>tenpoint</code> command.
<dl>
<dt><tt><i>ec-plain</i></tt><dd><a href="http://mirror.ctan.org/macros/ec-plain.zip">macros/ec-plain</a> (or <a href="http://mirror.ctan.org/macros/ec-plain/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/ec-plain.html">catalogue entry</a>
<dt><tt><i>font-change</i></tt><dd><a href="http://mirror.ctan.org/macros/plain/contrib/font-change.zip">macros/plain/contrib/font-change</a> (or <a href="http://mirror.ctan.org/macros/plain/contrib/font-change/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/font-change.html">catalogue entry</a>
<dt><tt><i>fontch</i></tt><dd><a href="http://mirror.ctan.org/macros/plain/contrib/fontch.zip">macros/plain/contrib/fontch</a> (or <a href="http://mirror.ctan.org/macros/plain/contrib/fontch/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/fontch.html">catalogue entry</a>
<dt><tt><i>font_selection</i></tt><dd><a href="http://mirror.ctan.org/macros/plain/contrib/font_selection.zip">macros/plain/contrib/font_selection</a> (or <a href="http://mirror.ctan.org/macros/plain/contrib/font_selection/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/font-selection.html">catalogue entry</a>
<dt><tt><i>ofs</i></tt><dd><a href="http://mirror.ctan.org/macros/generic/ofs.zip">macros/generic/ofs</a> (or <a href="http://mirror.ctan.org/macros/generic/ofs/">browse the directory</a>)
<dt><tt><i>pdcmac</i></tt><dd><a href="http://mirror.ctan.org/macros/plain/contrib/pdcmac.zip">macros/plain/contrib/pdcmac</a> (or <a href="http://mirror.ctan.org/macros/plain/contrib/pdcmac/">browse the directory</a>)
<dt><tt><i>plnfss</i></tt><dd><a href="http://mirror.ctan.org/macros/plain/plnfss.zip">macros/plain/plnfss</a> (or <a href="http://mirror.ctan.org/macros/plain/plnfss/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/plnfss.html">catalogue entry</a>
<dt><tt><i>varisize</i></tt><dd><a href="http://mirror.ctan.org/macros/plain/contrib/varisize.zip">macros/plain/contrib/varisize</a> (or <a href="http://mirror.ctan.org/macros/plain/contrib/varisize/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/varisize.html">catalogue entry</a>
</dl>
<p/><p/><p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=fonts-pln">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=fonts-pln</a>
</body>