tags:

views:

30

answers:

1

Hi,

Is it possible the saved text with different styles and colors in the image?

A: 

You may want to rephrase your question a bit. But if I understand you correctly, you want to know whether it is possible to render differently styled text using GD in one image.

This is possible by separating the text into multiple ImageFTText() commands with different fonts and colours.

It gets tricky, though, if you want one word to have different stylings, because then things like Kerning (the correct spacing between character pairs) comes into play. You would have to use ImageFTBBox() to measure the size of each character (or text) to know where to continue with the next one - and even that is not guaranteed to look pretty.

Pekka