Changing captcha fonts and font sizes
Submitted by chris on January 11, 2006 - 22:45.
Drupal Modules
To change the font size, edit the value of the variable $charSize in the _captcha_image() function in captcha.module. You have to modify the image size and the initial value of $y as well. My settings for a 48pt font are:
$im = imagecreatetruecolor(320, 160);
$charSize = 48;
$y = 60;
Ref: http://drupal.org/node/24556
Update 08_14_2006: To change the number of character in the image from 4 to 6 to 3 to 4. Make the following change inside the file in the textimage.module.
function _textimage_code() {
$string = drupal_substr($string,0,rand(4,6)); { THIS IS THE LINE TO MODIFY!
$string = drupal_substr($string,0,rand(3,4));
--------------------------------------------------
Create the directory d:\wwwroot\drupal\fonts and copied the file arialbd.ttf
to the new directory (you need the IIS_USER/Or_Apache_Server_User read
permissions on this folder). On the "captcha settings" screen in Drupal
at 'True Type Fonts Path' set to d:\wwwroot\drupal\fontsTo change the font size, edit the value of the variable $charSize in the _captcha_image() function in captcha.module. You have to modify the image size and the initial value of $y as well. My settings for a 48pt font are:
$im = imagecreatetruecolor(320, 160);
$charSize = 48;
$y = 60;
Ref: http://drupal.org/node/24556


delicious
digg
reddit
google
technorati