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
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);
Problem: When implementing a custom font I notice quite a big change in the font size. (Without any altering to the font size in the XML file)
This is causing a significant variation between the Actual font size in comparison to the size shown in the Graphical layout in ADT. (Visually about 20sp smaller)
I am building a timer application and want to use a Digital Looking font.
Question: Can a .ttf file affect the font size relative to a constant 'sp' ?
To answer my own question.
YES. a .ttf file does have a 'base font size' and this may vary from one .ttf to another.
As stated in my comment above:
I figured out how to change the base size of a .ttf using FontForge (fontforge.org) There is a great tutorial on how to do this here: forum.xda-developers.com/showthread.php?t=990853 I did have to play around with more options then noted in the tutorial to get my font just right but it works perfect!
Can anyone please tell me where exactly the Default Text Font size is set in the android framework.When I change the font size using Spare Parts package and reboot my android device, the font size sets to Normal style by default.But I want it to be Extremely Large by default.
Thanks,
Riyaz
If you just want to set font size for the whole phone. Try going to
Settings (Phone) > Accessibility.
Choose Large Text there.
NOTE: I am assuming you just want the font for the phone and not via an app.
You can't change a default font size. You can define a theme, and define a font size in your theme. You can read about defining themes and styles in the android developer reference documentation.
You can change font size, style etc in your application, but not for whole device. To do that i guess you need to root your phone and provide custom fonts with specified font size in it.
For andriod 2.3.5 go to SMS click on Menu-> Settings scroll down until you see Font Setting and select Font Size Setting
According to http://recombu.com/mobile/article/changing-font-size_M18292.html there is no native option for that, up to Android 3.0.
You have to install some third party app. "Big Font" appears to be a popular one.
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")
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.