Is there a way to fix corrupt myfaces captcha image?

83 Views Asked by At

I'm using JSF myfaces 2.0. The captcha image is corrupted on screen. The OS is RHEL 7.4.

I'm using new OS, RHEL 7.4. I downloaded tomahawk20 sources and debugged the code. Found that captcha text is generated properly in class CAPTCHAImageGenerator.class. However, captcha image is corrupted (geometric shapes in the box like triangle, line, arrow, carrot symbol etc.) on screen.

Expected: Captcha must be readable.

1

There are 1 best solutions below

0
omi0208 On

I solved it on my own. The drawTextOnImage function of CAPTCHAImageGenerator class in tomahawk20 uses Arial font. Pls. install Arial font on your machine and retry. It will work. enjoy!