The Imagick class
PHP 手册

Imagick::setFont

(PECL imagick 2.1.0)

Imagick::setFontSets the image bias for any method that convolves an image

说明

bool Imagick::setFont ( string $font )
Warning

本函数暂无文档,仅有参数列表。

Warning

本函数是实验性的。本函数的行为,包括函数名称以及其它任何关于本函数的文档可能会在没有通知的情况下随 PHP 以后的发布而改变。使用本函数风险自担。

Sets object's font property. This method can be used for example to set font for caption: pseudo-format. This method is available if Imagick is compile against at least version 6.3.6-4 of ImageMagick.

参数

font

Font name or a filename

返回值

Returns TRUE on success.

范例

Example #1 A Imagick::setFont() example

Example of using Imagick::setFont

<?php
/* Create new imagick object */
$im = new Imagick();

/* Set the font for the object */
$im->setFont("example.ttf");

/* Create new caption */
$im->newPseudoImage(100100"caption:Hello");

/* Do something with the image */
?>


The Imagick class
PHP 手册