public static int getTextHeight(final TextPaint tPaint, final int fontSize, final int availableSize) {
        tPaint.setTextSize(fontSize);
        final StaticLayout lsLayout = new StaticLayout("}", tPaint, availableSize, Layout.Alignment.ALIGN_CENTER, 1, 0, false);
        return lsLayout.getHeight();
    }
returns the height a text in the given fontSize would use

@param tPaint        - paint object
@param fontSize      - font size to use
@param availableSize - available size for layout
@return actual size
main/src/main/java/cgeo/geocaching/utils/DisplayUtils.java