Calculates the total width of a text string based on the glyph metrics and style settings.
the total width of the text as a Double value
the input text string whose width is to be calculated