📅  最后修改于: 2022-03-11 14:52:47.331000             🧑  作者: Mango
Typeface plain = Typeface.createFromAsset(assetManager, pathToFont);
Typeface bold = Typeface.create(plain, Typeface.DEFAULT_BOLD)
Paint paint = new Paint();
paint.setTypeface(bold);
canvas.drawText("Sample text in bold",0,0,paint);