compute cell heights for text. ref: #172
refactor layout delegate