public float getPreferredHeight(float width) { return renderer.getWrappedBounds(text, font, width - 2 * insets.x).height + font.getLineHeight() - font.getCapHeight() // need to account for difference in line and cap height + 2 * insets.y; }