Daniel Curran on May 14th, 2011
1 Star2 Stars3 Stars4 Stars5 Stars6 Stars (2 votes, average: 6.00 out of 6)
Loading ... Loading ...

Getting a Warning: imagettftext() [function.imagettftext]: Could not read font error message? Let’s fix it!

If you have a form on a your WordPress website and are trying to prevent spammers  from flooding your site with deals on  – well, you know the kinds of deals they promote, get yourself a “Completely Automated Public Turing Test To Tell Computers and Humans Apart” or a CAPTCHA.  You are undoubtedly familiar with CAPTCHA codes. They look like this:

Personally I’m a big fan of MM Forms so I’ll use that plug-in as my example but the theory is the same no matter what you use.

Easy enough to set-up: download it and FTP into your WordPress PLUGINS directory just like you have done for other plugins. I’ll use Filezilla in my examples. Its a great, FREE FTP program.

But do you do if you load your webpage and you get the dreaded “Warning: imagettftext() [function.imagettftext]: Could not read font…error message? Well you could Google it – but the results are uglyyyyyy. Hopefully I can save you some gray hairs. Here we go:

The directions for MM Forms read:

  1. Upload whole mm-forms-community folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Make following directories writable (chmod 777) /exports/ and /captcha/tmp /upload

Ok Wait . . CHMOD???

Its simple: “The chmod command (abbreviated from change mode) is a Unix command that lets a programmer tell the system how much (or little) access it should permit to a file. It changes the file system modes of files and directories.” Basically, you don’t want people visiting your website to just drill into any folder on your server and be able to run commands, upload files etc.

  1. FTP into your website
  2. Go to the folder you need to change (or check) permissions on.
  3. Right Click on it.
  4. In Filezilla the command to select is “FILE PERMISSIONS” – If you are using a different FTP program look for similar message.

And Ta-Da! Changing from the default of 755 to 777 is as easy as checking two boxes!

 

OK Done! Everything works, right? Oh wait a minute . ..  you load the webpage and get Warning: imagettftext() [function.imagettftext]: Could not read font in . . . error?

Usually this is caused by the permissions being wrong, the font files not being uploaded all the way or the font files being corrupted. Not OK. Let’s fix it!

Try this . .

  1. Find the folder inside the the plugin you are setting up what has the actual font files in it. In our case, its in wp-content/plugins/mm-forms/captcha/gentium
  2. Delete the .TTF and .VFB files. You’ll notice they are quite large compared to the other files in that directory:

And now for Trick #1.

99.9% of the time your FTP program is set to automatically decide how to transfer the files from your computer to the the server. 99.9% of the time you never have to change this setting. Welcome to the .1% of the time when you do.

In Filezilla, Select TRANSFER –> TRANSFER TYPE –> BINARY

Don’t worry about why for, or who what – Just select BINARY.

Trick #2 – upload the TTF and VFB files one at a time. Trust me.

Upload one, wait for it to finish (it will take longer than normal) and then check the filesize to make sure the whole file got to the server.

I repeat: check the filesize to make sure the whole file got to the server.

Repeat for your remaining files.

Cross your fingers.

Reload your webpage.

Sigh in relief. The dreaded Warning: imagettftext() [function.imagettftext]: Could not read font in . . . beast is no more!

And don’t forget to change your transfer mode back to AUTOMATIC!

Problem solved? All I ask for is Beer and Books. Beer and Books. (Kindle versions preferred)

Cheers!

