Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/2178
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jun 20, 2020
1 parent 2e1e799 commit 77849ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions magick/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,10 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
(void) CloneString(&annotate->text,textlist[i]);
if ((metrics.width == 0) || (annotate->gravity != NorthWestGravity))
(void) GetTypeMetrics(image,annotate,&metrics);
height=(ssize_t) (metrics.ascent-metrics.descent+
draw_info->interline_spacing+0.5);
height=(size_t) ceil(metrics.ascent-metrics.descent+
draw_info->interline_spacing-0.5);
if (height == 0)
height=(size_t) draw_info->pointsize;
switch (annotate->gravity)
{
case UndefinedGravity:
Expand Down

0 comments on commit 77849ee

Please sign in to comment.