Custom font in canvas text

suggest change

Draw text on a canvas with a font from assets. x and y are the text baseline in pixels.

Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/SomeFont.ttf");
Paint textPaint = new Paint();
textPaint.setTypeface(typeface);
canvas.drawText("Your text here", x, y, textPaint);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents