Reputation: 349
I have been working with Arabic in my application and using QuranSaleem font, it shows correctly in web and IOS applications like this
but it is being rendered incorrectly like this
I have changed fonts but to no avail, there is always some problem with rendering in android. what is the solution to this problem?
Typefaces.SetFontQuranSaleem(holder.VerseArTextView);
and here is the code for this method
class Typefaces
{
Context context;
static Typeface quranFontSaleem;
public Typefaces(Context context)
{
this.context = context;
quranFontSaleem = Typeface.CreateFromAsset(context.Assets, "Fonts/QuranFontSaleem.ttf");
}
public static void SetFontQuranSaleem(TextView textview)
{
textview.SetTypeface(quranFontSaleem, TypefaceStyle.Normal);
}
}
Upvotes: 0
Views: 214
Reputation: 349
I finally was able to find the culprit it was the text it self which was rendering incorrectly in the android app, I changed the text and it is now rendering fine.
I replaced "شَیْـًٔـا" with "شَيْئًا" and it was rendering fine.
Upvotes: 1