EllisLab text mark
Advanced Search
     
Issue with “font size” - Captcha helper
Posted: 23 September 2012 03:47 AM   [ Ignore ]
Avatar
Joined: 2012-04-02
85 posts

Hey guys,

I just found this little problem with setting the font size for the captcha helper, this is the current code and as it is right now, the font size that user set will never work

if ($use_font == FALSE)
{
        $font_size 
5;
        
$x rand(0$img_width/($length/3));
        
$y 0;
}
else
{
        $font_size 
16;
        
$x rand(0$img_width/($length/1.5));
        
$y $font_size+2;

I just added that piece of code to my project and it works very well, maybe that should be updated for next version of CI.

if(isset($data["font_size"]))
    
$font_size $data["font_size"]//The font size value the user set
else
    
$font_size 16//Default


if ($use_font == FALSE)
{
        
////$font_size = 5;
        
$x rand(0$img_width/($length/3));
        
$y 0;
}
else
{
        
////$font_size = 16;
        
$x rand(0$img_width/($length/1.5));
        
$y $font_size+2;

Hope I explained well… let me know what you think smile

Cheers!