The
GmagickDraw::setfont() function is an inbuilt function in PHP which is used to set the fully-specified font to use when annotating with text.
Syntax:
GmagickDraw GmagickDraw::setfont( string $font )
Parameters:This function accepts a single parameter
$font which is used to hold the value of font name as string.
Return Value: This function returns GmagickDraw object on success.
Exceptions: This function throws GmagickDrawException on error.
Below given programs illustrate the
GmagickDraw::setfont() function in PHP:
Program 1:
Output:
/home/user/php/roboto.ttf
Program 2:
Output:
👁 Image
Reference: https://www.php.net/manual/en/gmagickdraw.setfont.php