You can use the following method.
Render the font onto a canvas, and then pass it on to a bitmap and assign that to an ImageView.
public Bitmap buildUpdate(String text)
{
Bitmap myBitmap = Bitmap.createBitmap(10, 10, Bitmap.Config.ARGB_4444);
Canvas myCanvas = new Canvas(myBitmap);
Paint paint = new Paint();
Typeface mytypeface = Typeface.createFromAsset(this.getAssets(),"fontname.ttf");
paint.setAntiAlias(true);
paint.setSubpixelText(true);
paint.setTypeface(clock);
paint.setStyle(Paint.Style.FILL);
paint.setColor(Color.WHITE);
paint.setTextSize(65);
paint.setTextAlign(Align.CENTER);
myCanvas.drawText(text, 80, 60, paint);
return myBitmap;
}
use it like:
String text = "This is my text";
RemoteViews views = new RemoteViews(getPackageName(), R.layout.my_widget_layout);
views.setImageViewBitmap(R.id.my+imageview, buildUpdate(text));
Hope this will help :)