0

I am trying to develop a phone gap application with malayalam language but it is not showing in web-kit browser. anyone have answer for this?

ajaylouis
  • 247
  • 1
  • 4
  • 18

3 Answers3

1

Not all android phone does not support Malayalam Unicode font, and you need to convert Unicode font to ascii font to display Malayalam in all devices.

this may help in your condition.

  1. First you need to convert Unicode font characters to Ascii font using java code(Use any Unicode font like ML_TTKARTHIKA.ttf).

  2. use @fontface font attribute in html to display ascii font to Malayalam characters

For more help: Refer this question

Community
  • 1
  • 1
Nithin CV
  • 1,046
  • 9
  • 23
  • :) notification triggered me to awake. Check this link for more details. this will help you. http://wiki.smc.org.in/Payyans#For_Developers – Nithin CV Apr 07 '15 at 14:49
  • Can it be possible only using cordova. i.e html + js – kirant400 Aug 15 '15 at 12:11
  • @kirant400 : I dont get your question exactly. Fontface is an HTML5 std. If your android browser supports it it will work. OR you can use chromium web view using any plugins like Crosswalk. I not expert in it but check this link for more info. http://blog.appgyver.com/heartbeat/steroids/android-chromium/ – Nithin CV Aug 17 '15 at 05:05
  • From Android 4.1 version, Chrome became the default browser, and it support all major HTML5 stds. – Nithin CV Aug 17 '15 at 05:22
  • 2 issues That I am facing using phonegap. 1. If I use ascii then I can display English if the text has a mix of malayalam and english 2. Converting to ascii is done using java code. Phonegap is purly js and html. I tried fontface for unicode but it does not change in webview embedded in phonegap(cordova) But it is changing the ascii characters. – kirant400 Aug 17 '15 at 05:36
  • @kirant400 Can you please look in to the link provide in answer by me. Check its working. – Nithin CV Aug 17 '15 at 05:58
  • 1
    it is working I have modified the code and uploaded to github https://github.com/kirant400/android-webview-malayalam-font-family – kirant400 Sep 19 '15 at 02:53
  • Thanks for sharing the it :) – Nithin CV Sep 21 '15 at 11:38
0

You need to have a unicode font that has the malayalam characters (one of these, for example) and generate the webfont support for it.

Add the font and the webfont style to the css folder in your project. Load them in the index.html and add the font to the css body declaration.

Vlad Stirbu
  • 1,732
  • 2
  • 16
  • 27
  • I am also having the same problem.I have added the malayalam font using font-face in style sheet,then applied that font for the content div.But its not rendering properly. – AloSwift Sep 27 '13 at 06:46
  • @ajay : if you find any solution please share :) – AloSwift Sep 27 '13 at 06:46
0

unicode fonts will render properly in cordova webview

just add this in html header <meta charset="utf-8" />

rashidnk
  • 4,096
  • 2
  • 22
  • 32