Issue with pango & arabic

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
watb
Posts: 3
Joined: 2017-02-09T08:08:37-07:00
Authentication code: 1151

Issue with pango & arabic

Post by watb »

Hi,

This code:

Code: Select all

$img = new Imagick();
$img->setBackgroundColor(new ImagickPixel('white'));
$text = ' ولكن النا';
//Pango code for Hello World!
$img->newPseudoImage(200, 200, "pango:$text");
$img->writeImage("output.png");
generates this:
Image

Do you know why?
Thanks!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Issue with pango & arabic

Post by snibgo »

Perhaps your default font doesn't have Arabic glyphs.
snibgo's IM pages: im.snibgo.com
watb
Posts: 3
Joined: 2017-02-09T08:08:37-07:00
Authentication code: 1151

Re: Issue with pango & arabic

Post by watb »

Thanks @snigbo!
I've tried with arial-unicode-ms.ttf font that contains arabic glyphs but same issue.
watb
Posts: 3
Joined: 2017-02-09T08:08:37-07:00
Authentication code: 1151

[RESOLVED] Re: Issue with pango & arabic

Post by watb »

Finally, I found the solution! In fact, you have to install pangocairo lib.

When it's ok, you should see it with the "identify -version" command line: Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-11-26 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules OpenMP Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
Post Reply