summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-newfontstar.html
blob: 70ce959aeee7a8c46a4201fe5383f03d7d7a6f17 (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
<head>
<title>UK TeX FAQ -- question label newfont*</title>
</head><body>
<h3>What&rsquo;s wrong with <code>\</code><code>newfont</code>?</h3>
<p/>If all else fails, you <em>can</em> specify a font using the LaTeX
<code>\</code><code>newfont</code> command.  The font so specified doesn&rsquo;t fit into the
LaTeX font selection mechanism, but the technique can be tempting
under several circumstances.  The command is merely the thinnest of
wrappers around the <code>\</code><code>font</code> primitive, and doesn&rsquo;t really fit with
LaTeX at all.  A simple, but really rather funny, example of the
problems it poses, may be seen in:
<blockquote>
<pre>
\documentclass[10pt]{article}
\begin{document}
\newfont{\myfont}{cmr17 scaled 2000}
\myfont
\LaTeX
\end{document}
</pre>
</blockquote><p>
(the reader is encouraged to try this).  The &ldquo;A&rdquo; of <code>\</code><code>LaTeX</code> pretty
much disappears: LaTeX chooses the size on the &ldquo;A&rdquo; according to
<em>its</em> idea of the font size (10pt), but positions it according to
the dimensions of &ldquo;<code>\</code><code>myfont</code>&rdquo;, which is more than three times
that size.
<p/>Another &ldquo;<code>\</code><code>myfont</code>&rdquo; example arises from an entirely different
source.  The mini-document:
<blockquote>
<pre>
\documentclass{article}
\begin{document}
\newfont{\myfont}{ecrm1000}
{\myfont voil\`a}
\end{document}
</pre>
</blockquote><p>
gives you &ldquo;German low double quotes&rdquo; (under the &ldquo;a&rdquo;) in place of
the grave accent.  This happens because <i>ecrm1000</i> is in a
different <a href="FAQ-whatenc.html">font encoding</a> than LaTeX is
expecting &mdash; if you use the LaTeX <i>fontenc</i> package to
select the EC fonts, all these tiresome encoding issues are
solved for you, behind the scenes.
<p/>There does however remain a circumstance when you will be tempted to
use <code>\</code><code>newfont</code> &mdash; viz., to get a font size that doesn&rsquo;t fall into
the Knuth standard set of sizes: LaTeX (by default) won&rsquo;t allow you
to use such a size.  Don&rsquo;t despair: see the answer 
&ldquo;<a href="FAQ-fontsize.html">arbitrary font sizes</a>&rdquo;.
<p/>
<p/>
<p/><p/><p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=newfont*">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=newfont*</a>
</body>