[tex-k] (fwd) Bug#277499: tetex-bin: xdvi and dvips mis-parse font map files

Hilmar Preusse hille42 at web.de
Fri Oct 22 12:42:58 CEST 2004


Hi all,

here down in the Debian Bug Tracking System we've got a bug report
about dvips not correctly handling map files. xdvi seemed to have had
the same bug and seemed to have it already fixed[1]. I could neither
find something about that in the Changelog of dvips as of 2004-05-10
from latest tetex-beta nor a BTS for dvips.

Thanks for response.

Kind regards,
  Hilmar Preuße

[1] http://sourceforge.net/tracker/?group_id=23164&atid=377580&func=detail&aid=1029127
----- Forwarded message from Ben Harris <bjh21 at bjh21.me.uk> -----

From: Ben Harris <bjh21 at bjh21.me.uk>
Reply-To: Ben Harris <bjh21 at bjh21.me.uk>, 277499 at bugs.debian.org
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: Bug#277499: tetex-bin: xdvi and dvips mis-parse font map files
Date: Wed, 20 Oct 2004 14:23:38 +0100
Message-Id: <E1CKGRG-000325-00 at wraith.csi.cam.ac.uk>
X-Mailer: reportbug 2.63
X-Mailing-List: <debian-tetex-maint at lists.debian.org> archive/latest/9606

Package: tetex-bin
Version: 2.0.2-22
Severity: normal

Both dvips and xdvi parse TeX-to-PostScript font map files incorrectly.
Given a line like this:

myfont MyFont-PS <[myfont.enc <MyFont-PS.pfb

both of them fail to find the font file, and treat
"MyFont-PS.pfb" as an encoding.  This doesn't seriously break
dvips (since it just emits both files into its output), but does break
xdvi's Type 1 rendering.

Demonstrating this problem properly is difficult, but as an example,
populate ~/texmf as follows:

mkdir -p ~/texmf/web2c
cp /var/lib/texmf/web2c/updmap.cfg ~/texmf/web2c
mkdir -p ~/texmf/dvips/config
echo "myfont MyFont-PS <[myfont.enc <MyFont-PS.pfb" \
  > ~/texmf/dvips/config/myfont.map
mktexlsr
updmap --enable Map myfont.map

Now, run xdvi on some random dvi file with some debugging:

xdvi -debug 196608 /usr/share/doc/texmf/latex/base/usrguide.dvi.gz \
  2> xdvi.log
grep myfont xdvi.log

This gives output like:

dvi-draw.c:4382: T1: /home/bjh21/texmf/dvips/config/ps2pk.map:467: myfont -> (null) Enc: MyFont-PS.pfb Spec: <none>

Obviously, that should read "... -> MyFont-PS.pfb Enc: myfont.enc ...".

The bug appears to lie in the getpsinfo() function in texk/xdvik/dvips.c,
which has a variable called "encoding_p" which is supposed to indicate
whether the current word was tagged as an encoding file (by being preceded
by "<[".  Unfortunately, it doesn't get cleared at the end of each word,
only at the end of the line, so all files after one tagged with "<["
are treated as encodings, including the font file in the example above.

The equivalent function in texk/dvipsk/resident.c is rather different,
but has precisely the same bug.

I'm sorry this bug report is so incoherent.  Please tell me if there's
something I haven't adequately explained.
-- 
To UNSUBSCRIBE, email to debian-tetex-maint-REQUEST at lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster at lists.debian.org


----- End forwarded message -----

-- 
http://www.hilmar-preusse.de.vu/



More information about the tex-k mailing list