Page 1 of 1

Issue with pango & arabic

Posted: 2017-02-09T08:13:32-07:00
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!

Re: Issue with pango & arabic

Posted: 2017-02-09T08:25:02-07:00
by snibgo
Perhaps your default font doesn't have Arabic glyphs.

Re: Issue with pango & arabic

Posted: 2017-02-09T08:28:38-07:00
by watb
Thanks @snigbo!
I've tried with arial-unicode-ms.ttf font that contains arabic glyphs but same issue.

[RESOLVED] Re: Issue with pango & arabic

Posted: 2017-02-24T05:59:53-07:00
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