Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1

Thread: CUFON Question?

  1. #1
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    United Kindom
    Thanked 136 Times in 136 Posts

    CUFON Question?

    Hi I was just wondering if you could use two different fonts on the same page with CUFON, as you can register a font with the font files but if you register two fonts how how you choose between the fonts.

    For example if you do this
    <script src="fonts/cufon.js" type="text/javascript"></script>
    <script src="fonts/font1.font.js" type="text/javascript"></script>
    <script src="fonts/font2.font.js" type="text/javascript"></script>
    But when I use the built-in CUFON replace it only picks the last font registered.
    <script type="text/javascript">
    Cufon.replace('#div1'); // Will Replace all text in the div1 with font2
    Cufon.replace('#div2'); // Will Replace all text in the div2 with font2
    <div id="div1">Font 1</div>
    <div id="div2">Font 2</div>
    If anyone knows how to do this please helo, thank you.

    I found how you do it you need to use a selector like this.
    <script type="text/javascript">
    Last edited by DJCMBear; 08-27-2010 at 05:43 PM.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts