|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Aug 2000
Messaggi: 1209
|
Font bastardo su imagettftext();
Salve,
non riesco ad assegnare un altro font che non sia un nome singolo, se metto "Arial Black" non funziona piu', mi sapete dire come mai ??? Error: ----------------- Warning: imagettftext() [function.imagettftext]: Could not find/open font Codice:
<?
$string = "pippo!!!";
$img = imagecreatefromgif("security_background2.gif");
$colour1 = imagecolorallocate($img, 190, 190, 190);
$colour2 = imagecolorallocate($img, 0, 0, 0);
$font = 'Arial';
$angle = rand(0, 0);
imagettftext($img, 50, $angle, 13, 103, $colour2, $font, $string);
imagettftext($img, 50, $angle, 10, 100, $colour1, $font, $string);
imagegif($img, "myImgOut.gif");
?>
<img src="myImgOut.gif">
oppure : ----------------------------- Esiste un altro modo per creare FISICAMENTE in immagine trasparente contenente la scritta che voglio io con il font che voglio io ??? |
|
|
|
|
|
#2 | |
|
Senior Member
Iscritto dal: Nov 2005
Città: TO
Messaggi: 5206
|
Quote:
E per quanto riguarda gli spazi, c'è una nota sul manuale: When using versions of the GD library lower than 2.0.18, a space character, rather than a semicolon, was used as the 'path separator' for different font files. Unintentional use of this feature will result in the warning message: Warning: Could not find/open font. For these affected versions, the only solution is moving the font to a path which does not contain spaces.
__________________
Andrea, SCJP 5 (91%) - SCWCD 5 (94%) |
|
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Aug 2000
Messaggi: 1209
|
ok, funziona, grazie mille!
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 14:52.




















