seperate text size calculation to category for NSAttributedString for reusability