[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#277499: tetex-bin: xdvi and dvips mis-parse font map files



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.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.6
Locale: LANG=C, LC_CTYPE=C

Versions of packages tetex-bin depends on:
ii  debconf                   1.4.30.8       Debian configuration management sy
ii  debianutils               2.8.4          Miscellaneous utilities specific t
ii  dpkg                      1.10.23        Package maintenance system for Deb
ii  ed                        0.2-20         The classic unix line editor
ii  libc6                     2.3.2.ds1-16   GNU C Library: Shared libraries an
ii  libgcc1                   1:3.4.2-2      GCC support library
ii  libice6                   4.3.0.dfsg.1-8 Inter-Client Exchange library
ii  libkpathsea3              2.0.2-22       path search library for teTeX (run
ii  libpaper1                 1.1.14-0.4     Library for handling paper charact
ii  libpng12-0                1.2.5.0-8      PNG library - runtime
ii  libsm6                    4.3.0.dfsg.1-8 X Window System Session Management
ii  libstdc++5                1:3.3.4-13     The GNU Standard C++ Library v3
ii  libt1-5                   5.0.2-3        Type 1 font rasterizer library - r
ii  libwww0                   5.4.0-9        The W3C WWW library
ii  libx11-6                  4.3.0.dfsg.1-8 X Window System protocol client li
ii  libxaw7                   4.3.0.dfsg.1-8 X Athena widget set library
ii  libxext6                  4.3.0.dfsg.1-8 X Window System miscellaneous exte
ii  libxmu6                   4.3.0.dfsg.1-8 X Window System miscellaneous util
ii  libxt6                    4.3.0.dfsg.1-8 X Toolkit Intrinsics
ii  mime-support              3.28-1         MIME files 'mime.types' & 'mailcap
ii  perl                      5.8.4-2.3      Larry Wall's Practical Extraction 
ii  sed                       4.1.2-1        The GNU sed stream editor
ii  tetex-base                2.0.2b-6       Basic library files of teTeX
ii  ucf                       1.09           Update Configuration File: preserv
ii  xlibs                     4.3.0.dfsg.1-8 X Window System client libraries m
ii  zlib1g                    1:1.2.1.1-7    compression library - runtime

-- debconf information:
* tetex-bin/upd_map: true
* tetex-bin/cnf_name:
* tetex-bin/fmtutil: true
  tetex-bin/fmtutil-failed:
  tetex-bin/userperm: false
* tetex-bin/texmf: false
  tetex-bin/updmap-failed:
* tetex-bin/hyphen: ngerman[=naustrian-neue_Rechtschreibung], french[=patois]
* tetex-bin/oldcfg: true
* tetex-bin/use_debconf: false
  tetex-bin/groupname: users
  tetex-bin/groupperm: true
* tetex-bin/lsr-perms: false



Reply to: