I do this:

p.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/SKYWORK.TTF")); canvas.drawText("!@#$%^&*123OPQW7890", 200, 200, p); 

The font is registered: assets/fonts/SKYWORK.TTF

Result: draws characters, but not with the font that you specified.

Question: what am I doing wrong?

  • check if Typeface.createFromAsset(getAssets(), "fonts/SKYWORK.TTF") . - Vladyslav Matviienko
  • And how to check whether it was created or not? - kaaa
  • Typeface font = Typeface.createFromAsset (getAssets (), "fonts / SKYWORK.TTF"); if (font! = null) {// that was created} - Yury Pashkov
  • Checked - the font was created. What else could be the problem? - kaaa
  • Happened. Just something with the font was. I checked on the other and it all worked. - kaaa

0