implement automatic text resizing