Java tutorial
//package com.java2s; import android.graphics.Paint; public class Main { private static Paint.FontMetrics mFontMetrics = new Paint.FontMetrics(); public static float getLineHeight(Paint paint) { return getLineHeight(paint, mFontMetrics); } public static float getLineHeight(Paint paint, Paint.FontMetrics fontMetrics) { paint.getFontMetrics(fontMetrics); return fontMetrics.descent - fontMetrics.ascent; } }