Page 1 of 1
Bold or Italic Text
Posted: Mon Apr 12, 2004 11:55 am
by JohnDigweed
Hi,
I am using the image functions in PHP to make text on a background. I am also using imagetfttext. I was wondering, is there a way to make the text Bold or Italic?
Thanks.
Posted: Mon Apr 12, 2004 5:36 pm
by vigge89
i've never figured out, but there aren't any lines on it in the function reference

Posted: Mon Apr 12, 2004 5:55 pm
by JAM
For bold text, you can place the same string over itself one or more times, and with abit of tweaking you get bold text. Difficult, but...
Italics-shortcut... Thats worse. If it's possible to turn the image, write the text and turn the image back again, it might be possible, but you need a loop that loops through each letter in the string for that to work. Just a theory.
However,
http://www.lerdorf.com/tips.pdf shows you (abit down in that file) examples, where they use fonts that are themselves bold or italic. ArialBold and ArialItalic I belive exists. An idea if you don't need to stick with a certain font...
Hope that helped.