{
if (IsUTFSpace(GetUTFCode(p)) != MagickFalse)
s=p;
+ if (*p == '\n')
+ q=draw_info->text;
for (i=0; i < (ssize_t) GetUTFOctets(p); i++)
*q++=(*(p+i));
*q='\0';
if (extent.width > metrics->width)
*metrics=extent;
}
- metrics->height=(double) (i*(size_t) (metrics->ascent-
- metrics->descent+0.5)+(i-1)*draw_info->interline_spacing);
+ metrics->height=(double) (i*(size_t) (metrics->ascent-metrics->descent+0.5)+
+ (i-1)*draw_info->interline_spacing);
/*
Relinquish resources.
*/
origin.x+=direction*face->glyph->advance.x;
metrics->origin.x=origin.x;
metrics->origin.y=origin.y;
- if (last_glyph.id != 0)
- FT_Done_Glyph(last_glyph.image);
+ FT_Done_Glyph(last_glyph.image);
last_glyph=glyph;
code=GetUTFCode(p);
}
if (utf8 != (unsigned char *) NULL)
utf8=(unsigned char *) RelinquishMagickMemory(utf8);
- if (last_glyph.id != 0)
- FT_Done_Glyph(last_glyph.image);
+ FT_Done_Glyph(last_glyph.image);
if ((draw_info->stroke.alpha != TransparentAlpha) ||
(draw_info->stroke_pattern != (Image *) NULL))
{
metrics->width=bitmap->left;
}
}
- if (glyph.id != 0)
- FT_Done_Glyph(glyph.image);
+ FT_Done_Glyph(glyph.image);
}
metrics->width-=metrics->bounds.x1/64.0;
metrics->bounds.x1/=64.0;
return(MagickTrue);
}
#if !defined(MAGICKCORE_LCMS_DELEGATE)
- (void) ThrowMagickException(&image->exception,
- GetMagickModule(),MissingDelegateWarning,
- "DelegateLibrarySupportNotBuiltIn","`%s' (LCMS)",image->filename);
+ (void) ThrowMagickException(&image->exception,GetMagickModule(),
+ MissingDelegateWarning,"DelegateLibrarySupportNotBuiltIn",
+ "`%s' (LCMS)",image->filename);
#else
{
cmsHPROFILE
{
width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
- if (((image->columns != 0) && (width > (image->columns+1))) ||
- ((image->rows != 0) && (height > (image->rows+1))))
+ if (((image->columns != 0) && (width >= image->columns)) ||
+ ((image->rows != 0) && (height >= image->rows)))
break;
status=GetMultilineTypeMetrics(image,draw_info,&metrics);
}
+ draw_info->pointsize/=2.0;
for ( ; status != MagickFalse; draw_info->pointsize--)
{
width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
- if ((image->columns != 0) && (width <= (image->columns+1)) &&
- ((image->rows == 0) || (height <= (image->rows+1))))
+ if ((image->columns != 0) && (width < image->columns) &&
+ ((image->rows == 0) || (height < image->rows)))
break;
- if ((image->rows != 0) && (height <= (image->rows+1)) &&
- ((image->columns == 0) || (width <= (image->columns+1))))
+ if ((image->rows != 0) && (height < image->rows) &&
+ ((image->columns == 0) || (width < image->columns)))
break;
if (draw_info->pointsize < 2.0)
break;