When you go into the Image Captcha settings, you're presented with a textbox asking you the path of the TrueType font file to use. This isn't really an intuitive solution because most users don't know exact paths, so I turned it into a selection box where you select which font to use. This solution also fixes the problem when there isn't any fonts installed, as it then spits out an error, telling you that some TTF fonts are required.
Please see and review the attached patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | image_captcha_font_selector.patch | 5.61 KB | soxofaan |
| image_captcha_font_select.module.patch | 2.45 KB | robloach |
Comments
Comment #1
soxofaan commentedI was also thinking of this.
But maybe we could also (recursively) scan the drupal "files" directory, which is easier for users to upload a font to.
I didn't test the patch yet
Comment #2
soxofaan commentedYou can do the font listing much easier with the help of drupal's file_scan_directory() function.
I worked some more on your patch (see attachment):
Comment #3
robloachCool.
Comment #4
(not verified) commented