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

search for in the

imagepsfreefont> <imagepsencodefont
[edit] Last updated: Fri, 17 May 2013

view this page in

imagepsextendfont

(PHP 4, PHP 5)

imagepsextendfontVergrößert oder komprimiert einen Font

Beschreibung:

bool imagepsextendfont ( int $font_index , double $extend )

Der mit font_index angegebene Font wird gedehnt (extend ist größer als der Font) oder verkleinert (extend ist kleiner als der Font).



add a note add a note User Contributed Notes imagepsextendfont - [2 notes]
up
1
admin at studio-gepard dot pl
3 years ago
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)
up
1
Pascal@TeamX
10 years ago
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 | sitemap | contact | advertising | mirror sites