I understand that to use custom fonts in a widget I need to render the font to a bitmap, but how do I set a system typeface programmatically?
android:typeface="serif"
in XML is successful, but I cannot find a way to do this at run time.
I currently have
int fn = fullDate.length();
SpannableString dt = new SpannableString(fullDate);
dt.setSpan(new StyleSpan(Typeface.BOLD), 0, fn, 0);
remoteView.setTextViewText(R.id.dateText, dt);
Which works, but using, for example, Typeface.SERIF
, gives The constructor StyleSpan(Typeface) is undefined