Forums / Templates, Stylesheets, Page Layout / Want to make your text look like an image? Here's how..

Want to make your text look like an image? Here's how..

Started by scott_c on 7 May 2010, 1:23 PM · Views: 7,309

Results 21 to 34 of 34
26 Apr 2011, 1:56 AM
#21
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

Want to make your text look like an image? Here's how..

jasonh1234:

Do you mean a bad copy of cufon-yui.js?
Its very unlikely that anything is wrong with the Cufon yui file - I would upload your font again using the font generator I mentioned previously.

Also, I dont think; ```

<script type="text/javascript" src="includes/templates/theme416/jscript/jscript_font.js"></script>

It need to be the name of the font if I remember correctly. I haven't done a new Cufon in a while.

Donation made. Enjoy those donuts! :-)

27 Apr 2011, 9:30 AM
#22
jasonh1234 avatar

jasonh1234

New Zenner

Join Date:
Apr 2011
Location:
Vancouver, BC
Posts:
42
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Ok I built the font's cufon .js file myself using the Cufon page referenced.

Left the font's name intact as exported but prefixed with "jscript_".

Edited the html_header.php to reference all the files. (Even though they're all already prefixed with "jscript_")

Still not working.

Here's a shortened URL to my site. (Shortened to prevent possible search engine indexing.)
http://bit.ly/flUNn9

Can someone please help with this? I'm pulling my hair out. :(

27 Apr 2011, 9:41 AM
#23
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Ok, a few things Ive noticed.

  • you've added the Cufon yiu, replace, and font file twice in your
    html header file.

  • you've got <script> tags in your Cufon replace file - taken them out.

  • I know you've copied my Cufon replace file from post #1 - but I don't think you've covered some of **your **tags such as #navEZPagesTop - for 'Home, New Products, Specials' etc (depending of course on what you want to 'Cufon') - add them to the Cufon.replace.js file.

Donation made. Enjoy those donuts! :-)

27 Apr 2011, 9:57 AM
#24
jasonh1234 avatar

jasonh1234

New Zenner

Join Date:
Apr 2011
Location:
Vancouver, BC
Posts:
42
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Scott_C:

you've added the Cufon yiu, replace, and font file twice in your html header file.
Nope just once. I guess it was added a second time to the DOM because they were prefixed with jscript_
I've fixed this now.

you've got <script> tags in your Cufon replace file - taken them out.
Done. No joy.

I don't think you've covered some of **your **tags such as #navEZPagesTop
Think I've done this properly now. Still not working though.

27 Apr 2011, 10:09 AM
#25
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

I've just viewed your source code again and there's no Cufon files there at all currently.

Donation made. Enjoy those donuts! :-)

27 Apr 2011, 10:10 AM
#26
jasonh1234 avatar

jasonh1234

New Zenner

Join Date:
Apr 2011
Location:
Vancouver, BC
Posts:
42
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Aha! I got it!! the "jscript_" prefix was causing the files to be called in the wrong order! cufon-yui.js has to be called before the font.js!

Working now! :D

27 Apr 2011, 10:11 AM
#27
jasonh1234 avatar

jasonh1234

New Zenner

Join Date:
Apr 2011
Location:
Vancouver, BC
Posts:
42
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Scott_C:

I've just viewed your source code again and there's no Cufon files there at all currently.
You looked as I was right in the middle of a change. :P

27 Apr 2011, 10:32 AM
#28
jasonh1234 avatar

jasonh1234

New Zenner

Join Date:
Apr 2011
Location:
Vancouver, BC
Posts:
42
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Realized I forgot to say "Thanks guys." :blush:

27 Apr 2011, 10:38 AM
#29
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

You're welcome. :blush:

Looks much better!

Donation made. Enjoy those donuts! :-)

27 Apr 2011, 10:40 AM
#30
scott_c avatar

scott_c

Zen Follower

Join Date:
Dec 2009
Posts:
236
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Now for a final effect, add the hover behaviour;

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

Donation made. Enjoy those donuts! :-)

27 Apr 2011, 10:48 AM
#31
jasonh1234 avatar

jasonh1234

New Zenner

Join Date:
Apr 2011
Location:
Vancouver, BC
Posts:
42
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Scott_C:

Now for a final effect, add the hover behaviourWooooo bonus!! Thx. :clap:

27 May 2011, 5:26 PM
#32
mikebackhouse avatar

mikebackhouse

New Zenner

Join Date:
Jan 2008
Posts:
37
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Hi All, I'm having a problem too :(

2 things, 1stly I cannot get Cufon to load at all! I've added the following to my html_header file as per this thread's instructions and another website:

<script type="text/javascript" src="includes/templates/zen-natural/jscript/cufon-yui.js"></script>
<script type="text/javascript" src="includes/templates/zen-natural/jscript/Harabara_700.font.js"></script>
<script type="text/javascript">	Cufon.replace('.h1');</script><script type="text/javascript"> Cufon.now(); </script>  

I've tried calling all my H1 tags for now just to test it

2ndly, I'd like to (once its working!) apply it to my category titles within the div "categoryListBoxContents" and have no clue how to do that!

Also, what's "cufon-replace.js"?? I dont have that file, and it's not available to download or even mentioned on the cufon website?

(I cannot send you the link as the site is in development and locked down by IP sorry!)

Please help, I'm going to have hundreds of categories on this site soon and I dont really want to manually create a category image for each and every one!

28 May 2011, 3:18 PM
#33
writeathome avatar

writeathome

New Zenner

Join Date:
Dec 2008
Posts:
50
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

Hi Mike,

I have cufons running on several of my sites. Here is an example of how to set up your cufon-replace.js file:

Cufon.replace('.cufon-enabled ul li a',{hover: true, textShadow:'1px 1px 0px #1d1d1d'});
Cufon.replace('.rightBoxHeading',{hover: true, textShadow:'1px 1px 0px #000000'});
Cufon.replace('#checkoutSuccessHeading');
Cufon.replace('#checkoutConfirmDefaultShipment');
Cufon.replace('#checkoutConfirmDefaultShippingAddress');
Cufon.replace('.categoryIcon',{hover: true});
Cufon.replace('.pagination',{hover: true, textShadow:'1px 1px 0px #1d1d1d'});
Cufon.replace('.productListing-rowheading');
Cufon.replace('.headerbox',{hover: true, textShadow:'1px 1px 0px #1d1d1d'});

Cufon.set('fontFamily', 'Prociono');
Cufon.replace('h1');
Cufon.replace('h5.itemTitle');
Cufon.replace('#productName');
Cufon.replace('#productListHeading');
Cufon.replace('#checkoutSuccessThanks');
Cufon.replace('.centerBoxHeading');
Cufon.replace('#cartEmptyText');
Cufon.replace('#attribsOptionsText');

You will notice I have two sections. The second section is a different font used. You do not need to specify the first font as it is default, but you will need to in the second section. I had a problem with the second font cufons not showing up when the fonts name was more than one word. It was very odd, so I had to go with Prociono.

If you have any semicolons, brackets, or other things out of place in this file, it will not work.

I did not need to use the cufon.now code in the header to make things work. They say if you use it, it will help things load faster. I did not find this to be true in my case. But, they say it has to be the last code before the </head> tag, not with the other header codes.

I believe on your h1 code you do not need the ., (ie Cufon.replace('h1'). Take it out of the header and place it in your new cufon-replace.js file.

Here is the code I have in my header:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript" src="includes/templates/CUSTOM/jscript/cufon-yui.js"></script> <script type="text/javascript" src="includes/templates/CUSTOM/jscript/Prociono_400.font.js"></script> <script type="text/javascript" src="includes/templates/CUSTOM/jscript/League_Gothic_400.font.js"></script> <script type="text/javascript" src="includes/templates/CUSTOM/jscript/cufon-replace.js"></script>

Good Luck. When it does start working for you it will look awesome! Be patient and start small. Once you get one working, then you can add more and test.

Kim

14 Sep 2011, 6:53 PM
#34
joepixel avatar

joepixel

New Zenner

Join Date:
May 2008
Location:
orlando, florida
Posts:
28
Plugin Contributions:
0

Re: Want to make your text look like an image? Here's how..

I found an issue with cufon and the Ceon URL Mapping mod. I added the cufon scripts and it works just fine until I update the URL to an SEO friendly one. The cufon then goes away. It's still being called in the page and the fonts still show up on other pages. But, as soon as the URL is mapped, the product title for example reverts back to using the system font.

Zen Cart version 1.3.9h

Link to page with SEO URL and no cufon:
http://www.jeannebeatrice.com/new/La-Mer-Market-Baskets/La-Mer-SMALL

Link to page without SEO URL and with cufon:
http://www.jeannebeatrice.com/new/index.php?main_page=product_info&cPath=2&products_id=21

Does anyone have any ideas?