I believe I've seen one or more utilities, possibly command-line or Applescript, which will take a string and create, for example, an image containing that text with the specified font size, etc.
I can't find it again. Does anyone have a hint?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityImageMagick doesn't come with OS X, but it should though.
convert -background skyblue -border 10 -bordercolor skyblue -fill 'hsb(10%,50%,50%)' -font /Library/Fonts/Arial\ Narrow.ttf -pointsize 24 label:"some text" output.png
If you have to specify some more complex styles, using webkit2png might be easier.
echo "<style>em {padding:5px}</style><em>Test</em>" > test.html
webkit2png test.html --clipwidth=55 --clipheight=35 --scale 1 -C
/tmp
rather than the desktop, just in case rm fails for some reason and the user sees a new file on their desktop.