how to use 2 cufon fonts at the same time?

Skip to first unread message

mish r

May 10, 2012, 12:01:20 PM5/10/12
to cufón
i have 2 language website, and cufon works great for h1 h2 h3... for
an english version.
so, the problem is for a 2nd language it wont show me h1 h2 h3 cause
there is no font for this language.
how can i disable cufon for a 2nd language, or maybe use another font

PS. 2 bad i can use only 1 template for both versions of the site.

Simo Kinnunen

May 19, 2012, 4:29:13 AM5/19/12

If you have a lang attribute in the <html> tag, you can target specific languages by changing the replace call's selector. If you had something like this:


it would become:

Cufon.replace('html[lang=en] h1')

which would only replace the element on the English version.

The best way however would be to not include Cufón at all for the other language. Even if you only have one template, maybe you can do something like this (using PHP as an example):

<?php if (get_template_language() === 'en'): ?>
<script src="cufon-yui.js"></script>
<script src="my.font.js"></script>
<script src="replace-calls.js"></script>
<?php endif; ?>

Of course, you would need to figure out how to access the information. For the example I simply made up the get_template_language() function.

> --
> You received this message because you are subscribed to the Google Groups "cufón" group.
> To post to this group, send email to
> To unsubscribe from this group, send email to
> For more options, visit this group at

Reply all
Reply to author
0 new messages