Install Windows Font on Slackware Linux To Fix Railo Captcha

Published: {ts '2012-05-22 00:00:00'}
Author: Steven Neiland
Site Url: http://www.neiland.net/article/install-windows-font-on-slackware-linux-to-fix-railo-captcha/

If you use the captcha cfimage option on a Railo install on linux you may encounter an issue where the captcha text is missing. To fix this you need to install windows fonts. Here is how I did this on Slackware.

Aside: I don't advocate the use of captcha images. I think they are a flawed and outdated solution to the problem of nuisance bots.

Step 1: Copy Windows TTF Files

The first step is obviously to get the standard windows font files. So start up a windows machine and copy all the ttf font files in "c:\windows\fonts\" to a shared location such as a pen drive. Next copy them to your linux box into the fonts directory. On slackware this is located at "/usr/share/fonts/TTF/".

Step 2: Set Permissions

Now run the following commands in this directory to set the required permissions and access settings on these files.

chown root.root *.ttf chmod 644 *.ttf

Step 3: Load Into Slackware

Next we load the new font files into Slackware with these commands.

mkfontscale mkfontdir fc-cache

Step 4: Restart Railo

With the fonts installed restart Railo and the captcha function of cfimage should now be working.