fix: add text padding to prevent emoji glyph clipping

This commit is contained in:
2026-04-04 14:25:33 +07:00
parent 38d107a57a
commit 1b64ab7a7b
+3 -2
View File
@@ -155,8 +155,9 @@ export class PikachuGame extends Scene
const bg = this.add.rectangle(0, 0, CARD_W - 2, CARD_H - 2, CARD_BG)
.setStrokeStyle(1, CARD_BORDER);
const emoji = this.add.text(0, -1, cell.type, {
fontSize: 32, align: 'center'
const emoji = this.add.text(0, 0, cell.type, {
fontSize: 28,
padding: { top: 4, bottom: 4, left: 2, right: 2 }
}).setOrigin(0.5);
const container = this.add.container(x, y, [bg, emoji]);