Using GD to write bold and/or italic text

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
starsol
Forum Newbie
Posts: 24
Joined: Thu Jul 31, 2003 8:30 am
Location: Norfolk, England.
Contact:

Using GD to write bold and/or italic text

Post by starsol »

I'm using imagettftext to write text on top of an image - and it all works well for normally formatted text. Unfortunately I can't seem to find how to bold or italicse this text - can anyone give me a pointer as to how to accomplish this?
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

You need to have the bold or italic font file that is associated with the font. :)
starsol
Forum Newbie
Posts: 24
Joined: Thu Jul 31, 2003 8:30 am
Location: Norfolk, England.
Contact:

Post by starsol »

Thanks Jenk :) - to clarify - if I for example want to use Arial.ttf, I would need to find something along the lines of ArialItalic.ttf and use that instead?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yes.
Post Reply