From: Cristy Date: Sat, 19 Jan 2019 16:20:51 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/1458 X-Git-Tag: 7.0.8-25~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=059bd9a454f5397705a950a4ca1376f916ab2e8a;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1458 --- diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c index ee980d874..e9c705118 100644 --- a/MagickCore/annotate.c +++ b/MagickCore/annotate.c @@ -944,16 +944,14 @@ static MagickBooleanType RenderType(Image *image,const DrawInfo *draw_info, return(RenderX11(image,draw_info,offset,metrics,exception)); if (*draw_info->font == '^') return(RenderPostscript(image,draw_info,offset,metrics,exception)); - if (IsPathAccessible(draw_info->font) != MagickFalse) - { - status=RenderFreetype(image,draw_info,draw_info->encoding,offset, - metrics,exception); - return(status); - } type_info=GetTypeInfo(draw_info->font,exception); if (type_info == (const TypeInfo *) NULL) - (void) ThrowMagickException(exception,GetMagickModule(),TypeWarning, - "UnableToReadFont","`%s'",draw_info->font); + if (IsPathAccessible(draw_info->font) != MagickFalse) + { + status=RenderFreetype(image,draw_info,draw_info->encoding,offset, + metrics,exception); + return(status); + } } if ((type_info == (const TypeInfo *) NULL) && (draw_info->family != (const char *) NULL))