I am having sqlite database containing gujarati words..
The sql query for the database is...
BEGIN TRANSACTION;
CREATE TABLE eng_guj (_id INTEGER PRIMARY KEY, eng_word开发者_如何学Python , guj_word );
INSERT INTO eng_guj VALUES(1,'aardvark','ઊધઇ ખાનારું આફ્રિકાનું એક નિશાચર સસ્તન પ્રાણી.');
COMMIT;
I want to display the text in textview.. but its not rendering properly.. meant Its displaying the word in gujarati like "આફ્રિકા" will be displayed as "આફરિકા".
I already have used Typeface and different ttf fonts.
This implies that your UI framework is handling "Complex text layout" properly or it is not configured properly to handle right.
Devanagari scripts, require different contextual shapes and ordering in text, which require complex layout support with Unicode characters. see this
A forum here mentions that Android still doesn't have proper support to do this. But my information on this is limited.
Dipan.
i have found that it's problem with android phone only, above 2.3 it's working fine
so build your apps with above android version 2.3
it will work sure for all android version above 2.3
like in AndroidManifest.xml file android:minSdkVersion should be more than 10,
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />
I had the same problem as you. I downloaded the Shruti Font here.
Then using this code display the Gujarati font:
txtHeading=(TextView) findViewById(R.id.txtHeading);
Typeface typeface=Typeface.createFromAsset(this.getAssets(), "SHRUTI.TTF");
txtHeading.setTypeface(typeface);
txtHeading.setText("StackOverFlow પર આપનું સ્વાગત છે.");
精彩评论