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

search for in the

imagepsslantfont> <imagepsfreefont
Last updated: Fri, 14 Aug 2009

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

Chemin vers le fichier de police Postscript.

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
// Création d'une nouvelle image
$im imagecreatetruecolor(35045);

// Alloue les couleurs et remplit l'arrière-plan
$black imagecolorallocate($im000);
$white imagecolorallocate($im255255255);
imagefilledrectangle($im0034944$white);

// Charge une police, écrite dans l'image et libère la mémoire
$font imagepsloadfont("bchbi.pfb");
imagepstext($im"Test... Ca marche !"$font32$white$black3232);
imagepsfreefont($font);

// Affichage de l'image
header('Content-type: image/png');

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 01: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, 14 Aug 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites