treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Cufon isn't working for me...

  • I wanted to test out Cufon so I can use some interesting fonts. Thing is, it doesn't render for me.

    I am 99% positive the code is correct (I'm still a semi-noob) so I
    was wondering if you could check out the source.

    <script src=\"cufon-yui.js\" type=\"text/javascript\"></script>
    <script src=\"NuvoOT-Medi_500.font\" type=\"text/javascript\"></script>
    <script type=\"text/javascript\">
    Cufon.replace('h1');
    </script>


    This is the interesting part that targets to replace my H1, but it renders as Georgia for me.
    The URL is http://fcpusers.com/test

    All the files for the page (javascript, css) are in this same folder.

    Sorry if this is a dumb question, I'm semi-new (<6 months) to web design.
  • You missed .js when you called the font.

    It should look like this
    <script src=\"cufon-yui.js\" type=\"text/javascript\"></script>
    <script src=\"NuvoOT-Medi_500.font.js\" type=\"text/javascript\"></script>
    <script type=\"text/javascript\">
    Cufon.replace('h1');
    </script>
  • Ahhh man... thank you!!

    Since I've started learning HTML/CSS, I can't tell you how many times I've pulled my
    hair out from this same problem. Thanks for the fix.