1. ziggy
  2. Sherlock Holmes
  3. Commercial Templates
  4. Thursday, 29 November 2012
  5.  Subscribe via email
Hello,

My website is eduardogea.com, I'm a singer and writer. I bought the Specialize template yesterday and I'm trying to personalize it a bit. I love the template appearance but I preffer to use Cufon fonts instead of Google fonts. I know how to use Cufon, but I don't know how to disable the Google fonts before.

I want to use it in h1, h2, h3 and #hornav but I can't find where the main Google call is.

Can you help me?

Thank you in advance!
Accepted Answer Pending Moderation
0
Votes
Undo
Hi eduardogea

Google fonts are called within the templates styles.php located at ../templates/j51_specialize/php/styles.php. For example if you wish to remove the h2 styling you would remove the following from this file...

<?php if(($articlehead_fontstyle == "Arial") || ($articlehead_fontstyle == "Courier") || ($articlehead_fontstyle == "Tahoma") || ($articlehead_fontstyle == "Garamond") || ($articlehead_fontstyle == "Georgia") || ($articlehead_fontstyle == "Impact") || ($articlehead_fontstyle == "Lucida Console") || ($articlehead_fontstyle == "Lucida Sans Unicode") || ($articlehead_fontstyle == "MS Sans Serif") || ($articlehead_fontstyle == "MS Serif") || ($articlehead_fontstyle == "Palatino Linotype") || ($articlehead_fontstyle == "Tahoma") || ($articlehead_fontstyle == "Times New Roman") || ($articlehead_fontstyle == "Trebuchet MS") || ($articlehead_fontstyle == "Verdana")) : ?>
<style type="text/css">h2{font-family:<?php echo ($articlehead_fontstyle); ?> }</style>

<?php elseif(($articlehead_fontstyle != "Arial") || ($articlehead_fontstyle != "Verdana") || ($articlehead_fontstyle != "Tahoma") || ($articlehead_fontstyle != "Century Gothic")) : ?>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php echo $articlehead_fontstyle ?>" />
<style type="text/css">h2{font-family:<?php echo ($articlehead_fontstyle); ?> }</style>
<?php endif; ?>

Once removed you can then add your cufon font as normal between the <head> tags of the templates index.php (../templates/j51_specialize/index.php)

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Quick and easy, thank you!
  1. more than a month ago
  2. Commercial Templates
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Aw.... Ok, I've removed the Google fonts for h1, h2, h3 and #hornav but now Cufon isn't working :( . I know this is not your problem, but if you can help me doing this I'd be very thankful :)

I've done:

1. Copy the "cufon-yui.js" in .../j51_specialize/js
2. Copy the font "Heroic_400.font.js" in .../j51_specialize/js
3. Embed the code on index.php between <head></head> like this:

<head>
<jdoc:include type="head" />
<?php include (nexus.DS . "php/styles.php");?>
<?php include (nexus.DS . "php/scripts.php");?>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/cufon-yui.js"></script>
<script type="text/javascript" src="/js/Heroic_400.font.js"></script>
<script type="text/javascript">
Cufon.replace('h1, h2, h3, #hornav');
</script>
<?php echo ($head_custom_code); ?>
</head>


I've almost copy a jquery.js just in case... :unsure: Can you tell me what I'm doing wrong?

Thank you!!
  1. more than a month ago
  2. Commercial Templates
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
It seems to work (the h's lose their previous format, the #hornav don't) but it don't recognize the font-family...

Any idea?
  1. more than a month ago
  2. Commercial Templates
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Have you since amended this issue?.. your hornav is loading the 'Heroic' font-family on this end.

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
Ciarán, I'm sorry but I'm spanish and my english is a bit limited. I don't understand what do you mean with your last post :blush: Do you mean it's ok there?

I've just added the CSS code of your last reply into the Custom Css field and it doesn't seem to be working. What I'm missing?


P.D. I'll have to go to Ireland to buy you a beer ;)

Update: I'm going forward with another font, it seems to be a Heroic problem. Thank you for all!
  1. more than a month ago
  2. Commercial Templates
  3. # 6
Accepted Answer Pending Moderation
0
Votes
Undo
:)

If you could forward FTP access to your Joomla installations template folder to info@joomla51.com we'd be happy to have a look for you.

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 7
Accepted Answer Pending Moderation
0
Votes
Undo
Sent!
  1. more than a month ago
  2. Commercial Templates
  3. # 8
Accepted Answer Pending Moderation
0
Votes
Undo
I've ameded your code slightly useing the following with your Franchise font adding it to the templates ../php/scripts.php rather than the index.php

<script type="text/javascript" src="/<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/cufon-yui.js"></script>
<script type="text/javascript" src="/<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/Franchise_400.font.js"></script>
<script type="text/javascript">
Cufon.replace('h1, h2, h2 a:link, h2 a:visited, .content_header, .articleHead h3, #hornav ul a, #hornav .separator, .module .module_header h3, .module h3, .module_menu .module_header h3');
</script>


Appears to work fine for your Franchise font however I had no luck with the Heroic font which might point to an issue with your Heroic_400.font.js

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 9
Accepted Answer Pending Moderation
0
Votes
Undo
Perfect! Then, if I want to try with another font... Have I to change only the index.php code, or there is another code to amend?
  1. more than a month ago
  2. Commercial Templates
  3. # 10
Accepted Answer Pending Moderation
0
Votes
Undo
All going well you should just have to change the name of the font script been called within the cufon code which is now in your templates scripts.php (../php/scripts.php)and upload your font script to ../js

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 11
Accepted Answer Pending Moderation
0
Votes
Undo
Ok, it was a Cufon "Limit usage to the following domain(s)" problem. Now Heroic font is ON! I'll upload a link when the web is finished ;)

Thank you for all your kindness and patience!
  1. more than a month ago
  2. Commercial Templates
  3. # 12
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Ciarán,

I'm still working on the template and it grows step by step. Now I've realised that the hover effect on #hornav, h2, h3... has disappeared since we fixed the google-to-cufon code problem.

I've been looking into the code and all the hover codes are there and working.

Do you know what can it be?

Cheers!
  1. more than a month ago
  2. Commercial Templates
  3. # 13
Accepted Answer Pending Moderation
0
Votes
Undo
I believe by default :hover is disabled with the Cufon script. To turn it on try adding the following in a line berfore the closing </script> tag of your cufon code.

Cufon.replace('element', {hover: true});

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 14
Accepted Answer Pending Moderation
0
Votes
Undo
That's it ;) I had to use a little different code for the #hornav mess, but it's working. Thanks!

The code used (if someone wants it)

<script type="text/javascript">
Cufon('#hornav li.active a', {
hover: { color: '#D5CFBC'},
color: '#675a57',
fontFamily: 'Old',
});

Cufon('#hornav li a', {
hover: { color: '#D5CFBC'},
color: '#d5d5d5',
fontFamily: 'Old',
});

Cufon.replace('#hornav li', {
color: '#d5d5d5',
fontFamily: 'Old',
});

Cufon.replace('#hornav li.active a', {
color: '#675a57',
fontFamily: 'Old',
});

</script>
  1. more than a month ago
  2. Commercial Templates
  3. # 15
Accepted Answer Pending Moderation
0
Votes
Undo
Great.. thank you for posting your final solution :)

Ciarán
  1. more than a month ago
  2. Commercial Templates
  3. # 16
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok