static int getTextHeight(String text) { int numLines = '\n'.allMatches(text).length + 1; return numLines * _lineHeight; }