Adding Self Hosted Fonts to Answers

Hi Team,

I was given an Adobe Typekit URL to use in my Answers experience. I’m following the instructions in the Web Fonts and Font Hosting module, but am having difficulty understanding how to upload the font file if it’s not in WOFF format. Can we upload Typekit URLs?

Thank you,
Austin

Hi Austin,

We’d recommend you not self-host, but use the instructions ‘For Common Hosting Providers’ in the module.

If you provided a URL, you’ll just need to place it in a stylesheet reference (example below), and put this in your html.hbs file.

<link rel="stylesheet" href="https://use.typekit.net/fontid.css"> 

After that, you can reference that font in your style rules. Let me know if that works!

Hey Team!

My client also gave me adobe typekit fonts. We were NOT provided a URL but instead a snippet of code. Should I just place this whole script directly in the headincludes file?

This is what the code looks like:


<script src="//use.typekit.net/XXXX.js"></script>
<script type="text/javascript">
try{Typekit.load(
{ async: true }
);}catch(e){}
</script>

Hello @jyorke!

Yes! Copy both of those scripts directly into the headincludes.hbs file. Then you can add the desired font family to the --yxt-font-family variable in the fonts.scss file to apply it across the experience.

Best,
DJ