title: Detect if the FreeType PHP extension is installed on the server
body: <p>How do I test to see if the FreeType extension is installed on a server running PHP? </p>
  
  <p>I wanted to make a simple CAPTCHA system on my site, so I used <a href="http://php.net/manual/en/function.imagettftext.php" rel="noreferrer"><code>imagettftext()</code></a> and it worked fine. But what if the server didn't have the FreeType library installed?</p>
  
  <p>So is there a way to somehow detect FreeType library through code, and if it is not present, fall back to something like <a href="http://php.net/manual/en/function.imagestring.php" rel="noreferrer"><code>imagestring()</code></a>?</p>
  
  <p>If I can't use <code>imagettftext()</code> I may have to look at alternatives to draw big font text as the <code>imagestring</code> max size isn't good for something like a CAPTCHA.</p>