Function get_text_width

  • Obtains the text width in pixels (INEFFICIENT).

    Parameters

    • game: Game

      the Phaser.Game instance

    • text: string

      the text string to measure width

    • italic: boolean = false

      whether the text is in italic

    Returns number