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
[edit] Last updated: Fri, 24 Feb 2012

view this page in

imagepsloadfont

(PHP 4, PHP 5)

imagepsloadfontCarrega uma fonte PostScript Type 1 a partir de um arquivo

Descrição

resource imagepsloadfont ( string $filename )

Carrega uma fonte PostScript Type 1 do dado filename.

Parâmetros

filename

Valor Retornado

Se tudo for feito corretamente, um índice de fonte válida será retornado e poderá ser usado para vários propósitos. Caso contrário a função retorna FALSE.

Exemplos

Exemplo #1 Exemplo da imagepsloadfont()

<?php
header
("Content-type: image/png");
$im imagecreatetruecolor(35045);
$black imagecolorallocate($im000);
$white imagecolorallocate($im255255255);
imagefilledrectangle($im0034944$white);
$font imagepsloadfont("bchbi.pfb"); // or locate your .pfb files on your machine
imagepstext($im"Testing... It worked!"$font32$white$black3232);
imagepsfreefont($font);
imagepng($im);
imagedestroy($im);
?>

Notas

Nota: Esta função somente está disponível se o PHP estiver compilado com --with-t1lib[=DIR] .

Veja Também



add a note add a note User Contributed Notes imagepsloadfont
seymour at itsyourdomain dot com 11-Feb-2004 05: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.

 
show source | credits | sitemap | contact | advertising | mirror sites