I want to use Imagick API for PHP instead of runnung command line in my PHP code.
exec("convert -gravity Center -size 200x200 -fill black -font Arial -pointsize 20 pango:\"Hello World!\" output.png");
for above command I have following Imagick API code:
<?php
$img = new Imagick();
$draw = new ImagickDraw();
$draw->setFont("Arial");
$draw->setFontSize(20);
$draw->setGravity( Imagick::GRAVITY_CENTER );
$img->newImage( 200, 200, "black", "png" );
//Pango code for Hello World!
$img->writeImage("output.png");
?>
But I could not find equal method/option for Pango. Do you know how can use Pango in Imagick API?