Google

NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.73 ">

ImagePSLoadFont

(PHP 3>= 3.0.9, PHP 4 )

ImagePSLoadFont -- Charge une police PostScript Type 1 depuis un fichier.

Description

resource imagepsloadfont ( string filename)

Au cas où tout a bien marché, un index de police va être retourné, et pourra être utilisé pour des opérations ultérieures. Sinon, la fonction retourne FALSE et affiche un message décrivant ce qui est erroné.

<?php
  header("Content-type: image/jpeg");
  $im =    imagecreate(350, 45);
  $noir =  imagecolorallocate($im, 0, 0, 0);
  $Blanc = imagecolorallocate($im, 255, 255, 255);
  $font =  imagepsloadfont("bchbi.pfb");
  imagepstext($im, "Test ... Ca marche!", $font, 32, $white, $black, 32, 32);
  imagepsfreefont($font);
  imagejpeg($im, "");
  imagedestroy ($im);
?<

Voir aussi imagepsfreefont().