CFImage Captcha Error on not finding Fonts Need Help


CFImage Captcha Error on not finding Fonts Need Help

Posted by Luis Majano
Nov 19, 2008 00:00:00 UTC
I have a vm running ubuntu with CF 8.01 and I am testing cfimage to create a captcha and it fails on linux but not on my windows and mac boxes. The error I get is the following:

The VERDANA,ARIAL,TIMES NEW ROMAN,COURIER font name is/are not supported. The problem is that this works on windows and mac? Here is the code?

text="#arguments.text#"

width="#arguments.width#"

height="#arguments.height#"

fonts="verdana,arial,times new roman,courier" />

I checked on the CF admin, and all of the fonts are installed. So why do I get this on Linux based cf? Any ideas?


Jim Priest

I can't imagine - but could it be a case sensitivity issue? verdana vs. Verdana?

Haven't messed with the CFImage tag on Linux yet...

Jim Priest

And is this failing on server or client? Those fonts aren't installed on Linux by default if I remember right.

Luis Majano

Thanks Jim,

I have tried it all and nothing. How I made it work, was by removing the fonts attribute. However, then I have to make an exception when this runs in linux vs other OS's.

I was hoping the list could be generic enough.

Any ideas?

Francois Levesque

I remember getting a message when installing CF8 on my Ubuntu box about a required C++ package. It also said something about some tags having issues if it wasn't installed, including cfimage. I believe the package was libstdc++6 (or 5).

Steven Erat

I just tested CF801 on RedHat Ent 5 and it worked fine. I checked fonts on the system using xlsfonts and also by simply looking at the font list when editing the terminal font. The terminal font list showed fonts in mixed case, and xlsfonts showed fonts as all lower case. I tried both, all lower and the exact mixed case. So, "URW Bookman L" worked, as did "urw bookman l". My system did not have verdana nor times new roman, but it did have courier and using the font list in your example worked because it found courier eventually.

Aaron West

Luis et al, I also just ran into this issue when deploying a brand new site to a new Ubuntu 8.04TLS VPS. My code was creating a captcha with the font attribute new to Times New Roman. I simply removed the attribute and all was good.

As far as the C++ package goes, yea libstdc++.so.5 is required by ColdFusion 8 but isn't included with a base Ubuntu 8 build. To get the package simply run "apt-get install libstdc++5" then rerun the installer.