From: Cristy Date: Sat, 23 Feb 2019 23:26:56 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/1488 X-Git-Tag: 7.0.8-29~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=520b7025a98697897d0ff03f477de0752e67a15e;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1488 --- diff --git a/coders/pango.c b/coders/pango.c index dbf0608a1..0fe0be2b2 100644 --- a/coders/pango.c +++ b/coders/pango.c @@ -328,6 +328,16 @@ static Image *ReadPANGOImage(const ImageInfo *image_info, if ((align != PANGO_ALIGN_CENTER) && (draw_info->direction == RightToLeftDirection)) align=(PangoAlignment) (PANGO_ALIGN_LEFT+PANGO_ALIGN_RIGHT-align); + option=GetImageOption(image_info,"pango:align"); + if (option != (const char *) NULL) + { + if (LocaleCompare(option,"center") == 0) + align=PANGO_ALIGN_CENTER; + if (LocaleCompare(option,"left") == 0) + align=PANGO_ALIGN_LEFT; + if (LocaleCompare(option,"right") == 0) + align=PANGO_ALIGN_RIGHT; + } pango_layout_set_alignment(layout,align); if (draw_info->font == (char *) NULL) description=pango_font_description_new();