title: Fully looking text when using PHP and imagettftext and angle
body: <p>for some reason PHP's imagettftext creates a funny looking text when I create the text at an angle.</p>
  
  <p>Below the source code. I can't post the image 'cause I don't have enough reputation points but the text looks like parts of the letters are cut off.</p>
  
  <p>Help!!!</p>
  
  <hr>
  
  <pre><code>$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);
  </code></pre>
  
  <p><strong>EDIT:</strong> here's an example of the output (I changed text colour from white to black to make it visible on the white background - AG):</p>
  
  <p><img src="https://i.stack.imgur.com/VpsBM.png" alt="enter image description here"></p>