I'm trying to implement a custom textview that uses my own custom font.
is there a way to set the typeface before doing a Super.onDraw()?
So as to replace the usual font to the custom font that I want to use.
Something like:
protected void onDraw(Canvas canvas)
{
Typeface font1 = Typeface.createFromAsset(context.getAssets(), "fonts/myfonts.ttf");
this.setTypeface(font1);
this.setTextSize(18);
super.onDraw(canvas);
}
I know the above code won't work.
Or do I have no choice but to use drawText() to do so?