Question

I wanted to localize my app to my Tamil language. I was disappointed that Java supports only Hindi out of all Indian Languages "out of the box."

I searched the internet for some workaround. I learnt from John O'Conner's blog post and Naotoj Sato's blog post that I've to use a technique called "Font Fallback."

I manually copied the "LATHA.TTF" Tamil font available for Windows to /jre/lib/fonts/fallback directory.

It worked! But how can I copy the font programmatically to my users' /jre/lib/fonts/fallback directory?

I thought to add a code that will copy the included font to that fallback directory during the first launch and if it is not already there. Will it cause any permission problems like "Write access denied" to that folder or something?

Or is there a way to make the app search for the fallback font to application directory instead of /jre/lib/fonts/fallback?

Note that the app will have to use this LATHA font only when Tamil language is selected and default font for all other languages.

Please give your opinions.

Was it helpful?

Solution

There seems to be no way to programmatically copy the fallback font to jre if it is in system location without admin rights. It works only if the jre is in some other location. So I have finally decided to put a readme file asking users to copy the font manually if they want it. Expecting Java to support Tamil by default soon.

Hope this will be useful for anyone searching for something like this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top