custom PHP function needed - imagettftext and imagettfbox modification
$30-100 USD
Dibatalkan
Dibuat hampir 12 tahun yang lalu
$30-100 USD
Dibayar ketika dikirim
i'm looking for a custom function along the lines of the following:
**function renderText($string,$font,$font_size=12,$width_limit=600,$line_limit=2,$base_spacing=0,$filename)**
- standard GD functions will be used (imagettftext, imagettfbbox, etc)
- $font is a path to a ttf font file
- $width_limit is the maximum width of the image. line breaks will be added if necessary
- $line_limit is the number of lines of text allowed
- $base_spacing is the spacing between letters. 0 is default
- $filename where the output file will be rendered
- the function will render a png image and return true on success and false if it fails
- if the text wraps to more lines than $line_limit allows, text will be adjusted to $line_limit number of lines, and the spacing between the letters will be lowered as little as possible (by 0.1) until it fits on $line_limit number of lines
- this function is meant for small amounts of text, so it won't be necessary to try to cram what should be 10 lines of text into 2 lines.