wrong texts in eps file made with PYX

Bug #578786 reported by Mathieu Pierre
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
texlive-bin (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: python-pyx

I've recently upgraded my system to ubuntu lucid lynx 10.04 and now I face a problem with EPS files created with PYX. When I try to include such a file as a figure in a latex document, texts don't display well. The problem appears even with the simple "hello world" example given on PYX website. The EPS files produced by this version of pyx are bigger than previously.
Any help is welcome !

Revision history for this message
Mathieu Pierre (mathieu-pierre) wrote :
description: updated
Revision history for this message
Mathieu Pierre (mathieu-pierre) wrote :

Apparently, the package lmodern is needed in latex documents to have the EPS files correctly displayed.

Revision history for this message
Stuart Prescott (themill) wrote :

Given that the cmr10 font used in your example is embedded within the EPS file, it would appear that you need to convince latex to make use of these fonts. Including a simple .tex file that illustrates this problem would be helpful.

From what I have been able to ascertain, the change in file size is due to changes in the latex fonts that are being included not a change in PyX (a new distro release brings new versions of lots of programs).

Revision history for this message
Mathieu Pierre (mathieu-pierre) wrote :

Here is a minimal latex source code including the figure hello.eps that I have attached previously.

\documentclass{article}
\usepackage{graphicx}
\begin{document}
 \begin{figure}
        \includegraphics{hello.eps}
 \end{figure}
\end{document}

Compiling it with latex+dvips+ps2pdf, the text "hello, world" embedded in the EPS figure does not appear, neither in the .ps nor in the .pdf output files.
One solution I've found is to add the line \usepackage{lmodern} in the latex code. My concern is that this line was not necessary to have it working correctly before the system upgrade.

You must be right about the changes in the latex fonts included. If i compare the EPS file that i have attached above with another EPS file created with PyX before the upgrade, i get:

Before the upgrade :
%%BeginFont: CMR10
%!PS-AdobeFont-1.1: CMR10 1.00B
%%CreationDate: 1992 Feb 19 19:54:52
% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.

Now :
%%BeginFont: CMR10
%!PS-AdobeFont-1.0: CMR10 003.002
%%Title: CMR10
%Version: 003.002
%%CreationDate: Mon Jul 13 16:17:00 2009
%%Creator: David M. Jones
%Copyright: Copyright (c) 1997, 2009 American Mathematical Society
%Copyright: (<http://www.ams.org>), with Reserved Font Name CMR10.
% This Font Software is licensed under the SIL Open Font License, Version 1.1.
% This license is in the accompanying file OFL.txt, and is also
% available with a FAQ at: http://scripts.sil.org/OFL.
%%EndComments
FontDirectory/CMR10 known{/CMR10 findfont dup/UniqueID known{dup
/UniqueID get 5000793 eq exch/FontType get 1 eq and}{pop false}ifelse
{save true}{false}ifelse}{false}ifelse

I'm not familiar enough with the font system to know if this could be somehow related to my problem. I can understand the declaration of the font name followed by the copyright comment. But what do the three last lines of the code that i've included mean ?

Revision history for this message
Stuart Prescott (themill) wrote :

Looking at the ps file created by dvips, it seems that in the case of the previous version of texlive (2007), dvips includes only one font:

$ grep FontDir hello2007.ps
FontDirectory/CMR10 known{/CMR10 findfont dup/UniqueID known{dup

while dvips from texlive 2009 includes two copies:

$ grep FontDir hello2009.ps
FontDirectory/CMR10 known{/CMR10 findfont dup/UniqueID known{dup
FontDirectory/CMR10 known{/CMR10 findfont dup/UniqueID known{dup

Note that using dvips from texlive 2007 with a dvi from texlive 2009 doesn't result in this problem:

$ grep FontDir hello2009-2007.ps
FontDirectory/CMR10 known{/CMR10 findfont dup/UniqueID known{dup

In the cases where there are two copies of the font embedded in the PS file, PS viewers and the pdfs made from the PS file fail to display the text as described.

Editing the postscript generated by dvips to rename the font that's not from the EPS file also solves this problem giving a usable PS file:

$ sed '0,/hello.eps/{s/cmr10/&a/ig}' hello2009.ps > hello2009b.ps

It would thus seem that the problem is caused by a change in the behaviour of dvips and that this new behaviour is generating postscript with incorrectly mapped fonts.

Reassign to texlive-binaries as it owns dvips. Realistically, this is probably something that needs to be worked through with the dvips developers, however.

affects: pyx (Ubuntu) → texlive-bin (Ubuntu)
Changed in texlive-bin (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.