次のように、imagick read svg text に関する問題が発生しています。
$xmlDoc = new DOMDocument();
$svgroot = $xmlDoc->createElement('svg');
$textnode = $xmlDoc->createElement('text');
$textnode->setAttribute('font-size','24');
$textnode->setAttribute('transform','matrix(3.1054,0,0,3.1054,158.5,0)');
$textnode->setAttribute('font-family','helvetica');
$textnode->appendChild($xmlDoc->createTextNode("eeee"));
$textnode = $svgroot->appendChild($textnode);
$xmlDoc->appendChild($svgroot);
$svgtext = new Imagick();
$svgtext->setbackgroundcolor('#00000000');
$svgtext->readImageBlob($xmlDoc->saveXML());
readImageBlob 関数の最後の行で例外がスローされます (「helvetica」フォントは既に windows/fonts にインストールされています)。それは言います:
Uncaught exception 'ImagickException' with message 'must specify image size `C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/magick-270886DDFFPHkGTr' @ error/mvg.c/ReadMVGImage/185' in C:\xampp\htdocs\opencart\imagicktest.php:106 Stack trace: #0 C:\xampp\htdocs\opencart\imagicktest.php(106): Imagick->readimageblob('<?xml version="...') #1 {main} thrown in C:\xampp\htdocs\opencart\imagicktest.php on line 106
このバグは Windows Server 2003 でのみ発生します。winXP で imageMagic を実行すると、この例外は発生しません。このバグはhttps://bugzilla.redhat.com/show_bug.cgi?id=193474と似ていると思います
windows2003 は imagick render svg フォントをサポートするために何かをインストールする必要がありますか?