I've just run into a pdflatex problem, which is reproduced with the
following minimal example:
--------
\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\usepackage{graphicx}
\begin{document}
\includegraphics{fig}
\end{document}
--------
Problematic fig.pdf is available here:
http://aparamon.msk.ru/ftp/upload/fig.pdf
When I run pdflatex, the figure is included into the resulting file,
but all cyrillic characters present in the original fig.pdf disappear.
Please note that fig.pdf contains embedded font subset.
pdflatex says:
--------
Running `LaTeX' on `test' with ``pdflatex "\nonstopmode\input
{test.tex}"''
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax,
dumylang, noh
yphenation, ukrainian, russian, bulgarian, loaded.
(./test.tex (/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/latex/cyrillic/t2aenc.def)
(/usr/share/texmf-texlive/tex/latex/cyrillic/t2acmr.fd))
(/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
(/usr/share/texmf-texlive/tex/latex/base/utf8.def
(/usr/share/texmf-texlive/tex/latex/base/t1enc.dfu)
(/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu)
(/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu)
(/usr/share/texmf-texlive/tex/latex/base/t2aenc.dfu)))
(/usr/share/texmf-texlive/tex/generic/babel/babel.sty
(/usr/share/texmf-texlive/tex/generic/babel/russianb.ldf
(/usr/share/texmf-texlive/tex/generic/babel/babel.def)))
(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)
(/etc/texmf/tex/latex/config/graphics.cfg)
(/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def))) (./
test.aux)
<fig.pdf, id=1, 578.16pt x 289.08pt> <use fig.pdf>
Overfull \hbox (248.15858pt too wide) in paragraph at lines 10--11
[][]
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} <./fig.pdf>] (./
test.aux)
)
(see the transcript file for additional information){/usr/share/texmf/
fonts/enc
/dvips/cm-super/cm-super-t2a.enc}</usr/share/texmf/fonts/type1/public/
cm-super/
sfrm1000.pfb></usr/share/texmf-texlive/fonts/type1/urw/times/
utmr8a.pfb
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10019' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10021' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10026' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10028' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10030' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10031' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10032' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10033' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10035' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10049' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10065' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10067' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10070' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10075' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10077' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10079' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10080' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10082' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10084' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10096' undefined
pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
urw/times/u
tmr8a.pfb): glyph `afii10097' undefined
>
Output written on test.pdf (1 page, 19327 bytes).
Transcript written on test.log.
LaTeX finished at Wed Apr 8 00:01:45
---------
Any hint on how to overcome/workaround the problem *greatly*
appreciated.
I'm ready to provide any additional info,
Andrey Paramonov
> I've just run into a pdflatex problem, which is reproduced with the
> following minimal example:
>
> --------
>
> \documentclass{article}
>
> \usepackage[T2A]{fontenc}
> \usepackage[utf8]{inputenc}
> \usepackage[russian]{babel}
>
> \usepackage{graphicx}
>
> \begin{document}
> \includegraphics{fig}
> \end{document}
>
> --------
>
> Problematic fig.pdf is available here:
>
> http://aparamon.msk.ru/ftp/upload/fig.pdf
pdffonts:
| name type emb sub uni object ID
| ------------------------------------ ------------ --- --- --- ---------
| AHUEFL+NimbusRomNo9L-Regu Type 1C yes yes yes 8 0
> When I run pdflatex, the figure is included into the resulting file,
> but all cyrillic characters present in the original fig.pdf disappear.
> Please note that fig.pdf contains embedded font subset.
>
> pdflatex says:
> /dvips/cm-super/cm-super-t2a.enc}</usr/share/texmf/fonts/type1/public/
> cm-super/
> sfrm1000.pfb></usr/share/texmf-texlive/fonts/type1/urw/times/
> utmr8a.pfb
>
> pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
> urw/times/u
> tmr8a.pfb): glyph `afii10019' undefined
If pdfTeX knows a font that is used inside an included PDF file, then
it throws away the font in the included file and uses its known font.
AFAIK the reason for this behaviour is that this avoids embedding
a font several times (with different subsets).
In your case, the figure uses one of ghostscript's fonts. AFAIK there
are of these fonts that also contains cyrillic glyphs. However, you
have the (standard) variant without the cyrillic glyphs.
Workaround: Assuming you don't need the font in the other text of
your .tex file you can make pdfTeX forget about the font:
Add this at the beginning of your .tex file:
\pdfmapline{-l7x-utmr NimbusRomNo9L-Regu}
Yours sincerely
Heiko <ober...@uni-freiburg.de>
> If pdfTeX knows a font that is used inside an included PDF file, then
> it throws away the font in the included file and uses its known font.
> AFAIK the reason for this behaviour is that this avoids embedding
> a font several times (with different subsets).
Oh what a tangled web we weave. Anyone who got the idea to do
such optimization by default should have first made darn sure
that nothing could ever go wrong. i.e., that each glyph in a graphic
is indeed present in the matching system font. I would think that
the Cyrillic issue would have been among the first things to be tested.
What does it take to ensure that all graphics with embedded and
subsetted fonts are just left alone? Tell me there is a global
switch that can disable pdfTeX's meddling with such optimization.
Mike Shell
Thanks for a quick and helpful response! I've added \pdfmapline spell
to the preamble of my document, and now the embedded fonts are
preserved.
From your description I conclude that the current pdflatex behavior is
a bug. Should I report it to the LaTeX maintainers, or this project is
frozen like TeX?
By the way, the problem is not reproduced with xelatex.
Andrey
(heiko's like that.)
>From your description I conclude that the current pdflatex behavior is
>a bug. Should I report it to the LaTeX maintainers, or this project is
>frozen like TeX?
it's not a latex problem, but a pdftex one. pdftex is supposedly
still being maintained, but there may be a problem with the feature
freeze which is i believe now imminent.
>By the way, the problem is not reproduced with xelatex.
other systems, other properties. (remember xelatex doesn't even
generate its own pdf.)
--
Robin Fairbairns, Cambridge
> "cmr....@gmail.com" <cmr....@gmail.com> wrote:
>
> > I've just run into a pdflatex problem, which is reproduced with the
> > following minimal example:
> > \includegraphics{fig}
> > http://aparamon.msk.ru/ftp/upload/fig.pdf
> | AHUEFL+NimbusRomNo9L-Regu Type 1C yes yes yes 8 0
> > pdfTeX warning: pdflatex (file /usr/share/texmf-texlive/fonts/type1/
> > urw/times/u
> > tmr8a.pfb): glyph `afii10019' undefined
> Workaround: Assuming you don't need the font in the other text of
> your .tex file you can make pdfTeX forget about the font:
>
> Add this at the beginning of your .tex file:
>
> \pdfmapline{-l7x-utmr NimbusRomNo9L-Regu}
The author and maintainer of pdfTeX Han The Thanh has provided
a better solution:
| I think it's useful to have a summary of the problem for further reference:
|
| - fig.pdf contains a font named NimbusRomNo9L-Regu
| - pdftex sees that it has the same font on disk and tries to use the font on
| +disk instead of copying the font from fig.pdf. (Reason: if we have eg fig.pdf &
| +fig2.pdf, the font would be included once instead of twice)
| - however these 2 fonts are different: the one embedded in fig.pdf has extra
| +glyphs that the font on disk doesn't have. pdftex cannot know this, since the
| +font names are the same.
| - hence the output pdf doesn't have those glyphs, too.
|
| workarounds/solutions:
| - if you are in hurry, just say: \pdfinclusioncopyfonts=1
| - for more detailed info, see bug report #2092
| - the proper solution IMO is to change the font name to denote that it differ
| +from the original NimbusRomNo9L-Regu
|
| It's questionable whether pdftex should use the font on disk instead of copying
| +the font from fig.pdf by default. There are 2 main arguments for this behavior:
|
| - that behavior was the default since the beginning, and it's not wise to change
| +it; it can break pdf inclusion in existing documents
| - if this behavior is not desired, it can be changed easily
| +(\pdfinclusioncopyfonts=1)
| ...
It was a reply to the bug-report #4014 (submitted by Andrey
Paramonov).
Yours sincerely
Heiko <ober...@uni-freiburg.de>