Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/1457
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jan 19, 2019
1 parent 059bd9a commit 549259c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2019-01-19 7.0.8-25 Cristy <quetzlzacatenango@image...>
* Eliminate spurious font warning (reference
https://github.com/ImageMagick/ImageMagick/issues/1458).
* Support HEIC EXIF & XMP profiles.

2019-01-12 7.0.8-24 Cristy <quetzlzacatenango@image...>
* Release ImageMagick version 7.0.8-24, GIT revision 15233:db129ba64:20190112

Expand Down
14 changes: 8 additions & 6 deletions MagickCore/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,14 +944,16 @@ 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)
if (IsPathAccessible(draw_info->font) != MagickFalse)
{
status=RenderFreetype(image,draw_info,draw_info->encoding,offset,
metrics,exception);
return(status);
}
(void) ThrowMagickException(exception,GetMagickModule(),TypeWarning,
"UnableToReadFont","`%s'",draw_info->font);
}
if ((type_info == (const TypeInfo *) NULL) &&
(draw_info->family != (const char *) NULL))
Expand Down
5 changes: 4 additions & 1 deletion coders/ttf.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/resource_.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/module.h"
Expand Down Expand Up @@ -252,7 +253,8 @@ static Image *ReadTTFImage(const ImageInfo *image_info,ExceptionInfo *exception)
*/
y=20;
draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
draw_info->font=AcquireString(image->filename);
draw_info->font=AcquireString("");
(void) ImageToFile(image,draw_info->font,exception);
ConcatenateString(&draw_info->primitive,"push graphic-context\n");
(void) FormatLocaleString(buffer,MagickPathExtent,
" viewbox 0 0 %.20g %.20g\n",(double) image->columns,(double) image->rows);
Expand Down Expand Up @@ -288,6 +290,7 @@ static Image *ReadTTFImage(const ImageInfo *image_info,ExceptionInfo *exception)
/*
Relinquish resources.
*/
(void) RelinquishUniqueFileResource(draw_info->font);
draw_info=DestroyDrawInfo(draw_info);
(void) CloseBlob(image);
return(GetFirstImageInList(image));
Expand Down

0 comments on commit 549259c

Please sign in to comment.