Function textWidth

  • Get the width in pixels of the text provided

    Parameters

    • text: string

      The text to measure

    • font: GameFont

      The font to use when measuring

    Returns number

    The width in pixels of the text provided

Generated using TypeDoc