Cufon Fonts

GK User
Fri Apr 16, 2010 10:52 pm
Hi,

Is it possible to use the Cufon font support feature on standard article headers ?
User avatar
Expert Boarder

GK User
Mon Apr 19, 2010 4:49 pm
OK...I've found out the answer to this myself and this works however it also changes the module header fonts aswell

Is there a way to just change the Article header to Cufon fonts and leave the rest as standard font?

Dave
User avatar
Expert Boarder

GK User
Mon Apr 19, 2010 5:13 pm
Hi

Yes, it's possible.
Set "Cufon - headers" and add the name of the font on "Cufon font name - headers" parameters.

Them, open ../templates/gk_party_freak/layouts/blocks/cufon.php and add find this line:

Code: Select all
Cufon.replace('h2.latestItemTitleList', { fontFamily: '<?php echo $this->_tpl->params->get('cufon_font1name',''); ?>' });


replace with:

Code: Select all
Cufon.replace('h2.latestItemTitleList', { fontFamily: '<?php echo $this->_tpl->params->get('cufon_font1name',''); ?>' });
Cufon.replace('h2.contentheading', { fontFamily: '<?php echo $this->_tpl->params->get('cufon_font1name',''); ?>' });


Now find this line:

Code: Select all
h2.latestItemTitleList


replace it with
Code: Select all
h2.latestItemTitleList,
h2.contentheading


Now, here the trick if you don't want to use cufon style on module headers. You can comment the respective classes lines codes. Example:

For default moduletable header, comment this line like this:
Code: Select all
//Cufon.replace('div.moduletable h3', { fontFamily: '<?php echo $this->_tpl->params->get('cufon_font1name',''); ?>' });


above, also comment this line like this:

Code: Select all
<!--div.moduletable h3,-->


Cheers ;)
User avatar
Platinum Boarder

GK User
Tue Apr 20, 2010 5:26 pm
Many thanks Seichinha,

Thus worked.

Dave
User avatar
Expert Boarder


cron