zápis vlastním fontem - imagettftext()
Chtěl bych zapsat text vlastním fontem. Našel jsem, že se to dělá funkcí imagettftext. když napíšu toto, zobrazí se:
Warning: imagettftext() expects parameter 6 to be long, string given in C:\wamp\www\pismo\goethe.php on line 14.
Řádek 14 je imagettftext($obrazek...
<?php
//papametry
$obrazek = imagecreate(400, 200);
$velikost = "20";
$sklon = "0";
$pozice_x = "222";
$pozice_y = "333";
$barva = "navy";
$font = "Goethe.ttf";
$text = "tento text je font Goethe.ttf";
//vypis
imagettftext($obrazek, $velikost, $sklon, $pozice_x, $pozice_y, $barva, $font, $text);
?>
vloženo z ICQ (LaKr) (Kráťa)
Barvu používej tak, jak se používat má, tudíž imagecolorallocate:
Dále si nezvykej psát čísla jako $foo = "255";, lepší je to napsat jako číslo ve tvaru $foo = 255;