Unicode in phaser.text

Hi, desperately need help with displaying unicode in phaser.text

I’d like to display a set of cards using unicode.

here’s my code
let cardval = ‘\U+1F0A1’; // Unicode for spade ace
let card = scene.add.text(475 + (i * 25), 650, cardval, { font: “64px Arial”, fill: ‘#ffffff’ });
But it displays U+1F0A1
Pls help

You should read up on strings in JavaScript - the correct notation for this Unicode character would be let cardval = "\u{1F0A1}". What you’re currently passing in has no special meaning.

1 Like