title: PHP GD gives error
body: <p>Update: TTF file seems to be there after testing.
  Update: changed to a relative path for the font file.  Still doesn't work.</p>
  
  <p>I get the following error when I try to make an image using GD through PHP.  </p>
  
  <blockquote>
    <p>[Tue Sep 01 19:44:15 2009] [error]
    [client <em>IP ADDRESS</em>] PHP Warning: 
    imagettftext() [function.imagettftext]:
    Could not find/open font in
    /www/vhosts/website.com/htdocs/trial/TextToImage.class.php
    on line 38</p>
  </blockquote>
  
  <p>I changed the path for the font as it was giving me the same error.  I added the font to the server by dropping the file into the folder.  What am I missing?</p>
  
  <pre><code>/**
   * @name                    : makeImageF
   *
   * Function for create image from text with selected font.
   *
   * @param String $text     : String to convert into the Image.
   * @param String $font     : Font name of the text.
   * @param int    $W        : Width of the Image.
   * @param int    $H        : Hight of the Image.
   * @param int     $X        : x-coordinate of the text into the image.
   * @param int    $Y        : y-coordinate of the text into the image.
   * @param int    $fsize    : Font size of text.
   * @param array  $color       : RGB color array for text color.
   * @param array  $bgcolor  : RGB color array for background.
   *
   */
  public function makeImageF($text, $font="/www/vhosts/website.com/htdocs/trial/CENTURY.TTF", $W=200, $H=20, $X=0, $Y=0, $fsize=18, $color=array(0x0,0x0,0x0), $bgcolor=array(0xFF,0xFF,0xFF)){
  
      $this-&gt;im = @imagecreate($W, $H)
          or die("Cannot Initialize new GD image stream");
  
      $background_color = imagecolorallocate($this-&gt;im, $bgcolor[0], $bgcolor[1], $bgcolor[2]);        //RGB color background.
      $text_color = imagecolorallocate($this-&gt;im, $color[0], $color[1], $color[2]);            //RGB color text.
  
      imagettftext($this-&gt;im, $fsize, $X, $Y, $fsize, $text_color, $font, $text);
  }
  </code></pre>