I tried this
File file3 = new File("/system/fonts/DroidSans.ttf");
Log.d("EaglesPDF","DroidSans exists "+file3.exists());
if(file3.exists())
fontfileListAdd("/system/fonts/DroidSans.ttf");
else
load_truetype_font(res, R.raw.droidsans, new File(files, "droidsans.ttf"));
File file2 = new File("/system/fonts/Roboto-Regular.ttf");
Log.d("EaglesPDF","Robot exists "+file2.exists());
if(file2.exists())
fontfileListAdd("/system/fonts/Roboto-Regular.ttf");
else
load_truetype_font(res, R.raw.roboto_regular, new File(files, "roboto_regular.ttf"));
File file = new File("/system/fonts/DroidSansFallback.ttf");
Log.d("EaglesPDF","DroidSansFallback exists "+file.exists());
if(file.exists())
fontfileListAdd("/system/fonts/DroidSansFallback.ttf");
else
load_truetype_font(res, R.raw.droidsansfallback, new File(files, "droidsansfallback.ttf"));
and the three logs return me true but for some reason doesn't work
so i finally tried this and work it
if (!setDefaultFont(null, "Roboto-Regular", true) && face_name != null)
{
if( !setDefaultFont(null, "Roboto-Regular", true) )
setDefaultFont(null, face_name, true);
}
if (!setAnnotFont("Roboto-Regular") && face_name != null) {
setAnnotFont(face_name);
}