Ver Mensaje Individual
  #7 (permalink)  
Antiguo 30/12/2007, 01:11
Avatar de lado2mx
lado2mx
Colaborador
 
Fecha de Ingreso: agosto-2001
Ubicación: Veracruz
Mensajes: 3.720
Antigüedad: 25 años, 2 meses
Puntos: 9
Re: embeber font on the fly

Si Oxígeno, creo que ahora entendí la pregunta, a ver deja te doy un buen norte http://mx2.php.net/manual/es/function.imagettftext.php
Código PHP:
  <?php
// Establecer el tipo de contenido
header("Content-type: image/png");

// Crear la imagen
$im = imagecreatetruecolor(400, 30);

// Crear algunos colores
$blanco = imagecolorallocate($im, 255, 255, 255);
$gris   = imagecolorallocate($im, 128, 128, 128);
$negro  = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $blanco);

// El texto a pintar
$texto = 'Probando...';
// Reemplaze la ruta con su propia ruta a la fuente
$fuente = 'arial.ttf';

// Agregar una sombra al texto
imagettftext($im, 20, 0, 11, 21, $gris, $fuente, $texto);

// Agregar el texto
imagettftext($im, 20, 0, 10, 20, $negro, $fuente, $texto);

// Usar imagepng() resulta en texto más claro, en comparación con imagejpeg()
imagepng($im);
imagedestroy($im);
?>