Google Font works in Test Mode but not if Played - Chapbook

Twine Version: 2.x
Story Format: Chapbook

I’m leaving this here in case it may help someone else, please delete if inappropriate.

I pretty much embeded a Google Font (EB Garamond) into my Vars Section and everything looked fine while working in Test Mode.
BUT… When I opened the file in my browser, it reverted to the default font.

This was my code, adapted from the cookbook with the font’s embed link exactly as I copied it from the Google Font page.

config.style.googleFont: '<link href="https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap" rel="stylesheet">'
config.style.page.font: 'EB Garamond/serif 18'

The culprit? CSS2.
That number 2 prevented the font from displaying properly for some reason.
If you’re experiencing the same, just delete the 2.

The corrected code:
(it’s just missing the number 2)

config.style.googleFont: '<link href="https://fonts.googleapis.com/css?family=EB+Garamond&display=swap" rel="stylesheet">'
config.style.page.font: 'EB Garamond/serif 18'
2 Likes