Sözdizimi:int Imagick::getFont (void)
Parametreler:Bu işlev parametre yok.
Dönüş Değeri:Bu işlev, başarılı olduğunda yazı tipi dosyasının adresini içeren bir dize döndürür. Aşağıdaki program, PHP`deki
Imagick::getFont() işlevini göstermektedir:
Program 1:
// Yeni bir imagick nesnesi oluşturun
$imagick
=
new
Imagick();
// Yazı tipini yükleyin - emin olun
// karşılık gelen .ttf dosyası
// aynı klasörde mevcuttur.
$imagick
-> setFont (
` Windsong.ttf`
);
// Yazı tipini alın
$font
= $imagick
-> getFont();
echo
$font
();
?>
Çıktı:/home/username/php/Windsong.ttf
Program 2:
// Yeni bir imagick nesnesi oluştur
$imagick
=
yeni
Imagick();
// Yazı tipini kurun - emin olun
// ilgili .ttf dosyası
// aynı klasörde mevcuttur.
$imagick
-> setFont (
`FFF_Tusj .ttf`
);
// Yazı tipini alın
$font
=
$imagick
-> getFont();
echo
$font
();
?>
Çıktı:/home/username/php/FFF_Tusj.ttf
Bağlantı: https://www.php.net/manual/en/imagick.getfont.php