Texture - Google Fonts - HTML?

Does anyone have specific instruction on how to change the fonts in a Texture game? The HTML can be downloaded and changed. The existing fonts are actually Google fonts, so I’d assume you could potentially use any that exist. I tried adjusting the font by searching and pasting the Google font names in, but I didn’t really understand what I was doing.

I vaguely understand it’s a matter of downloading/referencing the font in the element and then replacing it in but I’d appreciate some advice by someone who knows what they’re doing.

  1. Set the game font to Abel in the Texture writer
  2. Download the game as HTML and find the line in the that loads the Google fonts () and replace it with the new font. Google Fonts shows the HTML code in the “Embed” view after you’ve selected the font. For example for the the “Mali” font you’d now have in the head.
  3. Search the file for body.font-abel{font-family:Abel,sans-serif} and change it to body.font-abel{font-family:Mali,sans-serif} (note: the CSS rule is still called body.font-abel)

If the font name has more than one word, you need quotes around it: body.font-abel{font-family:“Open Sans”,sans-serif}.

You can also check in Google Fonts what the fallback font should be so that when the player doesn’t have Internet connection (or Google Fonts doesn’t load for some other reason) they’ll get a font in the same family, so Mali should actually be body.font-abel{font-family:Mali, cursive}.

Thank you! I was replacing the font name “Abel” and that’s apparently what I was doing wrong. Thank you for the clear explanation. :smiley: