PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

imagepsslantfont> <imagepsfreefont
Last updated: Fri, 10 Oct 2008

view this page in

imagepsloadfont

(PHP 4, PHP 5)

imagepsloadfontCharge une police PostScript Type 1 depuis un fichier

Description

resource imagepsloadfont ( string $filename )

Charge une police PostScript Type 1 depuis le fichier filename .

Liste de paramètres

filename

Valeurs de retour

En cas de succès, imagepsloadfont() retourne un index de police, qui pourra être utilisé pour des opérations ultérieures. Sinon, imagepsloadfont() retournera FALSE.

Exemples

Exemple #1 Exemple avec imagepsloadfont()

<?php
header
("Content-type: image/png");
$im imagecreatetruecolor(35045);
$black imagecolorallocate($im000);
$white imagecolorallocate($im255255255);
imagefilledrectangle($im0034944$white);
$font imagepsloadfont("bchbi.pfb"); // ou bien situez un de vos fichiers .pfb
imagepstext($im"Test ... Ca marche!"$font32$white$black3232);
imagepsfreefont($font);
imagepng($im);
imagedestroy($im);
?>

Notes

Note: Cette fonction n'est disponible que si PHP est compilé en utilisant --enable-t1lib[=DIR].

Voir aussi



add a note add a note User Contributed Notes
imagepsloadfont
seymour at itsyourdomain dot com
12-Feb-2004 02:45
I had to use a full path to the font file or else I received errors from t1lib. Using just a filename, I received error 14. Using ./filename I received error 2.

imagepsslantfont> <imagepsfreefont
Last updated: Fri, 10 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites