I upgraded to the latest version and I forgot about the font inside. I just replaced the whole captcha directory like I was doing with every other module. I didn't discover my mistake until someone started complaining to me about not able the get pass the captcha.

It would be nice if we can install fonts in sites/default/files/captcha, or for multisite, in sites/domain/files/captcha, then on future module upgrade, we can just replace directory without having to deal with saving the fonts.

Comments

soxofaan’s picture

Status: Active » Fixed

You can do that already.
Image CAPTCHA searches for fonts in the fonts directory of the image CAPTCHA module and in the the Drupal files directory.

UnicornSong’s picture

Hi.
I have tried adding verdana.ttf to drupal\files, drupal\files\fonts, drupal\files\captcha, drupal\sites\default\files, drupal\sites\default\files\fonts but cannot get captcha to find it.

Could you please specify exactly where i can put this font that is NOT inside the module directory?

mattyoung’s picture

You should put the .ttf files in the files directory of your site where ever that is depending on whether you use multisite or not. If you are not using multisite, then it's 'sites/default/files' inside your drupal install directory. The sure way is to locate your settings.php file, right next to it in the same directory is your files directory. Copy the .ttf files to there.

soxofaan’s picture

The files directory depends on your Drupal configuration: see Administer > Site configuration > File system (example.com/?q=admin/settings/file-system). You can put your font directly in that directory or in a subdirectory.

You can also upload a font by enabling the upload module (part of drupal core) and uploading it as attachment of a node, the font will then automatically end up in the directory described above.

UnicornSong’s picture

i have multisite setup where each site files folder is drupal\files\sitename
adding the ttf into the drupal\files\sitename works thanks.
It does not appear to be possible to have it in drupal\files for all sites to use?

soxofaan’s picture

It does not appear to be possible to have it in drupal\files for all sites to use?

no, with Drupal 6 and lower, you can only have one files directory. There are some people are working on multi-file-directory stuff, but that will be only for future versions of Drupal, or maybe you find some contrib modules that make this possible.

mattyoung’s picture

>no, with Drupal 6 and lower, you can only have one files directory

You can add a config parameter to point to a directory in which to search for ttf file. That way, multisite install can just point to 'site/default/files' and have font shared in one place.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.