Need some help with Cufon! Been using Concrete5 for two days!
Permalink 1 user found helpful
Hi all you Concrete5 Experts.
I have been using Concrete5 for two days now and I have hit my first hurdle and struggling to get over it.
Its in regards to Cufon- I have a font style called Broken Life (sounds dark, but is really cool,) I have edited my header.php file as shown in a tutorial and followed the steps but it does not show up in my text options. I have my own custom theme and want to change aspects of the text content to this font style. But no joy.
Could someone point out where I'm going wrong please? I have moved the file "Cufon" from the Themes Directory straight into the custom theme and back again and still no go. Currently, its sat in the custom themes file at the moment as it just shows up on the dashboard as another theme, which it obviously is'nt. Here is my code:
<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('typography.css')?>" />
<?php Loader::element('header_required'); ?>
<link rel="stylesheet" media="screen" type="text/css"
href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css"
href="<?php echo $this->getStyleSheet('typography.css')?>" />
<?php Loader::element('header_required'); ?>
<script src="<?php echo $this->getThemePath() ?>
/cufon/cufon-yui.js" type="text/javascript">
</script>
<script src="<?php echo $this->getThemePath() ?>/cufon
/Broken_life_400.font.js" type="text/javascript">
</script>
<script type="text/javascript">
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('cufon');
</script>
</head>
<body>
<div id="page">
<div id="header">
<?php
$a = new Area('Header');
$a->display($c);
?>
</div>
<div id="page_edge" class="drop_shadow">
<div id="content_area" class="inner_shadow">
Please help this is bugging me. :D Thanks in advance.
I have been using Concrete5 for two days now and I have hit my first hurdle and struggling to get over it.
Its in regards to Cufon- I have a font style called Broken Life (sounds dark, but is really cool,) I have edited my header.php file as shown in a tutorial and followed the steps but it does not show up in my text options. I have my own custom theme and want to change aspects of the text content to this font style. But no joy.
Could someone point out where I'm going wrong please? I have moved the file "Cufon" from the Themes Directory straight into the custom theme and back again and still no go. Currently, its sat in the custom themes file at the moment as it just shows up on the dashboard as another theme, which it obviously is'nt. Here is my code:
<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('typography.css')?>" />
<?php Loader::element('header_required'); ?>
<link rel="stylesheet" media="screen" type="text/css"
href="<?php echo $this->getStyleSheet('main.css')?>" />
<link rel="stylesheet" media="screen" type="text/css"
href="<?php echo $this->getStyleSheet('typography.css')?>" />
<?php Loader::element('header_required'); ?>
<script src="<?php echo $this->getThemePath() ?>
/cufon/cufon-yui.js" type="text/javascript">
</script>
<script src="<?php echo $this->getThemePath() ?>/cufon
/Broken_life_400.font.js" type="text/javascript">
</script>
<script type="text/javascript">
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('cufon');
</script>
</head>
<body>
<div id="page">
<div id="header">
<?php
$a = new Area('Header');
$a->display($c);
?>
</div>
<div id="page_edge" class="drop_shadow">
<div id="content_area" class="inner_shadow">
Please help this is bugging me. :D Thanks in advance.
I managed to get it working. Here is a demo theme that is using it. Maybe you can look through this and see if you can find where you went wrong.
Superb, the platforms awesome and so are the forums. Dwayne, thank you for the help. I will look through it and get back to you.
I'm glad you were able to get this working.
I wanted to mention another alternative to using other fonts just in case you weren't aware of it -- font squirrel:
http://www.fontsquirrel.com/fontface/generator...
I have been using it for about a year now, and it's completely amazing. It's free, it works in every browser (all the way back to IE 5.5 I believe!), and it utilizes standard CSS so it is very simple in your code and works in a very robust way.
I have found it to be pretty close to perfect, and I definitely prefer it over Cufon these days. The only problems I've ever had with it were:
1) There is sometimes a "flash of unstyled content" upon the first load of a site because the browser displays the fallback font first while it's loading the custom font file. This can be minimized in various ways, but I usually just don't worry about it because the font gets cached after the initial load so it's not much of a problem (depends on how picky the client is, though)
2) A client of mine purchased a font from a foundry but the foundry specifically prohibited them from using FontSquirrel with it. So this is not a technical issue, but something to consider (and I imagine the same issue would apply with Cufon as well). Reminded me of this:http://diveintomark.org/archives/2009/04/21/fuck-the-foundries...
Cheers,
Jordan
I wanted to mention another alternative to using other fonts just in case you weren't aware of it -- font squirrel:
http://www.fontsquirrel.com/fontface/generator...
I have been using it for about a year now, and it's completely amazing. It's free, it works in every browser (all the way back to IE 5.5 I believe!), and it utilizes standard CSS so it is very simple in your code and works in a very robust way.
I have found it to be pretty close to perfect, and I definitely prefer it over Cufon these days. The only problems I've ever had with it were:
1) There is sometimes a "flash of unstyled content" upon the first load of a site because the browser displays the fallback font first while it's loading the custom font file. This can be minimized in various ways, but I usually just don't worry about it because the font gets cached after the initial load so it's not much of a problem (depends on how picky the client is, though)
2) A client of mine purchased a font from a foundry but the foundry specifically prohibited them from using FontSquirrel with it. So this is not a technical issue, but something to consider (and I imagine the same issue would apply with Cufon as well). Reminded me of this:http://diveintomark.org/archives/2009/04/21/fuck-the-foundries...
Cheers,
Jordan
Hi Jordan,
thanks for the nudge in the in right direction. I have used FontSquirrel for this, but no joy - I am getting somewhere with the Cufon for now, so will stick with that for now. I'm a pretty new Concrete5-er so need to just get the fundamental blocks in place first (excuse the pun).
Thanks for your help.
Best wishes,
Ben.
thanks for the nudge in the in right direction. I have used FontSquirrel for this, but no joy - I am getting somewhere with the Cufon for now, so will stick with that for now. I'm a pretty new Concrete5-er so need to just get the fundamental blocks in place first (excuse the pun).
Thanks for your help.
Best wishes,
Ben.
Hmmm...interesting.
Fontsquirrel.com is unreachable.
Wonder what happened to them.
Carlos
Fontsquirrel.com is unreachable.
Wonder what happened to them.
Carlos
Yeah, I just checked back there now, server down. I got it working too, just needed some new fonts now! Darn.
Hi there,
I'm getting a little closer to realizing the dream (lol), I have added ceratin types of code to the header file and the font shows up the h1 and h2 tags at the top of the main section of the page- so I know something is going on now.
The only thing is that the font option is not appearing in the drop down options for editing text.
I am just thinking, is there an instruction I should be telling the main.css or typography.php or is it all just in the header file? If so, I have added the necessary info, but no response.
Thanks for the files by the way, they are beginning to get the learning curve to steepen. :D
Best wishes,
Ben.
I'm getting a little closer to realizing the dream (lol), I have added ceratin types of code to the header file and the font shows up the h1 and h2 tags at the top of the main section of the page- so I know something is going on now.
The only thing is that the font option is not appearing in the drop down options for editing text.
I am just thinking, is there an instruction I should be telling the main.css or typography.php or is it all just in the header file? If so, I have added the necessary info, but no response.
Thanks for the files by the way, they are beginning to get the learning curve to steepen. :D
Best wishes,
Ben.
You can add classes to tiny mce with the typography.css. To do this just add .cufon{} or whatever to typography.css. It will then be an option in the styles drop down. I don't know how you can render cufon in tinyMCE though.