cgm-util:
Utilizá
imagettftext() en lugar de
imagestring()
simplemente tenes que buscar una fuente TTF apropiada.
el tamaño se define en el 2º parámetro de
imagettftext()
Código PHP:
Ver original<?php
function randomText($length) {
$pattern = '1234567890abcdefghijklmnopqrstuwxyz';
for($i=0;$i<$length;$i++) {
$key .= $pattern{rand(0,35)}; }
return $key;
}
$fuente ="Swiss721CondensedBT.ttf";
$_SESSION['tmptxt'] = randomText(6);
//imagestring($captcha, 5, 10, 7, $_SESSION['tmptxt'], $colText);
imagettftext($captcha, 25, 3, 20, 35,$colText, $fuente, $_SESSION['tmptxt']);
header("Content-type: image/gif"); ?>
Demo:
http://foros.emprear.com/php/captcha/cap2.php
Saludos