Yellow text?

June 25th, 2007
No Gravatar

I stumbled over a strange bug on two systems the other day where the imagettftext() function was always writing the text in yellow. No matter how I set the colour, imagecolorallocate($image, 0, 0, 0);, I would always get yellow. Why yellow?

Both systems are Ubuntu, I don’t know if it is a mix up on the libraries from the package, or indeed PHP.

I had to recompile PHP ignoring the –with-ttf option which most docs suggest, and just use the –with-freetype-dir instead. Problem solved.

Bookmark it del.icio.us | Reddit | Slashdot | Digg | Facebook | Technorati | Google | StumbleUpon | Window Live | Tailrank | Furl | Propeller | Yahoo


Was this post useful to you? Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the Linux, PHP category.

Leave a Reply