title: Invalid file fontname in imagettftext()
body: <p>i tried creating my own captcha library in code igniter, now the library is working fine without code igniter but when i included it with the code igniter it gave this message</p>
  <blockquote>
  <p>A PHP Error was encountered</p>
  <p>Severity: Warning</p>
  <p>Message: imagettftext(): Invalid font filename</p>
  <p>Filename: helpers/cap_helper.php</p>
  <p>Line Number: 13</p>
  </blockquote>
  <p>`</p>
  <pre><code>//now my cap_helper.php looks like this
      header('Content-type: image/jpeg');
      function create_image($fontfile)
      {
          echo $fontfile;
          $text = rand(0,9999);
          $font_size = 30;
          $image_width = 200;
          $image_height = 40;
          $image = imagecreate($image_width,$image_height);
          imagecolorallocate($image, 255, 255, 255);
          $text_color = imagecolorallocate($image, 0, 0, 0);
          imagettftext($image, $font_size, 0, 15, 30, $text_color, $fontfile, $text);
          imagejpeg($image);
      }
  //controller file looks like this
  function __construct()
      {
          parent::__construct();
          $this-&gt;form_validation-&gt;set_error_delimiters('&lt;div class=&quot;alert alert-danger&quot;&gt;','&lt;/div&gt;');
          $this-&gt;load-&gt;model(array('welcome_model'));
          $this-&gt;load-&gt;helper(array('cap'));
      }
      function testing()
      {
          echo '&lt;img src=&quot;'.create_image(base_url().'assets/font.ttf').'&quot;/&gt;';
      }
  </code></pre>
  <p>`
  now my font.ttf file is saved in appname/assets/font.ttf
  what i'm doing wrong?</p>