Jump to:

1385 Posts in 493 Topics by 522 members


SilverStripe Forums » Themes » Adding typekit fonts

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 685 Views
  • soolan
    Community Member
    11 Posts

    Adding typekit fonts Link to this post

    Hello every one,

    I tried to embed my TYPEKIT fonts to SilverStripe.

    I tried both requirements command in the controller and
    editing template directly but it didn't work.

    Does anyone knows how to do that?


    the problem are script tags that need to be called to authorize the font
    Here it is what typekit gives you:

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

  • Optic Blaze
    Community Member
    162 Posts

    Re: Adding typekit fonts Link to this post


    Post your .ss file code please. I just want to see what you have all got in there before i comment further.

  • Nobrainer Web
    Community Member
    135 Posts

    Re: Adding typekit fonts Link to this post

    Just add to the top of your themes/design/templates/Page.ss file, should look something like:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
    <html lang="da-DK" xmlns="http://www.w3.org/1999/xhtml">
    <script type="text/javascript" src="http://use.typekit.com/lyu4luv.js"></script>
    <script type="text/javascript">try{Typekit.load();}catch(e){}</script>

    Remember to allow access from the urls you are viewing the site at in your typekit. (After update there can be a short delay before it actually works)

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.