From 059bd9a454f5397705a950a4ca1376f916ab2e8a Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 19 Jan 2019 11:20:51 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1458 --- MagickCore/annotate.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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)) -- 2.40.0