Properly determining line height and item height