• Home
  • Services
  • Profile
  • Portfolio
  • Contact
  • Links
  • Blog
  • Archives
  • Sitemap
Subscribe: Posts | Comments | E-mail
  • Ajax
  • Design
  • Development
  • Freebies
  • IT News
  • Miscellaneous
  • Programming
  • Tutorials
  • Web 2.0

Bali Web Design

Posted on May 8, 2009 - by ruby

Cufon text replacement with canvas and VML

Development

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
  • 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 Development. 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

  • Ad Ad Ad Ad
  • Recommended Links

  • Featured News

    • PHP Class Create Short URL via TinyURL, Is.gd, Hex.io, Tr.im & Bit.ly API by webmaster on September 24, 2009
    • How to embed plurk status in wordpress blog by ruby on September 12, 2009
    • Website Optimization Best Practices, speed up your website load by ruby on May 21, 2009
    • Prism Firefox Extension, bring your web apps to the desktop by ruby on May 11, 2009
    • Troubleshoots During Migration by webmaster on March 7, 2009
  • Latest Entry

    • PHP Class Create Short URL via TinyURL, Is.gd, Hex.io, Tr.im & Bit.ly API
    • How to embed plurk status in wordpress blog
    • Scripty2 the successor of script.aculo.us
    • Social Network Icon Pack
    • jQuery validation engine, jquery inline form validation
  • Tag Cloud

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

    • { 80 } ResponsesPHP ajax login form using Jquery
    • { 79 } Responsesphp ajax tutorial create ajax based login form using jquery
    • { 57 } ResponsesASP Classic Programming Still Alive
    • { 50 } Responses63+ best practice to optimize PHP code performances
    • { 37 } ResponsesVideobox: Lightbox for videos
© 2007 - 2010 Bali Web Design all rights reserved
Powered by wordpress Theme by woothemes