Name
  font:TextWidth -- get text width
Synopsis

      t = font:TextWidth(text, len)

Function
  `font:TextWidth()` gets the total width of the text, the number of characters, and the number of words.

  This method returns a table that has the following fields initialized:

  `NumChars:`
    The number of characters.

  `NumWords:`
    The number of words (obsolete). Use `NumSpace` instead (see below).

  `Width:`
    The total width of the text.

  `NumSpace:`
    The number of words.

  In case of an error, all table elements will be set to 0.

Inputs
  text
    the text to get width
  len
    the byte length of the text
Results
  t
    table containing calculation results

Show TOC