Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
// autofit_text_to_image() example
$canvas_image_filename = 'quote_canvas.png';
$dest_filename = 'quote.jpg';
$text = 'I believe in pink. I believe that laughing is the best calorie burner. I believe in kissing, kissing a lot.';
$font_file = 'Cedarville-Cursive.ttf';
autofit_text_to_image($canvas_image_filename, $dest_filename, $text, 60, 500, 400, 40, 400, $font_file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment