Reputation: 2973
I have to implement Nepali Font
on my application and for that I have used unicode font named DroidSansDevanagari-Regular.ttf
.The reason I have used this font is that on my Rooted Galaxy S2 I900
,I have installed Resurrection Remix 3.06 JB(AOKP)
which renders Nepali Font
correctly. And under system/fonts
folder I have found this DroidSansDevanagari-Regular.ttf
font,which is responsible for displaying Nepali Font
.
Further I have used the correct way of using custom font
Typeface font =
Typeface.createFromAsset(context.getAssets(),
"fonts/DroidSansDevanagari- Regular.ttf");
someTextView.setTypeface(font);
And though my application displays the Nepali Font
it doesn't correctly maps the font.Using same font I get correct mapping on Rooted Galaxy S2
phone,but I can't get correct mapping on other phones. Let me illustrate this by picture
Correct Mapping
InCorrect Mapping
So,my question is how to map the font in correct manner as done by my Rooted Galaxy S2 phone
.For that do I have to look upon AOKP
project and look upon EditText
or Typeface
classes.Please provide me guidance on how to correctly map the fonts on each and every device
Thanks in advance
Upvotes: 2
Views: 1330
Reputation: 2973
For correct font mapping ,indic text renderer is the best solution I found so far.But before implementing this library,please look upon the solution explained on this issue in order to render fonts with long texts and without any line spacing in between words
Upvotes: 2