View Full Version : Resolved CUFON Question?

08-27-2010, 04:45 PM
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">