Buenas,
Tengo este código que escribe sobre una imagen:
Código PHP:
<?php
$callsign = $_REQUEST["callsign"];
$connection = mysql_connect($db_host, $db_username, $db_password);
if (!$connection){
die ("Eror connecting database: <br/>". mysql_error());
}
$db_select = mysql_select_db($db_database);
if (!$db_select){
die ("Database Error: <br/>". mysql_error());
}
$query = mysql_query("SELECT * FROM gvausers WHERE callsign='$callsign'");
$name = mysql_result($query, 0, 'name');
$surname = mysql_result($query, 0, 'surname');
$location = mysql_result($query, 0, 'location');
$hub = mysql_result($query, 0, 'hub_id');
$hours = mysql_result($query, 0, 'gva_hours');
$query = mysql_query("SELECT * FROM hubs WHERE hub_id = '$hub'");
$hub = mysql_result($query, 0, 'hub');
Header("Content-type: image/png");
$im = imagecreatefromPng("./images/signatures/background.png");
$red = ImageColorAllocate($im, 255, 0, 0);
$black = ImageColorAllocate($im, 0, 0, 0);
ImageString($im, 5, 15, 5, "$callsign", $black);
ImageString($im, 5, 15, 20, "$name $surname", $black);
ImageString($im, 5, 15, 35, "Location: $location", $black);
ImageString($im, 5, 15, 50, "HUB: $hub", $black);
ImageString($im, 5, 15, 65, "Hours: $hours", $black);
$font_width = ImageFontWidth(5);
ImagePng($im);
?>
Mi pregunta es, cómo puedo cambiar el tipo de letra que se escribe en la imagen??