[tex-k] dvitomp character width bug?

Hartmut Henkel hartmut_henkel at gmx.de
Sun Mar 7 14:38:43 CET 2004


Hi John,

in this list, Reinhard Kotucha has reported at 5 Jan 2004 with "Subject:
[tex-k] font metric problem", that the virtual font pplr8t has weird
character width in mpost, when a german 'ß' is typeset. This 'ß' happens
to be character 255 in the virtual font, the one with the highest
number. I copied the virtual character definition from slot 255 into
slot 254 of font pplr8t, and there everything worked fine: The virtual
character 'ß' from slot 254 had the right width! And changing the width
of character 255 in pplr8t.vpl had no influence on spacing at all!

It seems to be a problem with overlapping things in the width[] array in
file dvitomp.web: In chunk

  @ @<Read the packet length, character code, and \.{TFM} width@>=

256 values char_width(f)(c):=w; are read in.

But in chunk

  @ @<Store character-width indices...@>=

info_ptr is 255 instead of 256, which gives an overlap of 1 in the
following operations. The funny consequence is, that in a virtual font
the last character, slot 255, has a width (e. g. some number 327680),
which seems to be independent from the width given in the .vpl file.

The following patch (is it a kludge?) seems to work here:

  @<Finish setting up the data structures for the new virtual font@>=
  fbase[f]:=vf_ptr+1;
  info_ptr:=info_base[f]+font_ec[f]+1
-----------------------------------^^

The "+1" in the 3rd line is added. The test file is as follows, which
should then give two identical characters 'ß' with proper spacing:

verbatimtex
\font\aaa pplr8t at 20pt
\font\bbb pplr8r at 20pt
etex
beginfig(1)
  label.top (btex \aaa ---\char255---\bbb\char223--- etex,(100,100));
endfig;
end;

I would be glad if you could check into this.

Best Regards

Hartmut


------------------------------------------------------------------------
Hartmut Henkel, Oftersheim, Germany
------------------------------------------------------------------------


More information about the tex-k mailing list