calculate label size with constraint to height