As far as I know, you have to deal with that yourself.
array Imagick::queryFontMetrics(ImagickDraw $draw, string $text); will give you some information about the text. It contains 'textWidth' among other things. foreach over the array to see what it contains.
Then the simples way is probably something along the lines of
$im = new Imagick();
$draw = new ImagickDraw(); // also obviously have to set font and font size
$text = "some very long text";
$words = explode(' ', $text);
$maxWidth = 100;
$line = '';
$lines = array();
for ($i = 0; $i < $words; ++$i) {
$prop = $im->queryFontMetrics($draw, $line . $words[$i]);
if ($prop['textWidth'] <= $maxWidth) {
$line .= $words[$i];
}
else {
$lines[] = $line;
$line = '';
}
}
/* Do note that the above won't deal with splitting words that are too long to
fit on one line. */
/* You can use $prop['fontHeight'] (or something like that) and iterate over the
$lines array yourself, adjusting the y offset for where to draw each line of
text, but Imagick can handle that if you just insert line feeds "\n" */
$text = implode("\n", $lines);
Also, you might want to have a look at Miko's blog for a decent amount of easy to follow Imagick tutorials.