<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>gscan2pdf does not set a specific font for the unit test. If the
default font changes, the unit test fails. To fix, simply remove
<font face="monospace">/usr/share/fonts/type1/urw-base35/</font>
from the URW search path on <font face="monospace">configure.ac</font>.
Run <font face="monospace">autoconf</font> to update <font
face="monospace">configure</font>. <br>
</p>
<p>Background:</p>
<div>The problem is the ImageMagick Development team added a new URW
font directory to search in<font face="monospace"> configure.ac</font>:
<font face="monospace">/usr/share/fonts/type1/urw-</font><wbr><font
face="monospace">base35/</font>. Unfortunately, type1 fonts
require an <font face="monospace">.afm</font> metric file and
these metrics incorrectly set the descender and ascender to 0:</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> <font face="monospace">NimbusSans-Regular.afm:</font></div>
<div><font face="monospace"> Descender 0<br>
Ascender 0</font><br>
</div>
</blockquote>
<div><br>
</div>
<div>We reviewed the Freetype code and in some places they sanitize
the <font face="monospace">ascender</font> and <font
face="monospace">descender</font> if they are 0. We added code
to 6.9.11-62 to sanitize the values but unfortunately that then
changed the default font for gscan2pdf which changes the image
size for unit test <font face="monospace">t/1122_save_pdf_with_hocr.t</font>.
By rights, the gscan2pdf developers should have specified a
specific font in case the default font changes-- but they didn't.
The proper fix for Debian is to patch <font face="monospace">configure.ac</font>
to remove <font face="monospace">/usr/share/fonts/type1/urw-</font><wbr><font
face="monospace">base35/</font> from the URW search path, run <font
face="monospace">autoconf</font> then build ImageMagick or have
the gscan2pdf development team set a specific font. We ran
gscan2pdf unit tests and they pass now. This same fix should work
for any release of ImageMagick 6 from 6.9.11-23+.</div>
<div><br>
</div>
<div>Cristy</div>
<div>Principle ImageMagick Architect<br>
</div>
</body>
</html>