Skip to content

Commit

Permalink
fix ImageMagick#85 regression in DrawSetTextInterlineSpacing
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Jun 24, 2020
1 parent 147e715 commit c99f35a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions magick/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,8 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
(void) CloneString(&annotate->text,textlist[i]);
if ((metrics.width == 0) || (annotate->gravity != NorthWestGravity))
(void) GetTypeMetrics(image,annotate,&metrics);
height=(size_t) ceil(metrics.ascent-metrics.descent+
draw_info->interline_spacing-0.5);
if (height == 0)
height=(size_t) ceil(draw_info->pointsize+draw_info->interline_spacing-
0.5);
height=(ssize_t) (metrics.ascent-metrics.descent+
draw_info->interline_spacing+0.5);
switch (annotate->gravity)
{
case UndefinedGravity:
Expand Down
1 change: 1 addition & 0 deletions magick/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -5781,6 +5781,7 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
draw_info->pointsize=12.0;
if (fabs(clone_info->pointsize) >= MagickEpsilon)
draw_info->pointsize=clone_info->pointsize;
draw_info->interline_spacing=draw_info->pointsize;
draw_info->undercolor.opacity=(Quantum) TransparentOpacity;
draw_info->border_color=clone_info->border_color;
draw_info->compose=OverCompositeOp;
Expand Down

0 comments on commit c99f35a

Please sign in to comment.