Intolerable difference in glyph width: font=vnbx12

Reinhard Kotucha reinhard.kotucha at web.de
Sat Oct 16 22:13:59 CEST 2021


On 2021-10-16 at 13:14:38 +0000, Werner LEMBERG wrote:

 > 
 > [TeXLive svn rev. 60775]
 > 
 > 
 > Processing the attached test file with with tex and dvipdfmx yields
 > the following warning.
 > 
 >   dvipdfmx:warning: Intolerable difference in glyph width: font=vnbx12, char=247
 >   dvipdfmx:warning: font: 656 vs. tfm: 624.847
 > 
 > and indeed, as you can see in the PDF output, the paragraph with 'u
 > horn' glyphs sticks into the right margin because dvipdfmx uses the
 > font's glyph width.
 > 
 > I'm not sure whether this is a bug in the METAFONT sources or in the
 > conversion process that generated `vnbx12.pfb`...

Hi Werner,
I get the erroneous result only with xetex but not with pdftex or
luatex.  Can you confirm?  Attached is a PDF file created with pdftex
and it looks ok here.

But there is something interesting though:

vnbx12.pfb:
  dup 247 /uhorn put

You already used \char274 and the .map file doesn't re-encode the
font.  Hence decimal 247 is correct.  Values in the .tfm file are in
octal representation: 

$ printf "%o\n" 247
367

$ tftopl vnbx12.tfm

(CHARACTER C u
   (CHARWD R 0.624847)

(CHARACTER O 367
   (CHARWD R 0.624847)

I get similar results with vnr12.tfm though the output of xetex looks
better:

$ tftopl vnr12.tfm

(CHARACTER C u
   (CHARWD R 0.543849)

(CHARACTER O 367
   (CHARWD R 0.543849)

It looks wrong at a first glance that /u and /uhorn have the same
width.  But it is desired.  At TUG-2005 at Pont-à-Mousson Thành asked
Hermann Zapf how to design the horn accent so that the width of /uhorn
can be the same as that of the letter /u.

Increasing the width is not desirable because that would insert a gap
between /uhorn and the following glyph only due to a tiny accent.
Hermann Zapf immediately understood the problem and made suggestions.

The problem here is that xetex obviously doesn't rely on the data
provided by the font metrics (.tfm) file but determines the width of a
particular glyph from the /charpath of the Type 1 font and then
complains that these widths are different.  It's completely wrong to
use the calculated widths from the font instead of the widths given in
the .tfm file.

There is nothing wrong to design a glyph whose graphical
representation (lines and curves) exceed the values of the glyph
bounding box defined in the metrics file.  It's often desired that
successive glyphs overlap.  But for lining up glyphs in a document the
width specified in the metric file is relevant.  How else can one
design glyhs which are supposed to overlap?

In this case the horn accent shouldn't have an impact on character
spacing.  This can only be accomplished if the positions of glyphs are
determined from the .tfm files but not from their actual shapes.  

If my assumptions are correct xetex doesn't use the widths provided by
the metrics files but determines them from the actual glyph outlines
in the fonts.  This is definitely wrong and can't work.

I might be wrong but at least this explains the behavior.

Regards,
  Reinhard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-vnbx12.pdf
Type: application/pdf
Size: 19053 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20211016/a3fca7cc/attachment-0001.pdf>
-------------- next part --------------

--
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------


More information about the tex-live mailing list.