I have been striking my head with setting up custom fonts to text from code since one hour.I already deed this in my previous project and it worked!
But I don't know for what reason,it gives me expection "native typeface cannot be made" here.I have gone through many questions on SO related to this,and tried solution suggested and worked for those cases.But none of them works for me. :(
I have deleted and recreated assests folder and also i have tried with other font.ttf file as per the answers on the question related to same issues.I also cleaned and rebuilded the project but every effort was in vain!
Please help me!! I will be grateful for your help.
Code i use to set fonts:
I have my fonts GOTHIC.TTF in assets folder:
...
Typeface font=Typeface.createFromAsset(getAssets(), "fonts/GOTHIC.TTF");
title.setTypeface(font);
...
EDIT :
I think,I was mistaking by writing "fonts/GOTHIC.TTF" where as i have pasted fonts directly in assets and not in assets/fonts.But making it "GOTHIC.TTF" also does not solve the issue.Where can I be wrong?!