I’d also recommend taking a look at my comment here for tips on how to target your custom CSS styling like that in the future, especially if you’d like to target places other than just the passages.
You’ll need to publish your game to HTML in the same directory as your “fonts” folder, and then open that HTML file for it to work, since that’s required for the path for the font file to be correct.
I downloaded the fonts from the site you linked to and put them into a “fonts” folder. Then I did a test like I just described using this CSS, and it worked fine for me:
You can add additional “@font-face” rules if you want to add the other AlumniSans fonts as well. See the MDN @font-face documentation for details.
IMPORTANT: Make sure that the path and filename(s) in your code use the same capitalization as the actual path and filename(s), otherwise the code won’t work on most non-Windows operating systems.
If you want to make it also work from the “Play” button in the Twine editor, then you’d need to hardcode the whole path to the font, like this:
Just change the second URL to the file path on your computer. (Though, I’d recommend removing that part from your release version if you distribute it to other people, since that code will throw error messages to the console if the file isn’t found there.)
You may want to use the above code along with my “Font Size Buttons” code, since that will allow players to scale the text as needed.