<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/18bbe41545115d7928e7fb4507023b455e0073ae">https://github.com/macports/macports-ports/commit/18bbe41545115d7928e7fb4507023b455e0073ae</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 18bbe41 ghostscript: fix bbox regression in 9.27
</span>18bbe41 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 18bbe41545115d7928e7fb4507023b455e0073ae
</span>Author: Jonathan Stickel <jjstickel@gmail.com>
AuthorDate: Tue Jun 25 13:32:12 2019 -0600
<span style='display:block; white-space:pre;color:#404040;'> ghostscript: fix bbox regression in 9.27
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> * fix a bounding box-regression, upstream Bug 700952
</span>---
print/ghostscript/Portfile | 4 +-
.../files/ghostpdl.git-06c920713e11.patch | 92 ++++++++++++++++++++++
2 files changed, 95 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/print/ghostscript/Portfile b/print/ghostscript/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 6db628d..c8bdf87 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/print/ghostscript/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/print/ghostscript/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,6 +5,7 @@ PortGroup muniversal 1.0
</span>
name ghostscript
version 9.27
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories print
license AGPL-3 BSD
maintainers nomaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,7 +30,8 @@ distfiles ${distname}.tar.gz:source \
</span> ghostscript-fonts-std-8.11.tar.gz:fonts \
${mappingresources_commit}.zip:misc
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles patch-base_unix-dll.mak.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-base_unix-dll.mak.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ghostpdl.git-06c920713e11.patch
</span>
checksums ${distname}.tar.gz \
rmd160 3c025eda3c99a1438c537cff27828a778b4edd95 \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/print/ghostscript/files/ghostpdl.git-06c920713e11.patch b/print/ghostscript/files/ghostpdl.git-06c920713e11.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..2a313a7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/print/ghostscript/files/ghostpdl.git-06c920713e11.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,92 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 06c920713e11bce9bd541bbf9bf294b2ba16aee8 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Chris Liddell <chris.liddell@artifex.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Wed, 10 Apr 2019 14:23:39 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Bug 700952: re-introduce over/underflow workaround
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Commit 355434f4b1bbe8c4f98cafad5a6868aa2f0eaae1 reverted a workaround that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compensated for over/underflow in Freetype's TTF hinting (related to freedom
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+and projection vector calculations). That problem no longer exists in recent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Freetype releases, and the workaround actually caused other issues to occur
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+with hinting.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+What wasn't obvious was that the workaround also protected over/underflow
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+issues relating to the unitsPerEm value.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+So this re-instates the workaround, but bases the decision on how the final
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+scale is distributing between the Freetype "size" and the Freetype matrix on
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+the unitsPerEm value (this is relevant for all font types as, for non-TTF,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+font types, Freetype derives the unitsPerEm from the FontMatrix (for PS type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+fonts).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Also fixes Bug 700875
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ base/fapi_ft.c | 33 +++++++++++++++++++++++++++------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 27 insertions(+), 6 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/base/fapi_ft.c b/base/fapi_ft.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 07b4167..c9fe9ff 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- base/fapi_ft.c.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ base/fapi_ft.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -974,13 +974,19 @@ make_rotation(FT_Matrix * a_transform, const FT_Vector * a_vector)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ transform_decompose(FT_Matrix * a_transform, FT_UInt * xresp, FT_UInt * yresp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- FT_Fixed * a_x_scale, FT_Fixed * a_y_scale)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FT_Fixed * a_x_scale, FT_Fixed * a_y_scale, int units_per_EM)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ double scalex, scaley, fact = 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ double factx = 1.0, facty = 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FT_Matrix ftscale_mat;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FT_UInt xres;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FT_UInt yres;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* We have to account for units_per_EM as we fiddle with the scaling
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * in order to avoid underflow (mostly in the TTF hinting code), but
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * we also want to clamp to a lower value (512, admittedly arrived at
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * via experimentation) in order to preserve the fidelity of the outlines.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ double upe = units_per_EM > 512 ? (float)units_per_EM : 512.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ scalex = hypot((double)a_transform->xx, (double)a_transform->xy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ scaley = hypot((double)a_transform->yx, (double)a_transform->yy);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1067,10 +1073,25 @@ transform_decompose(FT_Matrix * a_transform, FT_UInt * xresp, FT_UInt * yresp,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ scalex *= fact;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ftscale_mat.xx = (FT_Fixed) (65536.0 / scalex);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ftscale_mat.xy = (FT_Fixed) 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ftscale_mat.yx = (FT_Fixed) 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ftscale_mat.yy = (FT_Fixed) (65536.0 / scaley);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* see above */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fact = 1.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ while (scaley * yres > (double)upe * 72.0 && (xres > 0 && yres > 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && (scalex > 0.0 && scaley > 0.0)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (scaley < yres) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ xres >>= 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ yres >>= 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fact *= 2.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ scalex /= 1.25;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ scaley /= 1.25;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ftscale_mat.xx = (FT_Fixed) ((65536.0 / scalex) * fact);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ftscale_mat.xy = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ftscale_mat.yx = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ftscale_mat.yy = (FT_Fixed) ((65536.0 / scaley) * fact);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FT_Matrix_Multiply(a_transform, &ftscale_mat);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ memcpy(a_transform, &ftscale_mat, sizeof(FT_Matrix));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1315,7 +1336,7 @@ gs_fapi_ft_get_scaled_font(gs_fapi_server * a_server, gs_fapi_font * a_font,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * transform.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ transform_decompose(&face->ft_transform, &face->horz_res,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- &face->vert_res, &face->width, &face->height);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &face->vert_res, &face->width, &face->height, face->ft_face->units_per_EM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ft_error = FT_Set_Char_Size(face->ft_face, face->width, face->height,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ face->horz_res, face->vert_res);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.9.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>