public int getFontHeight() {
FontMetrics fm = mPaint.getFontMetrics();
return (int) (fm.descent - fm.ascent);
}
canvas.drawText("hello world", 0, getFontHeight(), new Paint());
public int getFontHeight() {
FontMetrics fm = mPaint.getFontMetrics();
return (int) (fm.descent - fm.ascent);
}
canvas.drawText("hello world", 0, getFontHeight(), new Paint());
本文转载自:http://blog.csdn.net/id19870510/article/details/6454006