diff --git a/font.ts b/font.ts index b342588..1a555d9 100644 --- a/font.ts +++ b/font.ts @@ -61,7 +61,7 @@ document.body.appendChild(container); function handle(selected: any): void { let selectedFont: string = selected.style.fontFamily; - if (selectedFont == guessingFonts[fontToGuess]) { + if (selectedFont == guessingFonts[fontToGuess] || selectedFont.substring(1, selectedFont.length - 1) == guessingFonts[fontToGuess]) { if (!gameWin) { for (let i: number = 0; i < fontDiv.children.length; i++) { let child: any = fontDiv.children[i]; diff --git a/js/font.js b/js/font.js index ab88b11..02feb3c 100644 --- a/js/font.js +++ b/js/font.js @@ -57,7 +57,7 @@ container.appendChild(element); document.body.appendChild(container); function handle(selected) { let selectedFont = selected.style.fontFamily; - if (selectedFont == guessingFonts[fontToGuess]) { + if (selectedFont == guessingFonts[fontToGuess] || selectedFont.substring(1, selectedFont.length - 1) == guessingFonts[fontToGuess]) { if (!gameWin) { for (let i = 0; i < fontDiv.children.length; i++) { let child = fontDiv.children[i];