calculateStringWidth

Calculates the width of string when rendered with font.