imagettftext(); を使用したテキストのレンダリングに問題があります。どういうわけか、塗りつぶされた長方形が表示されます。エラーはまったくありません。http://postimage.org/image/k61c8xi0n/
- PHP バージョン: 5.3.8
- GD サポート: 有効
- GD版:同梱(2.0.34対応)
- フリータイプのサポート: 有効
- フリータイプ連携:フリータイプあり
- フリータイプ バージョン: 2.4.3
これがコードです。何も変わっていません。フォントパスが機能します。
<?php
header("Content-type: image/png");
$template = imagecreatefrompng("template.png");
imagealphablending( $template, false );
imagesavealpha( $template, true );
$white = imagecolorallocate($template, 255, 255, 255);
imagettftext($template, 20, 0, 100, 50, $white, 'arial.ttf', 'Some text');
imagepng($template);
?>