October 8, 2006
GD TTF PCDTR in PHP
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 Portland, OR. I'm married to an awesome lady and we have two weird little pugs. I do a weekly comedy podcast and make dumb songs with this guy Ben. I don't post to this blog very often, and very few people actually read it. If you'd like to find out more about my fascinating life, check this stuff out:
Stuff
Visit my sites
Visit my friends
Latest posts
Categories
- art
- audio
- baseball
- bikes
- books
- browsers
- complaints
- crime
- death
- dumb things
- energy
- environment
- family
- friends
- gadgets
- internet
- life
- los angeles
- marriage
- movies
- music
- mysql
- new york
- os x
- pasadena
- photos
- php
- plugins
- podcasting
- politics
- portland
- pugs
- rss
- ruby
- splideo
- subversion
- ubuntu
- 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.