public override int getSize(Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) { LOCAL_PAINT.set(paint); applyCustomTypeFace(LOCAL_PAINT, type); LOCAL_PAINT.getTextBounds(icon, 0, 1, TEXT_BOUNDS); if (fm != null) { fm.descent = (int)(TEXT_BOUNDS.height() * BASELINE_RATIO); fm.ascent = -(TEXT_BOUNDS.height() - fm.descent); fm.top = fm.ascent; fm.bottom = fm.descent; } return(TEXT_BOUNDS.width()); }