4 replies [Last post]
panna's picture
Offline
Joined: 02/22/2010

Trying to change the style of teaser h2 headers. Made changes in CSS, but somehow the h2 is still pulling in a different font. Is there a change within the Theme settings or elsewhere that would effect this?

Rob D.'s picture
Offline
Joined: 04/09/2008

Hi panna,

The font your probably seeing is being called by the cufon font replacement script - you can disable this in the theme settings, and then adjust the font with CSS as you were attempting to do.

For more information about Cufon, and if you wish to use it with an alternative font, you can check out the details here:

http://cufon.shoqolate.com/generate/

panna's picture
Offline
Joined: 02/22/2010

Thanks Rob --sorry wasn't fully clear. I was trying to overide cufon on certain h2's. So in theme settings was leaving cufon checked. But styling fonts in css is not overriding cufon. Theoretically is this possible?

Rob D.'s picture
Offline
Joined: 04/09/2008

You won't be able to override the cufon with CSS, no. But you can have more control over what's displayed in cufon and which one's isn't.

Around line 48 in page.tpl.php, you'll see:

Cufon.replace('h1, h2, #site-name');

So all h1 and h2 tags are replaced with cufon, and the text in the #site-name div. If you wanted only h1 tags to be replaced, you could simply cut h2 out of that line and save the file. Or, say you just wanted the h2 in sidebar titles to be replaced - you could do something like:

Cufon.replace('h1, .sideblock-inner h2, #site-name');

Hope that makes sense!

panna's picture
Offline
Joined: 02/22/2010

Rob,

That's it! Thanks for your help.

Support hours: 9AM - 5PM EST, Mon - Fri

Follow us on: