src/Captcha/Captcha.php
public function setFont( $key, $font )
	{
		#	Set Fonts
	
		if( $key != 'background_text' && $key != 'front_text' )
			throw new CaptchaException( __METHOD__ . '($key, ) $key must be background_text or front_text.' );
		
		# check font file existence
		$font_file = Config::get( 'images.captcha.font_dir' ) . DIRECTORY_SEPARATOR . $font;

		if( !file_exists( $font_file ) )
			throw new CaptchaException( __METHOD__ . "( , $font) provided font file '$font_file' doesn't exists." );

		$property = '_' . $key;

		$this->{$property}['font'] = $font_file;

		return $this;
		# Method End
	}
public function setFont( $key, $font )
	{
		#	Set Fonts
	
		if( $key != 'background_text' && $key != 'front_text' )
			throw new CaptchaException( __METHOD__ . '($key, ) $key must be background_text or front_text.' );
		
		# check font file existence
		$font_file = Config::get( 'images.captcha.font_dir' ) . DIRECTORY_SEPARATOR . $font;

		if( !file_exists( $font_file ) )
			throw new CaptchaException( __METHOD__ . "( , $font) provided font file '$font_file' doesn't exists." );

		$property = '_' . $key;

		$this->{$property}['font'] = $font_file;

		return $this;
		# Method End
	}
public function setFont ( $ key , $ font ) { #	Set Fonts if ( $ key != 'background_text' && $ key != 'front_text' ) throw new CaptchaException ( __METHOD__ . '($key, ) $key must be background_text or front_text.' ) ; # check font file existence $ font_file = Config :: get ( 'images.captcha.font_dir' ) . DIRECTORY_SEPARATOR . $ font ; if ( ! file_exists ( $ font_file ) ) throw new CaptchaException ( __METHOD__ . "( , $font) provided font file '$font_file' doesn't exists." ) ; $ property = '_' . $ key ; $ this -> { $ property } [ 'font' ] = $ font_file ; return $ this ; # Method End }
Set Captcha Font
@param string $key  define which text we want to set it's font
@param string $font font file name
Set Captcha Font