I have seen lot of questions regarding this issue.I think from myside I have tried everything to make it works and it works but not as coustomer expects. let me explain everything.
here is the compatibility of my android application
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
this means minimum version is 2.2. Arabi is supported in 2.2 and I have use Farsi class.
How to support Arabic text in Android?
Apartfrom that I have used arabic fonts DroidNaskhBold.ttf
Herewith I have attached a screen shot of arabic words. http://tinypic.com/r/e8u1zd/6
I dont know Arabic. But when I check letter by letter I noticed that after adding above font some letters are replaced by some different letters.
Other font I used don't show arabic words properly. I mean they are not show together accumelated.I can not keep hope on other fonts.
Is there way to solve this issue? If there is a good font to render Arabic text properly, I am ready to buy it because I think this is the only way to have a hope on this.
I do not see any problem in this font, it does not seem to change any letter, just you need to use library to connect the letters such as Better Arabic Reshaper
you can find different Arabic fonts here and here, but again I believe the problem is not in the font, but in the library you are using to connect the letters.
You can use API 17 , Android 4.2 which is Ok with RTL languages
Download Farsi class and add it in your project. Then if you want to write any arabic text on a button do:
Typeface tfbtn = Farsi.GetFarsiFont(this);
Button ed_companies_username=(Button)findViewById(R.id.add_companies_send);
ed_companies_username.setTypeface(tfbtn);
ed_companies_username.setHint(Farsi.Convert("ادخل اسمك"));
Related
i am using arabic characters for the first time in my app
this is how they should look like :
But this is how they end up :
things i tried:
changed the phone language to arabic.
i chose this font :Arabic type settings. i found in the fonts list
things works well for windows, its only in Android i get the problem.
i believe i am missing something because i never used arabic in apps before.
i appreciate your help.
Fire Monkey does not support right-to-left languages like Arabic. Unfortunately your chosen framework is not capable of meeting your needs. You will need to find a different tool to write your app.
My learning app requires displaying Korean, English and Chinese. One solution I have is to embed a Korean/English font and a Chinese font. Then put together a string with different TextFormats.
The thing is, I'm positive that IOS and Android devices should contain native Chinese, Korean and English fonts already, and I'd much rather refer to and use those fonts instead of packing them.
I tried detecting fonts by using Font.enumerateFonts(true), but when I use font.hasGlyphs('你'), I don't get a true, or anything, so I don't know how to choose the proper device font.
If that doesn't work, is there a font that contains all of those Characters? Or maybe a font-builder program that'd allow me to customize a font to include
This was something that I wrote sometime back
http://blogs.adobe.com/airodynamics/2012/08/21/supporting-languages-with-unicode-characters/
Hopefully it helps you
You can always know the name of font specific to the language. May be this http://support.apple.com/kb/HT5878.
Now based on the language you want to show just change the value of font in the statement format.font and the correct language should come up.
I just created a text page in my app and now i want to change language of this page dynamically
to Indian languages like Telugu, Tamil, Bengla, Guujrati and Punjabi.
I researched a lot, and got that there are only 2 methods to achieve this(please correct me if i am going wrong):-
1)Using localization of strings http://developer.android.com/guide/topics/resources/localization.html .
But in it problem is that, if android phone is supportable with these languages then it works
otherwise it show boxes in-place of fonts.
2)Using custom fonts to change language like
TextView tv=(TextView)findViewById(R.id.custom);
Typeface face=Typeface.createFromAsset(getAssets(),"fonts/Verdana.ttf");
tv.setTypeface(face);
But here's the problem is rendering. Fonts are not rendered properly.
Please suggest me, which option should i choose and how to overcome it's limitation.
I also want to mention that I want to support it on Android 2.3 and above.
Prior to Android 3, you need to use an appropriate font plus localisation to display characters from special scripts.
For Android 3+, using localisation most times is sufficient. Exceptions are Arabic, Hebrew, Indic scripts and a few others where you may need an appropriate font in addition to localisation to properly display these special characters in your Android app.
AFAIK, Verdana ONLY supports European Scripts such as Latin-1, Latin Extended-A, Latin Extended-B, Latin Extended Additional, Basic Greek and Cyrillic. Whereas Telugu, Tamil, Bengali, Gujarati are part of the South Asian Scripts - not sure about Punjabi (See Unicode Consortium for more info regarding Unicode scripts.) I guess you need to find an open-source font (so you don't have to pay loyalty when using proprietary fonts) that support the scripts you want to implement in your app.
I do understand that Android device still doesn't support complex hindi conjuncts drawing, though we set the textView typeface to a commonly used hindi font (mangal.ttf or DroidHindi.ttf).
One of the Ex:
1st 2nd Conjunct
प् र = प्र
"प्र" is been shown as...प् र { list of frequently used conjuncts - link)
What I would be interested to know is - Though android devices(I am using Galaxy-SII, os2.3) doesn't support it yet, is there a workaround for this?
Similar questions (but no workaround yet):
Android: unable to show correct hindi words
How can i show HIndi text in Android Tablet
For the question-2: #Sahaja does mention that android device doesn't support hindi complex conjuncts drawing. So does it mean that we won't be able to do anything in this regard until android adds the support for it or can we have a feasible workaround?
One workaround, which I can think of:
Convert the whole hindi database into a custom non-unicode format & use a non-unicode font (like kiran.ttf - link) to display it. This sounds like too much of effort, not sure if this is a feasible solution (not tried it yet - kept as last option) or something else would also work?
Please let me know, your thoughts on the same.
(Note: This problem has nothing to do with what custom hindi font I use or is it ttf or otf.)
Thanks,
Shibbs
I have recently been through the same problem but unfortunately didn't find any solution. I agree that some of the text won't appear properly i.e. some of it may appear misplaced characters. If you try running it on device that is 3.0 or above (I am unsure of below 3.0), then you should be able to see it properly. Or try choosing en emulator with higher which has more than 4.0.
I am displaying Arabic text on Android with some font and arabic reshaper. It's not displaying well.
Kindly guide me with Arabic text of whole Qur'an with settings of some font that can be displayed on All Android devices those have Arabic installed or not.
Unfortunately, Arabic is not supported until Android 3.0
If you are talking about the Holy Quran, then the best suggestion I can give you is using images for versions older than 3.0 and the regular text for the earlier ones.
I have no idea if this helps, assuming you have an arabic font: http://www.barebonescoder.com/2010/05/android-development-using-custom-fonts/
Shouldn't matter what else they have installed.
You can use PDMS_Islamicfont , me_quran, ZekrQuran
but u need little changes. if you need font file. modified give me your email id. i will send