How to display local Indian languages in from unicode? - android

I am trying to display local Indian languages in my application. The data for the application is from web. I use a web service to display the contents from DB. I am converting the data in format of unicode and i receive the unicode in phone. Am trying to display the unicode and also i use the relevant font If telugu i use telugu fonts.
The unicode is displayed but there is spacing problem. To solve this i got a option of reshaping, that is like giving space with fixed codes and got for Arabic but i am now searching for telugu.
My reffered link is:
Refference for Arabic

You can put in HTML codes for the devanagari characters. There are quite a lot of online editors that will give these codes, like:
-> http://www.wandel.person.dk/hindi.html
(A text editor which you can use to write devanagari characters)
-> http://vikku.info/indian-language-unicode-converter/hindi-unicode-converter.html
(An english to hindi text converter)

Use Typeface option. Please see an example below
TextView text = (TextView) findViewById(R.id.text);
Typeface font = Typeface.createFromAsset(getAssets(), "myfont.ttf");
text.setTypeFace(font);

Related

Display marathi font (Indian regional language) in android app

I have been trying to show marathi font using this link in my app. But some how its not working for me. It gives no error but does not show any font in text view. I came to know about internationalization concept when I first tried to do this.
TextView info=(TextView)findViewById(R.id.textview);
Typeface face= Typeface.createFromAsset(this.getAssets(), "fonts/FontAwesome.otf");
info.setTypeface(face);
info.setText("TypeFace");

How to set Gujarati joint word in Android?

I have created an android app, in that I want to set Gujarati joint word.
I use Shruti.ttf font.
I want to print -
નર્સિંગ
But it prints-
નર્ સંગિ
So, how to print proper.
My code is -
TextView tv_guj=(TextView)findViewById(R.id.tv_gujarati);
Typeface font = Typeface.createFromAsset(getAssets(), "Shruti.ttf");
tv_guj.setTypeface(font);
tv_guj.setText("નર્સિંગ");
Please try this sample and copy your text to this sample text view it will work and will show proper result as you want
https://www.dropbox.com/s/6pqg9otcli038ij/HindiFont.zip
Lohit-Gujarati font is working
you can use terafont of gujarati Fontface so it will be implemented.
Thanks

How to display local languages fonts from unicode?

Basically i am creating an app which have multiple languages fonts means english as well as local language(Hindi & some other) fonts. but the problem is it display only english text not the other.Text in other languages shown in rectangle box. I want to show all types of text. please suggest me.
Here is the snapshot
I got my answer. here is the link
This file support all Indian language fonts and english too. Just copy paste this file in assets filder and include in the code
Typeface tf = Typeface.createFromAsset(getAssets(),
"fonts/file_name.ttf");
TextView tv = (TextView) findViewById(R.id.yourtextview);
tv.setTypeface(tf);

Textview properly displaying encoded text

I have an app that read load up a text file and display the text. Now, the text file could be in English, Chinese, or whatever language. My question is, how do I properly display the characters without showing gibberish. Thanks!
refer to this link.
How to display korean text on Textview?
You require a True Type font(ttf) file to support the language you wish. Include the respective font file into your assets folder and try this code.
TextView text = (TextView) findViewById(R.id.textView1);
Typeface font=Typeface.createFromAsset(activity.getAssets(), "your-choice-font.ttf");
holder.text.setTypeface(font);
holder.text.setText(content_read_from_TxtFile);

How do I show Malayalam (an Indian language) on android?

I have an app that must show some Malayalam text. I used some Malayalam fonts and tried to use that through typeface. Though all the characters are shown, some of the symbols are not shown or are displaced. I use android 2.2. Can anyone guide me to solve this problem?
As Malayalam fonts are not supported by Android, you can still give that support to your Application.
For Marathi font copy font file to your asset folder. then use the following code.
TextView text_view = new TextView(this);
Typeface font = Typeface.createFromAsset(getAssets(), "MalayalamFont.ttf");
text_view.setTypeface(font);
text_view.setText("മലയാളം");
the same way u can give support for hindi....
We can add font files to the assets folder and from there we can load it. here is useful link for you..
Display malayalam text in my app

Categories

Resources