Skip to main content

Cufon Library for using attractive fonts in website

The fonts used in websites for displaying titles, headings or subheadings have much importance in improving readability of the website. There are variety of pretty fonts available that can be used to render contents various HTML tags like H1,H2,B,I etc. One issue that could happen is, if the client machine doesn't have your applied font then it renders with available font. A very good and effective solution for this is the use of Cufon Library (Cufon Script) for rendering the HTML contents using your desired font. Cufon doesn’t use Flash technology (like sIFR*) to render fonts. Cufon simply changes selected text elements to the <canvas> HTML5 tag.

No plug-ins required for Cufon, it is fast and easy to implement, recent version of cufon script works with all major browsers.

It is simple to install Cufon script in your webpages.

At First, download the latest version of "cufon-yui.js" file from Cuffons website.

Next, download your favourite font from any of the web sources like openfontlibrary.org.

for using with cufon, the font shoulf be converted to JS format, for this take Cufon Generator page

In the "Regular typeface" field Browse for your font which was downloaded earlier and select it

Check the option "The EULAs of these fonts allow Web Embedding (without Adobe Flash)"

In the "Include following Glyphs" section, check the items upto "wordpress punctation" field omit rest if not needed.

Accept terms and click "Lets do this" button to generate the JS format of your font.

Upload this files to your Javascript files folder.

scripts/cufon/cufon-yui.js
scripts/cufon/myfavoritefont_bold_300.font.js

Next is to call this files in your web pages you can do it like this: include this in head section

<script src="scripts/cufon/cufon-yui.js" type="text/javascript"></script>
<script src="scripts/cufon/myfavoritefont_bold_300.font.js" type="text/javascript"></script>

You have to initialise the Cufon text replacement by calling following code - the code says Cufon must replace the contents in h1 and b tags with a html5 canvas tag and render the text with your desired font style.

<script type="text/javascript">
Cufon.replace('h1');
Cufon.replace('b');
</script>


Similarly you can use multiple font for different tags:

<script src="scripts/cufon/cufon-yui.js" type="text/javascript"></script>
<script src="scripts/cufon/myfavoritefont_bold_300.font.js" type="text/javascript"></script>
<script src="scripts/cufon/myotherfavoritefont_italic_500.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h1', { fontFamily: 'myfavoritefont' });
Cufon.replace('h2', { fontFamily: 'myotherfavoritefont' })
</script>

CUFON AND IE9 ISSUE - SOLUTION


CUFON WEBSITE
DOWNLOAD LATEST CUFON LIBRARY
CUFON GENERATOR PAGE
DOWNLOAD SCRIPT IMPLEMENTATION
HOW CUFON WORKS

Other Interesting Stuffs:

sIFR
*Scalable Inman Flash Replacement (sIFR) is an open source JavaScript and Adobe Flash dynamic web fonts implementation, enabling the replacement of text elements on HTML web pages with Flash equivalents.
Read more about sIFR JS Library

Web Font Sources
http://openfontlibrary.org/

Google Web Fonts API
The Google Web Fonts API helps you add web fonts to any web page. Benefits of the Google Web Fonts API include: A choice of high quality open source fonts.
Google web fonts - For Free optimised web fonts from Google library which can be used in your website.
like:

<link href='http://fonts.googleapis.com/css?family=Macondo+Swash+Caps' rel='stylesheet' type='text/css'>
read more..

Comments

Popular posts from this blog

How to delete videos from your Youtube Watch History list?

How to Delete Individual or all videos from your Youtube Watch History list? Youtube keeps a fine record of the videos that you had watched earlier. You can view this by visiting the History section. If you want to remove the video's from the list do the following: Logon to Youtube and click on the "History" tab on the left menu to view Watch History ( Read more ) There will be check boxes corresponding to each video in the list Tick the check boxes of the videos which you want to remove Click on " Remove " button to delete the videos.

ICICI prudential Customer portal updated - Option to change password is missing - Know how to change your ICICI prudential password

Recently I received an SMS from ICICI prudential asking for login to their website's customer portal using the phone number as user Id and an autogenerated one time password given in the message as password. The SMS messsage was like this. Dear ***Cust Name*** login to your policy(ies) on www.iciciprulife.com with your user id as **mobile number*** and One time use password as ***password***

What are the Income Tax Rates for Indian citizens for Financial Year 2017-2018?

Income Tax Slab and Rates given below are for Indian citizens of age less than 60. This rates are applicable for the Financial Year 2017-2018 Income Tax Slab Rates Financial Year 2017-2018 Assessment Year 2018-19 Income Tax Slab Rates SLAB 1 Individuals whose total income not exceeding Rs. 2,50,000 ( 2.5 lakhs ) They are exempted from paying income tax.


Urgent Openings for PHP trainees, Andriod / IOS developers and PHP developers in Kochi Trivandrum Calicut and Bangalore. Please Send Your updated resumes to recruit.vo@gmail.com   Read more »
Member
Search This Blog