Related Posts:
  • WordPress Error: The server XYZ at Magic Requires a Username and Password.
  • What To Do If You Get An Error 500 – Internal Server Error After Upgrading WordPress
  • WordPress 2.7 Upgrade Error “Cannot redeclare is_sticky()” Sticky Posts
  • 2008-09 San Jose Sharks Hockey Downloadable Schedule
  • 29 Responses to “SOLVED: How To Fix A WordPress Captcha Text Font Error”

    1. Useful information for every Developers.. like iam.. Thanks for this update..

    2. Most of girls love Moncler clothing, they always hope to own one, even dream it at night. This brand clothing is so expensive that they can not afford to buy it. If they can find the cheap Moncler Jackets For Women with high quality at the same time, they are surely very happy. Every girl must dream of Womens Moncler Jackets clothes. If a girl found a place where sell cheap Moncler jackets, Moncler Jackets, she will be very happy.

    3. I read your post . it was amazing.Your thought process is wonderful.The way you tell about things is awesome. They are inspiring and helpful.Thanks for sharing your information and stories.
      iso 9000

    4. he font files not being uploaded all the way or the font files being corrupted.

    5. Usually this is caused by the permissions being wrong, the font files not being uploaded all the way or the font files being corrupted. Not OK. Let’s fix it!

    6. They are inspiring and helpful.Thanks for sharing your information and stories.

    7. If you have a form on a your WordPress website and are trying to prevent spammers from flooding your site with deals on – well, you know the kinds of deals they promote, get yourself a “Completely Automated Public Turing Test To Tell Computers and Humans Apart” or a CAPTCHA. You are undoubtedly familiar with CAPTCHA codes.

    8. If you have a form on a your WordPress website and are trying to prevent spammers from flooding

    9. If you have a form on a your WordPress website and are trying to prevent spammers from flooding your site with deals on – well, you know the kinds of deals they promote,

    10. Its simple: “The chmod command (abbreviated from change mode) is a Unix command that lets a programmer tell the system how much (or little) access it should permit to a file. It changes the file system modes of files and directories.” Basically, you don’t want people visiting your website to just drill into any folder on your server and be able to run commands, upload files etc.

    11. If you have a form on a your WordPress website and are trying to prevent spammers from flooding your site with deals on – well, you know the kinds of deals they promote, get yourself a “Completely Automated Public Turing Test To Tell Computers and Humans Apart” or a CAPTCHA.

    12. Your website to just drill into any folder on your server and be able to run commands, upload files etc.

    13. Usually this is caused by the permissions being wrong, the font files not being uploaded all the way or the font files being corrupted. Not OK. Let’s fix it!

    14. ” Basically, you don’t want people visiting your website to just drill into any folder on your server and be able to run commands, upload files etc.

    15. If you have a form on a your WordPress website and are trying to prevent spammers from flooding your site with deals on – well, you know the kinds of deals they promote, get yourself

    16. ost of girls love Moncler clothing, they always hope to own one, even dream it at night. This brand clothing is so expensive that they can not afford to buy it. If they can find the chea

    17. Its simple: “The chmod command (abbreviated from change mode) is a Unix command that lets a programmer tell the system how much (or little) access it should permit to a file. It changes the file system modes of files and directories

    18. Usually this is caused by the permissions being wrong, the font files not being uploaded all the way or the font files being corrupted.

    19. Personally I’m a big fan of MM Forms so I’ll use that plug-in as my example but the theory is the same no matter what you use.

    20. Folder on your server and be able to run commands, upload files etc.

    21. Personally I’m a big fan of MM Forms so I’ll use that plug-in as my example but the theory is the same no matter what you use.

    22. Personally I’m a big fan of MM Forms so I’ll use that plug-in as my example but the theory is the same no matter what you use.

    23. I’ll use that plug-in as my example but the theory is the same no matter what you use.

    24. It changes the file system modes of files and directories.” Basically,

    25. you have a form on a your WordPress website and are trying to prevent spammers from fl

    26. If you have a form on a your WordPress website and are trying to prevent spammers from flooding your site with deals

    27. Moncler Jackets For Women with high quality at the same time, they are surely very happy.

    28. time you never have to change this setting. Welcome to the .1% of the time when you do.

    29. the font files not being uploaded all the way or the font files being corrupted. Not OK. Let’s fix it!

    Trackbacks/Pingbacks

    Leave a Reply

    You will be able to edit your comment after submitting.