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

search for in the

imagepsfreefont> <imagepsencodefont
[edit] Last updated: Fri, 23 Mar 2012

view this page in

imagepsextendfont

(PHP 4, PHP 5)

imagepsextendfontBir PS yazı tipini genişletir veya daraltır

Açıklama

bool imagepsextendfont ( resource $yazıtipi , float $katsayı )

yazıtipi tanıtıcısı ile belirtilen PS yazı tipini genişletir veya daraltır; katsayı birden büyükse genişletir, küçükse daraltır.

DeÄŸiÅŸtirgeler

yazıtipi

imagepsloadfont() tarafından döndürülen bir yazı tipi özkaynağı.

katsayı

Yazı tipi genişlik çarpanı. Sıfırdan büyük olmalıdır.

Dönen Değerler

Başarı durumunda TRUE, başarısızlık durumunda FALSE döner.

Örnekler

Örnek 1 - imagepsextendfont() örneği

<?php
//Bir .pfb yazı tipi dosyası yükleyelim
$font imagepsloadfont('./px3l.pfb');

// Yazı tipini 2.5 kere geniÅŸletiyoruz
imagepsextendfont($font2.5);

// Burada yazı tipini kullanıyoruz


// Ä°ÅŸimiz bitince yazı tipine ayrılan belleÄŸi serbest bırakıyoruz
imagepsfreefont($font);
?>

Notlar

Bilginize: Bu işlev sadece, PHP, --with-t1lib[=DİZİN] seçeneği ile derlenmişse kullanılabilir.



add a note add a note User Contributed Notes imagepsextendfont
admin at studio-gepard dot pl 02-Dec-2009 07:17
It is impossible to use this function with a TrueType (.ttf) fonts.You need to convert font to PostScript Type1 (.pfb) on your own (google - there are free converters too)
Pascal@TeamX 20-May-2003 09:28
Just for the less experienced PHP-Hackers, like me ;-) …

header("Content-type: image/png");
$text = "hello world";
$val = 1.2;
$font = imagepsloadfont(" path to font ");
$im = imagecreate(200, 200);
$color_bg = imagecolorallocate($im, 255, 255, 255);
$color_font = imagecolorallocate($im, 0, 0, 0);
imagefill($im, 0, 0, $color_font);

imagepsextendfont($font, $val);

$bound = imagepstext($im, $text, $font, 25, $color_bg, $color_font, 10, 100, 0, 0, 0, 4);
imagepng($im);
imagedestroy($im);

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