Java tutorial
//package com.java2s; import android.graphics.Paint; import android.text.TextPaint; public class Main { public static int getDanmuHeight(TextPaint textPaint) { Paint.FontMetrics fontMetrics = textPaint.getFontMetrics(); return (int) (fontMetrics.bottom - fontMetrics.top + .5f); } }