Discussion:
[tex-live] TL2017's dvipdfmx prints warnings
Bob Tennent
2018-01-20 15:16:16 UTC
Permalink
|Ever since TeXLive 2017 came out, dvipdfmx is throwing weird warning
|messages when I use garamond as the font, when the exact same document
|involves no such warnings in prior years of TeXLive.
|
|Consider the following tiny sample, which we can call "demo.tex"
|
|\documentclass{article}
|\usepackage[mdugm]{mathdesign}
|\begin{document}
|[foo]
|\end{document}
|
|If I run `latex demo.tex`, followed by `dvipdfmx demo`, I do get a pdf
|
| atemplate-2 -> atemplate-2.pdf
| [1]
| xdvipdfmx:warning: Glyph width mismatch for TFM and font (md-gmr8t)
| xdvipdfmx:warning: TFM: 375.402 vs. Type1 font: 374
| xdvipdfmx:warning: Glyph width mismatch for TFM and font (md-gmr8t)
| xdvipdfmx:warning: TFM: 375.402 vs. Type1 font: 374
|
|These never appeared prior to TeXLive 2017, even with the exact same
|sample document and even though I have the garamond fonts installed in the
|same location. (Namely, I have a symlink in
|$TL2017/texmf-local/fonts/type1 called "urw" that points to a folder in my
|$HOME. This has worked flawlessly for years.) I have this problem on
|multiple machines.
|
|I'm not a TeX expert, but I don't see why there would suddenly be a
|mismatch between metrics and what the font says. Those garamond fonts
|have not changed in years as far as I know. I got them from the
|"garamond" package on CTAN, which hasn't changed in years. I seem to
|recall the directions in there told me that all I need are: ugmm8a.pfb,
|ugmmi8a.pfb, ugmr8a.pfb, and ugmri8a.pfb. That is indeed what is in the
|dir that my symlink points to.
Your MWE uses

\usepackage[mdugm]{mathdesign}

which provides its own versions of the garamond fonts. So
it looks to me like there's an issue with the mathdesign
package.

Bob T.
Bob Tennent
2018-01-20 15:32:58 UTC
Permalink
|Your MWE uses
|
|\usepackage[mdugm]{mathdesign}
|
|which provides its own versions of the garamond fonts. So
|it looks to me like there's an issue with the mathdesign
|package.
Just to clarify: mathdesign provides *math* fonts for
use with urw-garamond and it is one of these that is
problematic. If you replace the \usepackage command by

\renewcommand{\rmdefault}{ugm}

there are no warning messages.

Bob T.
jack
2018-01-20 16:02:57 UTC
Permalink
Post by Bob Tennent
|Your MWE uses
|
|\usepackage[mdugm]{mathdesign}
|
|which provides its own versions of the garamond fonts. So
|it looks to me like there's an issue with the mathdesign
|package.
Just to clarify: mathdesign provides *math* fonts for
use with urw-garamond and it is one of these that is problematic.
That's weird! My document never enters math mode, so I don't see why math
fonts are in play.

-Jack
Philip Taylor (RHUoL)
2018-01-20 16:12:44 UTC
Permalink
Post by jack
That's weird! My document never enters math mode, so I don't see why math
fonts are in play.
Don't the square brackets cause maths mode to be entered ?
Post by jack
\documentclass{article}
\usepackage[mdugm]{mathdesign}
\begin{document}
[foo]
\end{document}
Philip Taylor
Reinhard Kotucha
2018-01-20 20:35:27 UTC
Permalink
Post by Philip Taylor (RHUoL)
Post by jack
That's weird! My document never enters math mode, so I don't see
why math fonts are in play.
Don't the square brackets cause maths mode to be entered ?
LaTeX's square brackets have the same \catcode as those in plain TeX.

