hard coder
hard coder

Reputation: 5735

Allowing Hindi fonts in html text area

I have a desktop application in java that converts from literal hindi text to corresponding english translitration. I am using jTextArea in desktop application. Now I want to make a web application for doing the same. My end goal is to have two text areas in html in one of which I can type hindi characters and in other one would show translitration result in english characters at the same time. For Hindi I want to use kruti dev font and Times new roman for english.

Upvotes: -2

Views: 1747

Answers (2)

Shrey Gupta
Shrey Gupta

Reputation: 31

I found a simple solution.

instead of setting

input.value = "Hindi Text";

which shows up as utf-8 notations in textarea, do -

input.innerHTML = "Hindi Text";

It works for me

Upvotes: 0

Franco
Franco

Reputation: 53

Take a look at Cufon: http://cufon.shoqolate.com/generate/

Keep in mind any license issues regarding font usage before making use of a font.

If you want a safe approach, try and find a font you're happy with here: https://www.google.com/fonts

Upvotes: 0

Related Questions