Intolerable difference in glyph width: font=vnbx12

Shunsaku Hirata shunsaku.hirata74 at gmail.com
Sun Oct 17 01:37:48 CEST 2021


Hi,

> 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.

This is because pdftex and luatex are using widths taken from the
tfm file to write the "Widths" array of the PDF Type 1 font dictionary.

> 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.

However, the "Widths" array of the Typ1 font dictionary must be
consistent with that of the Type1 font program embedded in PDF as
described in
"PDF Reference" (sixth edition), Table 5.8 of "Type 1 Fonts",  p.414,

  These widths must be consistent with the actual widths given in the
  font program.

This is the reason why dvipdfmx is complaining.

> 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?

This is not a matter of the glyph bounding box but of the glyph width.
Actually, the "uhorn" glyph of vnbx12.pfb is defined as

  /uhorn {
          41 656 hsbw
          71 callsubr
          endchar
          } ND

Here, the "hsbw" operator sets the left side bearing and glyph width
as 41 and 656 respectively.


Thanks,
Shunsaku Hirata


More information about the tex-live mailing list.