Improve computation of the text area to make it nicer.

Change-Id: I24fb1caedc55dcc297fb013acb63b3c660fcf0a2