]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/222
authorCristy <urban-warrior@imagemagick.org>
Sun, 19 Jun 2016 14:01:37 +0000 (10:01 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 19 Jun 2016 14:01:37 +0000 (10:01 -0400)
ChangeLog
MagickCore/annotate.c

index 56522319123af1a4daae8355e993fdb989063efe..ca015776a6aa8c4fbda66e755f6fbf2e102ed314 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
 2016-06-12  7.0.2-1 Cristy  <quetzlzacatenango@image...>
   * Distort no longer converts grayscale image to sRGB (reference
     https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=29895).
+  * Don't return a zero bounding box for QueryMultilineFontMetrics() (reference
+    https://github.com/ImageMagick/ImageMagick/issues/222).
 
 2016-06-12  7.0.2-0 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.2-0, GIT revision 10884:f0e15e8:20160612.
index 9d56905d8a6b9925226bf06cd5c158e40ac40e02..583dd90ec73aae1697d6823ad7bd0e901a92ab54 100644 (file)
@@ -1533,13 +1533,17 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info,
     if (ft_status != 0)
       continue;
     if ((p == draw_info->text) || (bounds.xMin < metrics->bounds.x1))
-      metrics->bounds.x1=(double) bounds.xMin;
+      if (bounds.xMin != 0)
+        metrics->bounds.x1=(double) bounds.xMin;
     if ((p == draw_info->text) || (bounds.yMin < metrics->bounds.y1))
-      metrics->bounds.y1=(double) bounds.yMin;
+      if (bounds.yMin != 0)
+        metrics->bounds.y1=(double) bounds.yMin;
     if ((p == draw_info->text) || (bounds.xMax > metrics->bounds.x2))
-      metrics->bounds.x2=(double) bounds.xMax;
+      if (bounds.xMax != 0)
+        metrics->bounds.x2=(double) bounds.xMax;
     if ((p == draw_info->text) || (bounds.yMax > metrics->bounds.y2))
-      metrics->bounds.y2=(double) bounds.yMax;
+      if (bounds.yMax != 0)
+        metrics->bounds.y2=(double) bounds.yMax;
     if (((draw_info->stroke.alpha != TransparentAlpha) ||
          (draw_info->stroke_pattern != (Image *) NULL)) &&
         ((status != MagickFalse) && (draw_info->render != MagickFalse)))