I am using the codeigniter *capctha* helper. The thing is I can not increase the font size of letters. I tried to do it by
if ($use_font == FALSE)
{
$font_size = 6;
$x = rand(0, $img_width/($length/2));
$y = 0;
}
else
{
$font_size = 20;
$x = rand(0, $img_width/($length/1.5));
$y = $font_size+2;
}
but nothing happens, how can change the font size, please help. Thanks in advance.
You are changing the correct parameter, whether in the core file or the application/helpers file.
Double check the font that you are using. Some fonts have one size and that is it. The default font file (texb.ttf) has only one size (? I think...).
I am using the following configuration:
//----- Captcha Implementation -----
$this->load->helper('captcha');
$captchaSetup = array(
'img_path' => './captcha/',
'img_url' => base_url()."captcha/",
'font_path' => './assets/fonts/E004007T.TTF',
'img_width' => 250,
'img_height' => 50,
'expiration' => 7200
);
$capData['cap'] = create_captcha($captchaSetup);
Pick a font file and place it in the fonts folder and try it out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With