which font is most suitable for Android application developed in Marathi/ Hindi indian language. I tried with mangal and droidsansfallback but still the words dont appear as they should. I don't see the boxes or some special characters after using above font which is good, but still the marathi/hindi words doesnt have exacts alphabets. Any help/guidance will be appreciated. Thanks....
As Devanagari 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(), MarathiFont);
text_view.setTypeface(font);
text_view.setText("मराठी");
the same way u can give support for hindi....
Marathifont = any marathi or devanagari font
e.g
Marathifont = "kiran.ttf"
Devnagari fonts are not supported in older devices. You can replace the default font after rooting the device. mangal font worked pretty well for me.
Fontoosh can be helpful for installing devnagari font or replacing the font.
I think you should use Google Noto Fonts.
Just search for Hindi/Marathi and you will get fonts for it.
Noto Sans Devanagari is good.
Related
I want to use android system font to show Chinese text.
I use
var fonts = Font.GetOSInstalledFontNames();
to log what fonts are in device. I find this Noto Sans CJK TC.
But I called
font = (Font)Resources.GetBuiltinResource(typeof(Font), "NotoSansTC-Black.ttf");
It always shows The resource NotoSansTC-Black.ttf could not be loaded from the resource file!
How can I use this font in android device.
Thanks
I think what you want is Font.CreateDynamicFontFromOSFont
font = Font.CreateDynamicFontFromOSFont("NotoSansTC-Black", 12);
I want to display certain text in Oriya font in my android app. There is no default support in android for Oriya language. I tried different ttf files for Oriya font but not able to display the content. Can anyone help me in this?
I have tried the following code keeping the oriya.ttf file in my assets folder.
Typeface typeFace=Typeface.createFromAsset(getActivity().getApplicationContext().getAssets(),"fonts/oriya.ttf");
tvSoft.setTypeface(typeFace);
If you want change font in android this is the best solution:
https://github.com/chrisjenx/Calligraphy
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?
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.
First you need to convert Unicode font characters to Ascii font using java code(Use any Unicode font like ML_TTKARTHIKA.ttf).
use #fontface font attribute in html to display ascii font to Malayalam characters
For more help: Refer this question
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.
unicode fonts will render properly in cordova webview
just add this in html header <meta charset="utf-8" />
I developed a Tamil news application in android version 2.3.3. However, Tamil fonts have only been properly developed in android versions 4.0 and beyond. I want to display them in all versions of android mobile.
I tried to solve the problem with some Tamil fonts, such as bamini and mylai, but they only worked in higher android versions.
First of all you have to understand that there is no Tamil Language support in Android OS (except few Samsung & SE mobiles) till ICS(4.0). Even then it had bugs and full support is provided with Jelly Bean (4.2).
You will only see boxes if you use Unicode Tamil font in your app. Reason is there are no Tamil fonts in the system.
1. Manual way of doing
There is a work around for this solution. All you have to do is, download the Bamini font and place it in your assets folder. And create TypeFace with the font Bamini and set it to the TextView.
Typeface font1 = Typeface.createFromAsset(getAssets(), "fonts/Bamini.ttf");
customText1.setTypeface(font1);
Now use a converter to convert Unicode font into Bamini encoding. instead of the Unicode text provide the converted Bamini encoded script into the setText method.
2. Using the Library
If you hate all these manual encoding conversion then check out this library
As I said in above line, if you like to change the encoding dynamically while running the application then consider using the library I wrote for Android. This library will help you to convert Unicode String to Bamini, TSCII, TAB, TAM and Anjal.
Set up is very simple. All you have to do is simply import the library into your Android project and call the library as below.
// Initialise the Typeface (assumes TSCII, Bamini, Anjal, TAB or TAM font located inside assets/fonts folder)
Typeface tf = Typeface.createFromAsset(getAssets(),"fonts/mylai.ttf");
// Initialises the TextView
TextView tv = (TextView)findViewById(R.id.textView1);
//Setting the Typeface
tv.setTypeface(tf);
//Magic happens here ;) encoding conversion
String TSCIIString = TamilUtil.convertToTamil(TamilUtil.TSCII, "வணக்கம் அன்ரொயிட்");
//Setting the new string to TextView
tv.setText(TSCIIString);
There is a sample app available along with the library. Check out the app on how the library is utilised to convert the Unicode String to Bamini, TAB, TAM, TSCII and Anjal.
You would get something like this when you use the library.
You need to make use of the TypeFace class available in Android. You can use either Bamini or TSCII encoding (Mylai is a TSCII font).
Disclaimer : I wrote this library.
3. For WebView
If you are developing using html and CSS wraped inside a WebView then take a look at this application's source. You gonna have to make use of fontface feature of CSS3.
First you need to have style declared as this
#font-face {
font-family: MyCustomFont;
src: url("Bamini.ttf") /* TTF file for CSS3 browsers */
}
Then you gotta use the MyCustomFont in your tags. For example if you wanna set it to the whole body (which is much easier in this case)
body {
font-family: MyCustomFont, Verdana, Arial, sans-serif;
font-size: medium;
color: black
}
Hope this would give you the heads up you deserve. Hope to see more Tamil apps in Play Store.
TAb dont need embedd, now we have unicode
Please use this Tamil unicode fonts
http://visualmediatech.com.fonts
I have trouble with my font.
I need to display plain, bold and italic text in a specific font in the same textView.
I use html.fromHtml and with the regular android font it works fine.
I want helvetica instead, so I built a single font file witch contained the three fonts (plain bold italic), and used setTypeFace on my textView. I built it from 3 otf files with fontBuilder.
But when I call Typeface.createFromAsset(getAssets(), "fonts/HelveticaNeue.dfont");
i saw that my font file size was 0 bytes, and indeed in my project I can't import it well,
when i go in the folder fonts i see that the size is ok, but from eclipse point of view, 0 bytes.
Does somebody have an idea ?
ANSWER:
The problem was that my font didn't had dataFork, it's a thing that you have to add to your font for it to be understood by PC's, and Unix OS.
is it correct format .dfont
i think fonts should be with .ttf
Typeface.createFromAsset(getAssets(), "fonts/HelveticaNeue.ttf")