¿Cómo obtener el tipo de letra predeterminado del dispositivo Android?
Tengo una clase de API dentro de mi aplicación; Dentro de la clase API hay una fuente personalizada que se ha configurado como estática, por ejemplo
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
}
¡Quiero obtener el tipo de dispositivo predeterminado y actual del dispositivo si el usuario no quiere usar mi fuente personalizada!
en la clase de actividad
TextView blaaa = (TextView) findViewById(R.id.blaaa);
//change to custome font style or keep current font style
blaaa.setTypeface(Api.font_title);
¿Algunas ideas?