• Home
  • Services
  • Profile
  • Portfolio
  • Contact
  • Links
  • Blog
  • Archives
  • Sitemap
Subscribe: Posts | Comments | E-mail
  • Ajax XMLHttpRequestAsynchronous HTTP Request How To's
  • FreebiesBest Freebies Collection
  • MiscellaneousNews, Announcements & General Stuffs
  • Print & Web DesignPhotoshop, Vector, CSS, XHTML
  • ProgrammingProgramming PHP, ASP, .NET and more

Bali Web Design

Posted on May 8, 2009 - by ruby

Cufon text replacement with canvas and VML

Miscellaneous

For web designers among you who have been using sIFR, facelift or other image replacement techniques, and has facing problems in particular browser then you may need to try Cufon, a fast text replacement with canvas and VML.

Cufón aims to become a worthy alternative to sIFR, which despite its merits still remains painfully tricky to set up and use. To achieve this ambitious goal the following requirements were set and have been met:

  1. No plug-ins required – it can only use features natively supported by the client
  2. Compatibility – it has to work on every major browser on the market
  3. Ease of use – no or near-zero configuration needed for standard use cases
  4. Speed – it has to be fast, even for sufficiently large amounts of text

Cufón consists of two individual parts – a font generator, which converts fonts to a proprietary format and a rendering engine written in JavaScript. Cufon has been tested in Internet Explorer 6, 7 and 8, Mozilla Firefox 1.5+, Safari 3+, Opera 9.5+ & Google Chrome.

Cufón has been designed with developers in mind. Therefore the API is simple and configuration is usually not needed at all, as most of the needed information is provided by CSS style sheets.

The Implementation is pretty easy:

  1. Download Cufon (recommended the YUI-compressed version)
  2. Generate your personalized font
  3. Replacing the text:
    <script src="cufon-yui.js" type="text/javascript"></script>
    <script src="Frutiger_LT_Std_400.font.js" type="text/javascript"></script>
    <script type="text/javascript">
    	Cufon.replace('h1'); // replace as necessary
    </script>
    
  4. Avoid delay display in IE by adding this line just before body closing tag:
    <script type="text/javascript"> Cufon.now(); </script>

And you are done. Try some demos before you try it yourself :)

Share this article:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Ping.fm
  • Pownce
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • TwitThis
This entry was posted on Friday, May 8th, 2009 at 03:29 and is filed under Miscellaneous. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

1 Comment

We'd love to hear yours!



  1. Visit My Website

    November 6, 2009

    Permalink

    Rasterstudios said:

    This is great!, Thanks Ruby!



Leave a Comment

Here's your chance to speak.

  1. Name (required)

    Mail (required)

    Website

    Message

  • Most Popular Posts

    • { 108 } ResponsesPHP ajax login form using Jquery
    • { 79 } Responsesphp ajax tutorial create ajax based login form using jquery
    • { 71 } ResponsesASP Classic Programming Still Alive
    • { 53 } Responses63+ best practice to optimize PHP code performances
    • { 44 } ResponsesVideobox: Lightbox for videos
  • Latest Posts

    • PHP Newbie: Proper handling of Error & Exception in PHP
    • Why SEO lost importance
    • jQuery Mobile Announced : Touch-Optimized Web Framework for Smartphones & Tablets
    • Multiple Google Account Signin
    • Install, Configure & Running Memcache in Windows as Service
    • DynamicWP Image Cube Wordpress Plugin
    • New Wordpress 3.0 API menu_page_url
    • Wordpress 3.0 Custom Taxonomy
    • JQuery DataGrid Plugin Compass
    • Upgrading to upcoming CodeIgniter 2.0
  • Categories

    • advertorial
    • Ajax XMLHttpRequest
    • Featured
    • Freebies
    • Miscellaneous
    • Print & Web Design
    • Programming
    • Tutorials
    • Web 2.0
  • Featured News

    • PHP Newbie: Proper handling of Error & Exception in PHP by webmaster on August 18, 2010
    • Why SEO lost importance by webmaster on August 16, 2010
    • jQuery Mobile Announced : Touch-Optimized Web Framework for Smartphones & Tablets by webmaster on August 16, 2010
    • Install, Configure & Running Memcache in Windows as Service by webmaster on June 27, 2010
    • Website Optimization Best Practices, speed up your website load by ruby on May 21, 2009
  • Tag Cloud

    • Actionscript advertorial Ajax XMLHttpRequest API best practices CakePHP chat Classic ASP CMS CSS Development facebook firefox Flash flickr Freebies gmail HTML icons Javascript Jobs jQuery jQuery Plugins Library Lightbox memcache Mootools news Personal PHP PHP Frameworks plurk Print & Web Design prism Prototype regex regular expression Scriptaculous SEO Tutorial twitter Web 2.0 Wordpress Works YUI
  • Archives

    • August 2010
    • June 2010
    • May 2010
    • September 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
copyleft 2007 - 2010 Bali Website Design Studio