*\showthe\catcode `[
Post by Philip Taylor (RHUoL)
12.
I just tried the document provided by Jack with TeX Live 2015 and 2017
on Linux:

strace -eopen pdflatex demo.tex

No difference. The math fonts have always been loaded in the past.
Nothing has changed in TeX Live 2017.

texlive/2015/texmf-dist/tex/latex/mathdesign/mdugm/ot1mdugm.fd
texlive/2015/texmf-dist/fonts/map/fontname/texfonts.map
texlive/2015/texmf-dist/fonts/tfm/public/mathdesign/mdugm/mdugmr7t.tfm
texlive/2015/texmf-dist/tex/latex/base/fontenc.sty
texlive/2015/texmf-dist/tex/latex/base/t1enc.def
texlive/2015/texmf-dist/tex/latex/mathdesign/mdugm/t1mdugm.fd
texlive/2015/texmf-dist/fonts/tfm/public/mathdesign/mdugm/mdugmr8t.tfm
texlive/2015/texmf-dist/tex/latex/mathdesign/mdacmr.fd
texlive/2015/texmf-dist/tex/latex/mathdesign/mdbcmr.fd
texlive/2015/texmf-dist/fonts/vf/public/mathdesign/mdugm/mdugmr8t.vf
texlive/2015/texmf-dist/fonts/tfm/public/mathdesign/mdugm/md-gmr8y.tfm
texlive/2015/texmf-dist/fonts/tfm/public/mathdesign/mdugm/md-gmr8t.tfm
texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map

texlive/2017/texmf-dist/tex/latex/mathdesign/mdugm/ot1mdugm.fd
texlive/2017/texmf-dist/fonts/map/fontname/texfonts.map
texlive/2017/texmf-dist/fonts/tfm/public/mathdesign/mdugm/mdugmr7t.tfm
texlive/2017/texmf-dist/tex/latex/base/fontenc.sty
texlive/2017/texmf-dist/tex/latex/base/t1enc.def
texlive/2017/texmf-dist/tex/latex/mathdesign/mdugm/t1mdugm.fd
texlive/2017/texmf-dist/fonts/tfm/public/mathdesign/mdugm/mdugmr8t.tfm
texlive/2017/texmf-dist/tex/latex/mathdesign/mdacmr.fd
texlive/2017/texmf-dist/tex/latex/mathdesign/mdbcmr.fd
texlive/2017/texmf-dist/fonts/vf/public/mathdesign/mdugm/mdugmr8t.vf
texlive/2017/texmf-dist/fonts/tfm/public/mathdesign/mdugm/md-gmr8y.tfm
texlive/2017/texmf-dist/fonts/tfm/public/mathdesign/mdugm/md-gmr8t.tfm
texlive/2017/texmf-var/fonts/map/pdftex/updmap/pdftex.map

Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------
jack
2018-01-20 16:08:49 UTC
Permalink
Post by Bob Tennent
|Ever since TeXLive 2017 came out, dvipdfmx is throwing weird warning
|messages when I use garamond as the font, when the exact same document
|involves no such warnings in prior years of TeXLive.
|
|Consider the following tiny sample, which we can call "demo.tex"
|
|\documentclass{article}
|\usepackage[mdugm]{mathdesign}
|\begin{document}
|[foo]
|\end{document}
|
|If I run `latex demo.tex`, followed by `dvipdfmx demo`, I do get a pdf
|
| atemplate-2 -> atemplate-2.pdf
| [1]
| xdvipdfmx:warning: Glyph width mismatch for TFM and font (md-gmr8t)
| xdvipdfmx:warning: TFM: 375.402 vs. Type1 font: 374
| xdvipdfmx:warning: Glyph width mismatch for TFM and font (md-gmr8t)
| xdvipdfmx:warning: TFM: 375.402 vs. Type1 font: 374
|
|These never appeared prior to TeXLive 2017, even with the exact same
|sample document and even though I have the garamond fonts installed in
the |same location. (Namely, I have a symlink in
|$TL2017/texmf-local/fonts/type1 called "urw" that points to a folder in
my |$HOME. This has worked flawlessly for years.) I have this problem
on |multiple machines.
|
|I'm not a TeX expert, but I don't see why there would suddenly be a
|mismatch between metrics and what the font says. Those garamond fonts
|have not changed in years as far as I know. I got them from the
|"garamond" package on CTAN, which hasn't changed in years. I seem to
|recall the directions in there told me that all I need are: ugmm8a.pfb,
|ugmmi8a.pfb, ugmr8a.pfb, and ugmri8a.pfb. That is indeed what is in
the |dir that my symlink points to.
Your MWE uses
\usepackage[mdugm]{mathdesign}
which provides its own versions of the garamond fonts. So it looks to me
like there's an issue with the mathdesign package.
According to its manual (and also the top of mathdesign.sty), the
mathdesign package hasn't changed since 2013. And yet these warnings
didn't appear until TL2017. So there is something about TL2017 in
particular that is either causing a bug or revealing a latent one.

-Jack
Akira Kakuto
2018-01-20 19:45:56 UTC
Permalink
Dear Jack,
Post by jack
According to its manual (and also the top of mathdesign.sty), the
mathdesign package hasn't changed since 2013. And yet these warnings
didn't appear until TL2017. So there is something about TL2017 in
particular that is either causing a bug or revealing a latent one.
For example, the character width of
character 91 (/bracketleft) from md-gmr8t.tfm and
md-gmr8t.pfb is found as:

375.402 from (CHARWD R 0.375402) in md-gmr8t.tfm
374 from 69 374 hsbw in md-gmr8t.pfb.

If |difference| > 1.0, warning is shown.
Please ignore the warning.

Thanks,
Akira
Reinhard Kotucha
2018-01-20 23:22:22 UTC
Permalink
Post by Akira Kakuto
Dear Jack,
Post by jack
According to its manual (and also the top of mathdesign.sty), the
mathdesign package hasn't changed since 2013. And yet these warnings
didn't appear until TL2017. So there is something about TL2017 in
particular that is either causing a bug or revealing a latent one.
For example, the character width of
character 91 (/bracketleft) from md-gmr8t.tfm and
375.402 from (CHARWD R 0.375402) in md-gmr8t.tfm
374 from 69 374 hsbw in md-gmr8t.pfb.
If |difference| > 1.0, warning is shown.
Please ignore the warning.
There is definitely a severe bug in the current version of xdvipdfmx.

Jack reported:

xdvipdfmx:warning: Glyph width mismatch for TFM and font (md-gmr8t)
xdvipdfmx:warning: TFM: 375.402 vs. Type1 font: 374

First of all, let me state that this warning message is extremely
helpful. It clearly shows what's going wrong.

xdvipdfmx erroneously assumes that values in TFM files are in "big
points". The obvious solution is to divide values read from a TFM
file by 72.27 and multiply them with 72.

$ octave -q
octave:1> 375.402 / 72.27 * 72
ans = 374.00

I don't know whether DVI files are affected too. Values therein are
most likely in pt rather than in bp and certainly have to be converted
as well.

Given that xdvipdfmx really assumes that values in TFM and/or DVI
files are in bp, I fear that the PDF output is also incorrect.

Jack, the warning messages will disappear whenever the bug is fixed.
Post by Akira Kakuto
If |difference| > 1.0, warning is shown.
The resolution of TeX's fixed point numbers is about a hundredth of
the wavelength of visible light. Even if we expect rounding errors
somewhere, the threshold of 1bp is much too large in order to detect
any problems at all.

Akira, are you in contact with xdvipdfmx developers?

Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:***@web.de
------------------------------------------------------------------
Akira Kakuto
2018-01-21 06:57:34 UTC
Permalink
Dear Reinhard,
Post by Reinhard Kotucha
There is definitely a severe bug in the current version of xdvipdfmx.
... ...
xdvipdfmx erroneously assumes that values in TFM files are in "big
points". The obvious solution is to divide values read from a TFM
file by 72.27 and multiply them with 72.
$ octave -q
octave:1> 375.402 / 72.27 * 72
ans = 374.00
Those values are relative to the full width value of 1000,
or rarios. Thus they are dimensionless:
375.402 / 1000, and 374 / 1000.

If you try to transform to "big points", there will be full
of warning messages.
Please see ,e.g., an example of cmr12.tfm and cmr12.pfb:

cmr12.tfm
(CHARACTER O 0
(CHARWD R 0.6118)
cmr12.pfb
/Gamma {
41 611 hsbw

cmr12.tfm
(CHARACTER O 1
(CHARWD R 0.815964)
cmr12.pfb
/Delta {
46 815 hsbw

cmr12.tfm
(CHARACTER O 2
(CHARWD R 0.761566)
cmr12.pfb
/Theta {
54 761 hsbw

... ...

Thanks,
Akira
Shunsaku Hirata
2018-01-21 08:06:55 UTC
Permalink
Post by Reinhard Kotucha
There is definitely a severe bug in the current version of xdvipdfmx.
This is definitely not a bug in xdvipdfmx.
Post by Reinhard Kotucha
xdvipdfmx erroneously assumes that values in TFM files are in "big
points".
No. They are all relative.


Shunsaku Hirata

Akira Kakuto
2018-01-20 20:53:41 UTC
Permalink
Dear Jack,
And yet these warnings didn't appear until TL2017.
You are right.
I found that the check of character width was
introduced by the author from TL 2017.

Thanks,
Akira
Bob Tennent
2018-01-20 16:54:22 UTC
Permalink
| My document never enters math mode, so I don't see why
| math fonts are in play.
Presumably mathdesign implements square brackets with its
math font.
|According to its manual (and also the top of
|mathdesign.sty), the mathdesign package hasn't changed
|since 2013. And yet these warnings didn't appear until
|TL2017. So there is something about TL2017 in particular
|that is either causing a bug or revealing a latent one.
Perhaps dvipdfmx now generates warnings that it didn't
bother with earlier. You can turn them off by using
dvipdfmx -q.

Bob T.
Loading...