I have an API class inside my application; inside API class there is a custom font that has been setup as static, for example
public static Typeface font_short;
@SuppressWarnings("deprecation")
public Api(Context c , Display d)
{
this.context = c ;
//I want to change this if user wants to keep using System font style or my custom style
if ( keep_curren == true )
{
font_title = //What to add here to get Default fonts Typeface
}else
//use my costume font
{
font_title = Typeface.createFromAsset(context.getAssets(),"fonts/custome.ttf");
}
display = d;
w = display.getWidth(); // deprecated
h = display.getHeight(); // deprecated
}
I want to get default and current Typeface of device if user doesn't want to use my custom font!
in Activity Class
TextView blaaa = (TextView) findViewById(R.id.blaaa);
//change to custome font style or keep current font style
blaaa.setTypeface(Api.font_title);
Any ideas?