[Pkg-lyx-devel] Bug#380714: lyx: helvetica font used in User Guide export can't find font against texlive distribution

Karsten Heymann kheymann at ecology.uni-kiel.de
Tue Aug 1 17:53:46 UTC 2006


Hi Marc,

you really should avoid TOFU. Thanks.

Marc J. Driftmeyer schrieb:
> Acrobat attempts to substitute for a suitable font.

It really shouldn't have to. All files created by pdftex *should*
include any used font inside the pdf, be it the lmodern font family or
those standard postscript fonts. You can controll it with the pdffonts
command, it should output something like

karsten at testubuntu:~/temp$ pdffonts testlmodern.pdf
name                                 type         emb sub uni object ID
------------------------------------ ------------ --- --- --- ---------
ETWFKE+LMRoman10-Regular             Type 1       yes yes no       6  0
DUJNAJ+LMSans10-Regular              Type 1       yes yes no       9  0
CILUZO+LMTypewriter10-Regular        Type 1       yes yes no      12  0

for a file with the lmodern fonts in use and

karsten at testubuntu:~/temp$ pdffonts testpsfonts.pdf
name                                 type         emb sub uni object ID
------------------------------------ ------------ --- --- --- ---------
PDEAGN+NimbusRomNo9L-Regu            Type 1       yes yes no       6  0
JVYZPK+NimbusSanL-Regu               Type 1       yes yes no       9  0
YPCUAQ+NimbusMonL-Regu               Type 1       yes yes no      12  0

with the Nimbus-Copies of the standard Postscript fonts bundled with TeX.

For testing you can use the following LaTeX code:

\documentclass{article}
\usepackage[T1]{fontenc}
\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{%
\usepackage[scaled=0.92]{helvet}
\usepackage{mathptmx}
\usepackage{courier} }
\begin{document}
\noindent
\textrm{Roman font}\\
\textsf{Sansserif font}\\
\texttt{Typewriter font}
\end{document}

put it in testfont.tex and run 'pdflatex testfont'. The outout should 
end with
...
(/usr/share/texmf/tex/latex/lm/lmodern.sty) (./testfont1.aux)
(/usr/share/texmf/tex/latex/lm/t1lmr.fd)
(/usr/share/texmf/tex/latex/lm/t1lmss.fd)
(/usr/share/texmf/tex/latex/lm/t1lmtt.fd) 
[1{/var/lib/texmf/fonts/map/pdftex/up
dmap/pdftex.map}] (./testfont1.aux) 
){/usr/share/texmf/fonts/enc/dvips/lm/cork-
lm.enc}</usr/share/texmf/fonts/type1/public/lm/lmtt10.pfb></usr/share/texmf/fon
ts/type1/public/lm/lmss10.pfb></usr/share/texmf/fonts/type1/public/lm/lmr10.pfb
 >
Output written on testfont1.pdf (1 page, 28852 bytes).
Transcript written on testfont1.log.

> The issue is with this code:
> 
> % set fonts for nicer pdf view 
> \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{% 
> \usepackage[scaled=0.92]{helvet} \usepackage{mathptmx} 
> \usepackage{courier} }

The code is perfectly fine.

> TexLive puts lmodern.sty under /usr/share/texmf/tex/latex/lm

Yes, that means \IfFileExists{lmodern.sty} will find it and only
\usepackage{lmodern} will be executed, not the other \usepackage's.

> Tetex-base puts lmodern.sty under the same pathway. You can rule out
> it being an improperly installed tex distribution or you can deduce
> both the tetex and texlive distributions from Debian are broken
> against what LyX expects to find lmodern.sty.

Sorry again, the place is fine. What happens afterwards seems to be broken.

> Interestingly, if I remove the 
> \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{%}
> 
> and leave:
> 
> \usepackage{lmodern} \usepackage[scaled=0.92]{helvet} 
> \usepackage{mathptmx} \usepackage{courier}

That means that first lmodern is loaded for roman, sansserif, typewriter
and math fonts and afterwars all these settings are overwritten to use
Times for Roman and math, Helvetica for Sansserif and Courier for
Typewriter. So nothing regarding lmodern is left and the lmodern bug is 
not triggered.

> the User Guide export to pdf via pdflatex works flawlessly. The 
> offending area is the code for \IfFileExists.

Sorry no, your lmodern-Installation is broken (which isn't too unlikely,
there have been some problems with it in the past). Please file a bug
against the lmodern package. With lyx everything is fine. (But thanks
alot for investigating this issue so deeply, opensource software lives
from participation!)

Yours,
Karsten




More information about the Pkg-lyx-devel mailing list