We can't package TTF fonts with the image_captcha module, but the PHP image library has some simple bitmap fonts built in.
This patch makes the image_captcha module to use a built-in font as default.
This approach is more user friendly, because the image_captcha module now works out of the box. A warning is issued however that the built in font is not recommended because of its small size.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | builtinfont_3.patch | 8.6 KB | soxofaan |
| #7 | image_captcha.module.rej_.txt | 4.16 KB | robloach |
| #5 | builtinfont_2.patch | 8.55 KB | soxofaan |
| builtinfont.patch | 8.46 KB | soxofaan |
Comments
Comment #1
robloachThis patch wasn't working for me.... Didn't render anything, either in the settings page, or the examples page.
Comment #2
soxofaan commentedhmm,
any error messages/warnings? also check watchdog log
Comment #3
robloach.... When visiting the examples page.
Comment #4
robloachI had a look at the source and it seems it defaults $font to 'BUILTIN'. What if an empty $font also represents the built in font?
Comment #5
soxofaan commentedwhat about this patch?
difference with previous patch: I just changed
to
So that the error message makes more sense ;)
Comment #6
soxofaan commentedComment #7
robloachHrmmm, a couple sections were rejected. Might need a rebuild...
Comment #8
soxofaan commentednew version of patch (against image_captch.module v 1.1.4.19)
Comment #9
robloachTested on a Windows machine and it works.
Comment #10
soxofaan commentedAny idea why it didn't work for you in #1?
nothing special changed compared with the original patch as far as I know.
Comment #11
robloachReally not sure, might've been a variable setting I had, not sure.
Comment #12
robloachCommitted.
Comment #13
(not verified) commented