summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-pdf-fig-chars.html
blob: 8d7487ad871963f63e5b1d363fd89294834dee3c (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
<head>
<title>UK TeX FAQ -- question label pdf-fig-chars</title>
</head><body>
<h3>Characters disappear from figures in PDFTeX</h3>
<p/>You have a PDF figure, which you want to use in your
PDFLaTeX document.  When you compile the document, PDFTeX
complains about &ldquo;missing glyphs&rdquo;, and some (or all) of the labelling
text or symbols in the original figure is no longer visible.
<p/>What has happened is:
<ol>
<li> Your figure file (say <i>fig.pdf</i>) has a font <i>font.pfb</i>
  embedded in it.
<li> PDFTeX notes that it has <i>font.pfb</i> on disc, and loads
  that in place of the copy in <i>fig.pdf</i>.
<li> It turns out that the copy in <i>fig.pdf</i> has glyphs that
  aren&rsquo;t in <i>font.pfb</i> on disc, so that you get errors while
  compiling and you see that characters are missing when you view the
  output.  (PDFTeX can&rsquo;t know that the fonts are different, since
  they have the same name.)
</ol>
Which is all very undesirable.
<p/>PDFTeX does this to keep file sizes down: suppose you have a
document that loads figures <i>fig1.pdf</i> and <i>fig2.pdf</i>; both
of those use font <i>font.pfb</i>.  If PDFTeX takes no action,
there will be <em>two</em> copies of <i>font.pfb</i> in the output.
(If your document also uses the font, there could be three copies.)
<p/>A real case is the URW font <i>NimbusRomNo9L-Regu</i> (a clone
of Times Roman), which is available in a version with Cyrillic
letters, while the version in TeX distributions doesn&rsquo;t have those
letters.  Both versions, as distributed, have the same name.
<p/>The simple (&ldquo;quick and dirty&rdquo;) solution is to add the command
<blockquote>
  <code>\</code><code>pdfinclusioncopyfonts</code><code>=1</code>
</blockquote><p>
to the preamble of your document.
<p/>The &ldquo;real&rdquo; solution is that one or other font should be renamed.  In
either case, this would require that you reconfigure some program&rsquo;s
(TeX&rsquo;s or your drawing package&rsquo;s) font tables &mdash; inevitably a
tiresome job.
<p/><p/><p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdf-fig-chars">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdf-fig-chars</a>
</body>