How set Spannable object font with custom font
This is a late answer but will help others to solve the issue. Use the following code:(I’m using Bangla and Tamil font) TextView txt = (TextView) findViewById(R.id.custom_fonts); txt.setTextSize(30); Typeface font = Typeface.createFromAsset(getAssets(), “Akshar.ttf”); Typeface font2 = Typeface.createFromAsset(getAssets(), “bangla.ttf”); SpannableStringBuilder SS = new SpannableStringBuilder(“আমারநல்வரவு”); SS.setSpan (new CustomTypefaceSpan(“”, font2), 0, 4,Spanned.SPAN_EXCLUSIVE_INCLUSIVE); SS.setSpan (new CustomTypefaceSpan(“”, font), 4, 11,Spanned.SPAN_EXCLUSIVE_INCLUSIVE); … Read more