I am making a clicker game and I’m trying to change the font of the text by importing a font family from my computer. Here’s the code:
<style>
@font-face {
font-family: Futur;
src: url(FUTURAMEDIUM.TTF);
}
#ClicksCounter {
text-align: center;
margin-top: 425px;
font-size: 30px;
color: white;
font-family: Futur;
}
</style>
I directly imported the font family to my game folder and used it in the css code. I didn’t want to link it as a local file because I wanted it built into the website.
You need to sign in to view this answers