VOOZH about

URL: https://www.geeksforgeeks.org/php/php-gmagickdraw-setfont-function/

⇱ PHP | GmagickDraw setfont() function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

PHP | GmagickDraw setfont() function

Last Updated : 23 Jan, 2020
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
Comment