何らかの理由で、PHPのimagettftextは、斜めにテキストを作成すると、見栄えの悪いテキストを作成します。
ソースコードの下。レピュテーションポイントが足りないため、画像を投稿できませんが、文字の一部が途切れているように見えます。
ヘルプ!!!
$text = 'My Text Is Messed Up!!!';
$font = './fonts/arial.ttf';
$font_size = 20;
$font_multiplier = 0.5;
$x=10;
$y=190;
$angle=45;
$width= ($font_size * $font_multiplier) * strlen($text);
echo $width;
$height=200;
$size = imageTTFBBox($font_size, $angle, $font, $text);
$img = imageCreateTrueColor($width, $height);
imageSaveAlpha($img, true);
ImageAlphaBlending($img, false);
$transparentColor = imagecolorallocatealpha($img, 200, 200, 200, 127);
imagefill($img, 0, 0, $transparentColor);
$white = imagecolorallocate($img, 255, 255, 255);
// Add the text
imagettftext($img, $font_size, $angle, $x, $y, $white, $font, $text);
// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($img, 'welcome-phrase.png');
imagedestroy($img);
編集:これが出力の例です(テキストの色を白から黒に変更して、白い背景に表示されるようにしました-AG):