Java tutorial
//package com.java2s; import android.text.TextPaint; public class Main { public static float getFontlength(TextPaint paint, String str) { return paint.measureText(str); } }