how to make gujrati font supported in android app - android

i'm going make a web site in which i have lots of Gujarati language text.
i found that in many cell phones (Micromax canvas2,etc) Gujarati language is not supported.
so i'm thinking to make a web browser in android which support Gujarati font. so user can use that my web site through my android browser.
plzz help me quickly

Few devices doesn't support Gujarati language packs.
You need to define css and apply it to your webview.
Below post may help you as well.
Android 2.2 webview not supporting Tamil font

Hi Try this this will work fine
TextView mtxt = (TextView) findViewById(R.id.action_settings);
Typeface face1 = Typeface.createFromAsset(getAssets(),
"Lohit-Gujarati.ttf");
mtxt.setTypeface(face1);
mtxt.setText("પૂર્વ વડાપ્રધાન રાજીવ ગાંધીની હત્યા કરનારા 3 આરોપીઓની ફાંસીની સજા સુપ્રિમ કોર્ટે ઉમ્રકેદમાં ફેરવી નાંખી છે.આમ રાજીવગાંધીના" +
"3 હત્યારાઓને હવે ફાંસીની સજા નહી થાય.સુપ્રીમ કોર્ટમાં 3 જજોની બેન્ચે આજે આ ચુકાદો આ");

Related

Rendering HIndi font on Android 2.3 and lower

I am developing an android App in Hindi but find that few characters are misspelled and broken in Hindi the issue is in http://code.google.com/p/ankidroid/issues/detail?id=1008 but no solution there दिप is rendered as दपि
letters in hindi font above are formed as द + ि + प which should display as दिप but It render as दपि
The same question was put earlier but not resolved so I had to repost it again
Correcting Hindi (Unicode) rendering in Android
Finally I found the solution this is very simple just import the font in my case I am developing web app
#font-face { font-family: hindi; src: url('fonts/k010.TTF'); }
body,h1,h2{ font-family:hindi; }
then type text in your a text editor or MS-word using Kruti devi10 font after You finished change the font to Arial and paste the text in your web App and it will render perfectly
you can use Unicode ...
TextView tv=(TextView)findViewById(R.id.textViewmyView);
final Typeface tf = Typeface.createFromAsset(this.getAssets(), "Hindi-SARAL1.TTF");
tv.setText(Html.fromHtml("&# 2367;&# 2342;&# 2346;"));
tv.setTypeface(tf);
unicode value continues no gap.....
and you can also convert world to unicode via this site...http://mylanguages.org/converter.php but in case of इ 1st use unicode of इ then alphabets Unicode...b/c till android version 4.0 Hindi Unicode not supported proper..

Correcting Hindi (Unicode) rendering in Android

I successfully added a custom typeface (DroidSansFallBack.ttf) to show Hindi characters instead of Blocks on Pre ICS . All is working well on 4.1+ in any case.
But the rendering order is wrong on Froyo and Gingerbread.
I understand it is not resolved http://code.google.com/p/android/issues/detail?id=4153
What are the possible workarounds to correct the rendering? (I don't want to use images )
EDIT:
Example,
दिन string from values-hi renders as दनि
नक्षत्र renders as नक् ष त र
(On 4.1+ everything renders correctly)
I have a alternative solution for your problem but not exact...
use font....
Typeface tf = Typeface.createFromAsset(getAssets(),"Hindi-SARAL1.TTF");
for नक्षत्र use .......
TextView tv = (TextView) findViewById(R.id.textView1);
tv.setText("n95");
tv.setTypeface(tf);
and for दिन........ unicode value continues no gap.. i have given a space between &# and 2367;
tv.setText(Html.fromHtml("&# 2367;&# 2342;&# 2344;"));
tv.setTypeface(tf);
I could not find a simple work around for fixing the rendering everywhere. So finally I had to limit the Hindi language feature to devices having android version 4.0 or later.

Android Arabic Language

I'm trying to make an app in Arabic Language for Android 2.2. I write a text to code such as:
البُرتُقال نوع من أنواع الحمضيات وهو مصدر ممتاز لفيتامين سي ويساعد فيتامين (سي) في البرتقال على امتصاص الكالسيوم في الجسم ، كما يحتوي أيضا على فيتامين أ كما أنه مصدر
it is displayed as below:
I mean the letters come separately, and that causes the meaning differences. How can I make the letters display connected?
Edit :
Yes 4.0 has the support for Arabic. Now I have to find a way for 2.2, because the product that I use, runs with 2.2. And I can't implement 4.0 to it easyly. Do you have any suggestion for that?
I found an issue report about Arabic language support. There was a post just 10 hours ago, that Android 4.x adds improved support for reading and writing BiDi text such as Arabic!
You need to use Arabic Reshaper utility
Below are the some links
https://github.com/agawish/Better-Arabic-Reshaper
https://mdictionary.wordpress.com/2011/02/10/connected-arabic-characters-for-android-apps/

textStyle for Tamil font?

I'm already working on an Android application that displays RSS feed.
My problem is that this feed has some lines in Tamil(which Android still doesn't support)
I found a font online that displays the text right(without converting to Bamini) but the problem is that textStyle doesn't have any effect on it.
so you know any font that can do the job or any thing i have to do to make textStyling?
thanks in advance
What you need to do is import custom fonts on to the phone before using them.
A good way to do that is to include them in the package - in the APK file
Hence you should be having the font in your project when you build the APK file.
Let me give you an example. Assuming your tamil font's name is Harabara.ttf and you have copied it to /assets/fonts
Use this method (anywhere in your activity)
private void initializeFonts() {
font_harabara = Typeface.createFromAsset(getAssets(), "fonts/Harabara.ttf");
}
and call this API from your onCreate like this
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initializeFonts();
setContentView(getViewResourceId());
}
Make sure you have declared this class level variable
Typeface font_harabara = null;
Finally, simply use
myTextField.setTypeface(font_harabara);
tada ! tamil font should now start displaying.
nandri vanakkam,
vaidyanathan
There are hundreds of fonts available online. Did you check some TSCII fonts?
I've written some solutions for Tamil and Android issues. Check it out too.

Issue in custom font (RTL labguage)

According to android 2.3 some RTL languages such as Arabic is supported in this new version. However, emulator does not show the fount correctly. In code I have written:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView txt = (TextView) findViewById(R.id.myText);
Typeface font = Typeface.createFromAsset(getAssets(), "Larabieb.ttf");
txt.setTypeface(font);
txt.setTextSize(26);
txt.setText("السلام علیک یا حبیبی");
}
but in the output it shows separated characters instead of connected characters.
How can I connect the characters?
As of this date only Samsung's phones running on android support bidi and display of arabic characters. There is nothing wrong with your code. Open the web browser and browse an arabic website you will see the same problem on non-samsung phones.
you can use this tools
Tools.fa("سلام علیکم");
sample image:

Categories

Resources