October 8, 2006
GD TTF PCDTR in PHP 2
find more posts in: internet, php, ubuntuI’d been having a lot of trouble getting my Ubuntu machine to render TTFs with GD in PHP. So much trouble that I’d even tried crazy things like recompiling PHP. Luckily I found this post on excitris.com and I was able to solve all of my problems with one line of code. Since the code on their site is completely mangled, here it is:
putenv('GDFONTPATH=' . realpath('.'));
Now I can use dynamic text replacement without going insane.
2 Responses
Leave a Reply
My name is Joey Nelson. I'm a web developer living in Raleigh, NC. I'm married to an awesome lady and we have an awesome one year old son. If you'd like to find out more about my fascinating life, check this stuff out:
Track me
Visit my sites
Other stuff
Latest posts
- Google ASCII Art Easter Egg
- Is it so crazy that someone would play VATFUL?
- Now that’s a quesadilla
- Automatically playing audio with HTML5 and Javascript (even on the iPad)
- Prevent console.log() errors
- Tumblin’
- omgtru updates and iPhone web app lessons learned
- Really?
- Easy form hints: HTML5 input placeholders
- Anthem Type
Categories
- apple
- art
- audio
- baseball
- bikes
- books
- browsers
- comedy
- complaints
- crime
- death
- dumb things
- energy
- environment
- family
- fonts
- food
- friends
- gadgets
- games
- henry
- html
- internet
- ipad
- iphone
- itunes
- javascript
- jquery
- life
- los angeles
- marriage
- movies
- msgblorb
- music
- mysql
- new york
- omgtru
- os x
- pasadena
- photos
- php
- plugins
- podcasting
- politics
- portland
- pugs
- rss
- ruby
- splideo
- subversion
- ubuntu
- Uncategorized
- video
- watir
- wordpress
- work
hi,
it seems to be exactly what i am looking for. i am also going crazy, trying to recompile php under ubuntu. i search how to get ttf working under gd using apt-get commands, without success.
i have a question regarding your post. which file do i have to modify? php.ini?
thanks,
pht3k
just put that line in your actual php file above your GD code.