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.
Bold or Italic Text
Moderator: General Moderators
-
JohnDigweed
- Forum Newbie
- Posts: 18
- Joined: Sun Mar 28, 2004 6:24 pm
- Location: root/user/hell
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.
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.