Jump to:

1374 Posts in 487 Topics by 520 members

Themes

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: 657 Views
  • soolan
    Avatar
    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?

    Thanks.

    P.S
    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
    Avatar
    Community Member
    161 Posts

    Re: Adding typekit fonts Link to this post

    Hi,

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

  • Nobrainer Web
    Avatar
    Community Member
    134 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">
    <head>
    <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)

    657 Views
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.