mPDF ≥ 5.4
CircularText – Draw a circle using specified text
functionCircularText($x,$y,$r,$text,$align= 'top|bottom',$fontfamily= '',$fontsize= 0,$fontstyle= '',$kerning= 120,$fontwidth = 100,$divider= '')
Draw a circle using specified text. One or both of top-text and/or bottom-text must be defined. The radius andfont-size are user-defined, whilst the width and height of the generated object will be calculated from these values.
From mPDF ≥ 5.6 the CSS propertyfont-size can be set toauto. This automaticallysizes text to fill a semicircle (if both top and bottom set) or a full circle (if only one set).
Circular Text is displayed as though an in-line element. Automatic kerning will be applied to the text ifuseKerningistrue.
Abscissa of center
Ordinate of center
Radius of circle
Text to be printed
Text alignment:'top' or'bottom'.
Default:'top'
$fontfamily
:
$fontsize
:
$fontstyle
:
(Fixed) spacing between letters in percentage.
Default value:120. Zero is not allowed.
Uses automatic Kerning between letters ifuseKerning = true.
Width of letters in percentage.
Default value:100. Zero is not allowed
Optional character string to divide top and bottom text