<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>DivitoDesign &#187; sIFR</title> <atom:link href="http://divitodesign.com/tag/sifr/feed/" rel="self" type="application/rss+xml" /><link>http://divitodesign.com</link> <description>Articles, Tutorials and Resources for the Webdesigner</description> <lastBuildDate>Fri, 07 Oct 2011 18:47:18 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>Implant sIFR3 &#8211; A Healthy Alternative to Browser Text</title><link>http://divitodesign.com/typography/implant-sifr3-healthy-alternative-browser-text/</link> <comments>http://divitodesign.com/typography/implant-sifr3-healthy-alternative-browser-text/#comments</comments> <pubDate>Mon, 29 Sep 2008 19:30:39 +0000</pubDate> <dc:creator>Stefan Vervoort</dc:creator> <category><![CDATA[Typography]]></category> <category><![CDATA[Guide]]></category> <category><![CDATA[sIFR]]></category><guid isPermaLink="false">http://www.divitodesign.com/?p=671</guid> <description><![CDATA[Last year I have written a tutorial about sIFR. I covered a basic installation guide for sIFR version 2.0 and as of today, it is really out-dated. sIFR version 3 is out for some time now and has some more interesting and better features. Let&#8217;s learn how to install the new sIFR 3 to your [...]]]></description> <content:encoded><![CDATA[<p>Last year I have written <a href="http://www.divitodesign.com/2007/08/start-using-sifr-on-your-website/">a tutorial about sIFR</a>. I covered a basic installation guide for sIFR version 2.0 and as of today, it is really out-dated. sIFR version 3 is out for some time now and has some more interesting and better features.</p><p>Let&#8217;s learn how to install the new sIFR 3 to your website!</p><h2>Basic Information about sIFR</h2><p>sIFR is the &#8220;Healthy alternative to browser text&#8221;, regarding to the authors <a href="http://www.mikeindustries.com/sifr">Mike Davidson</a> and <a href="http://novemberborn.net/">Mark Wubben</a>. With sIFR it is possible to display fonts on the internet that doesn&#8217;t have to be installed on the computer of the user. sIFR creates more <a href="http://www.divitodesign.com/2008/09/css-typography-tips-and-examples/">typography</a> <a href="http://www.divitodesign.com/2008/08/fonts-on-the-internet-what-are-our-options/">options</a> for the web!</p><p>The technique is a combination between <strong>Flash</strong>, <strong>JavaScript, CSS</strong> and <strong>HTML.</strong> Due this fact you have to remember to use sIFR only on important titles and subtitles because otherwise it might drastically slow down your site.</p><h2>How does sIFR work?</h2><p>sIFR has a system that really works great. The browser of your visitor (sIFR is supported by almost all browsers that support Javascript and Flash!) loads a basic web page. Javascript checks if Flash is supported and if this is the case, Javascript adds tags around the elements that will use sIFR.</p><p>Flash will now automatically load Flash movies where the new tags are located and ActionScript fills your Flash movie with the text, typeface and size. This all happens in split seconds!</p><h2>What if Javascript or Flash is not supported?</h2><p>If this is the case, the browser will load the web page normally, those visitors doesn&#8217;t even know they are missing the fun. That&#8217;s why sIFR is perfect: It doesn&#8217;t delete the original <em>h1, h2, h3</em> or any other tag, which makes this technique pretty, accessible and <strong>search engine friendly</strong>!</p><h2 class="tag">Installation to your website</h2><p>The installation and customization of sIFR on your website isn&#8217;t something you do in 30 seconds. Take your time and read this guide chapter by chapter and you will fly through it!</p><h3>Table of Contents</h3><ol><li><em>Download The Files You Need </em></li><li><em>Generate The </em><em>yourtypeface.swf File</em></li><li><em>Uploading Files<br /> </em></li><li><em>Implant sIFR Into Website</em></li><li><em>Configure sIFR<br /> </em></li><li><em>Style sIFR Titles<br /> </em></li><li><em>HTML Items Inside Your sIFR Title<br /> </em></li><li><em>Examples</em></li></ol><p><span id="more-671"></span></p><h2>1. Download The Files You Need</h2><p>After a search for the latest version, I have found the directory where all the nightly releases are located. <a href="http://dev.novemberborn.net/sifr3/nightlies/">You should download the latest version</a>. The version I will use in this tutorial is <a href="http://dev.novemberborn.net/sifr3/nightlies/sifr3-r419.zip">sifr3-r419.zip</a>.</p><p>When you downloaded these files you should see <em>four</em> folders. Three of them (<strong>flash, css</strong> and<strong> js</strong>) contain the files we need to install sIFR so make sure you have a click away.</p><h2>2. Generate the yourtypeface.swf file</h2><p>We will use the <a href="http://www.sifrgenerator.com/">sIFR Generator</a> to do the job. It is also possible to use a Flash editing program like Adobe&#8217;s Flash CS, but I thought this way it is easier. You simply choose a TrueType typeface and walk through a wizard and your sIFR file is ready to go.</p><h3>Walk through the Wizard</h3><ul><li>Open the <a href="http://www.sifrgenerator.com/wizard.html">Wizard</a> page</li><li>Upload your TrueType (.ttf) font file &#8211; <em>if it doesn&#8217;t select from the C:/Windows/Fonts folder, try copying it to some other folder.</em></li><li>Choose sIFR version 3.419 &#8211; <em>Maybe there are newer versions when you read this, that should be alright too!</em></li><li>Choose Glyph Set<strong> </strong>- <em>The more options to choose the bigger the sIFR file; you should select what you prefer.</em></li><li>Type the Anti Spam words.</li><li>Preview and download your sIFR file!</li></ul><p>That&#8217;s all. You have your <em>yourtypeface.swf</em> sIFR file ready for use. Move on to the next step! <em>I would like to thank <a href="http://www.sifrgenerator.com/">sIFR Generator</a> for this awesome tool.</em></p><h2>3. Uploading Files</h2><p>After we generated our <em>yourtypeface.swf</em> file, we are ready to implant sIFR into the website, but first you should upload these <strong>three</strong> files:</p><ul><li><em>js/sifr-config.js</em></li><li><em>js/sifr.js</em></li><li><em>yourtypeface.swf</em></li></ul><p>sIFR also needs some styles to operate (<em>sIFR-screen.css</em> and <em>sIFR-print.css</em>). You can find in the <strong>css</strong> folder and you have two options to go with this. You could choose to upload these files to your webserver with the other files, or you could add these styles to your current <strong>media </strong>and <strong>print</strong> stylesheets. That saves us a couple extra miliseconds when the page loads.</p><h2>4. Implant sIFR Into Website</h2><p>To load sIFR to your website, we have to call for some Javascript files with these codes:</p><div class="fvch-code"><pre class="fvch-line-numbers">1
2
3
</pre><pre><span class="html"><span class="html-script-element">&lt;script src=<span class="html-attribute">&quot;/path/sifr.js&quot;</span> type=<span class="html-attribute">&quot;text/javascript&quot;</span>&gt;<span class="js"><span class="js"></span></span>&lt;/script&gt;</span>
 <span class="html-script-element">&lt;script src=<span class="html-attribute">&quot;/path/sifr-config.js&quot;</span> type=<span class="html-attribute">&quot;text/javascript&quot;</span>&gt;<span class="js"><span class="js"></span></span>&lt;/script&gt;</span></span></pre></div><p>Change <em>path</em> to the folder(s) where you have uploaded your files.</p><h2>5. Configure sIFR</h2><p>Next we will configure sIFR so it loads the correct <em>yourtypeface.swf </em>file. You should open up <em>sifr-config.js </em>located in the <strong>js</strong> folder.</p><h3>sifr-config.js</h3><p>This file will be used to configure the options we have with sIFR at the moment. I remember the time I had written the sIFR 2.0 tutorial and the options were everywhere! It has been much more organized.</p><p>Once you&#8217;ve opened <em>sifr-config.js</em> and you will notice there isn&#8217;t anything in there yet. We have to add the options ourselves. Let&#8217;s say we&#8217;ve generated a <em>.swf </em>file with the typeface <em>yourtypeface</em> you will use the following codes:</p><div class="fvch-code"><pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre><pre><span class="js"><span class="js-reserved-keyword">var</span> yourtypeface <span class="js-operator">=</span> <span class="js-bracket">{</span>
src<span class="js-operator">:</span> <span class="js-string">'/path/yourtypeface.swf'</span>
<span class="js-bracket">}</span>;

sIFR.activate<span class="js-bracket">(</span>yourtypeface<span class="js-bracket">)</span>;

sIFR.<span class="js-native-keyword">replace</span><span class="js-bracket">(</span>yourtypeface, <span class="js-bracket">{</span>
selector<span class="js-operator">:</span> <span class="js-string">'h2.sifr-title'</span>
<span class="js-bracket">}</span><span class="js-bracket">)</span>;</span></pre></div><h3>Explanation Javascript</h3><p>As you can see, the selector (the title we will add sIFR too) is called for by this element &lt;h2 class=&#8221;sifr-title&#8221;&gt;. You can change that to your likings.</p><p>If you used the typeface <a href="http://www.designworkplan.com/typography-fonts/ff-meta-is-everywhere.htm">Meta</a> when generating your file, your <em>.swf</em> file is named <em>meta.swf. </em>You can use these codes instead:</p><div class="fvch-code"><pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre><pre><span class="js"><span class="js-reserved-keyword">var</span> meta <span class="js-operator">=</span> <span class="js-bracket">{</span>
src<span class="js-operator">:</span> <span class="js-string">'/path/meta.swf'</span>
<span class="js-bracket">}</span>;

sIFR.activate<span class="js-bracket">(</span>meta<span class="js-bracket">)</span>;

sIFR.<span class="js-native-keyword">replace</span><span class="js-bracket">(</span>meta, <span class="js-bracket">{</span>
selector<span class="js-operator">:</span> <span class="js-string">'h2.sifr-title'</span>
<span class="js-bracket">}</span><span class="js-bracket">)</span>;</span></pre></div><p>You get the picture, right? After you saved this file and uploaded it to your web-server, you will see that sIFR 3.0 is working!</p><h2>6. Style sIFR Titles</h2><p>But, sIFR doesn&#8217;t stop with this basic stuff, there is loads more possible. For example, we could add some CSS that makes your titles look better.</p><p>Open <em>sIFR-screen.css</em> (in the <strong>css</strong> folder) and add <em>visibility:hidden;</em> to <em>.sIFR-active h2.sifr-title.</em> This will hide the standard HTML text when sIFR is loading. The <em>.sIFR-active</em> element makes sure the HTML text does show when sIFR isn&#8217;t working.</p><h3>CSS</h3><div class="fvch-code"><pre class="fvch-line-numbers">1
2
3
4
5
</pre><pre><span class="css">.sIFR-active h2.sifr-title{
<span class="css-property">visibility<span class="css-selector">:</span><span class="css-value"> hidden</span></span>; <span class="css-property">line-height<span class="css-selector">:</span><span class="css-value">1em</span></span>;
}</span></pre></div><h3>Javascript</h3><p>We can change the font-size, background color and more via the Javascript string we have seen in <strong>step 5</strong>. Not every CSS rule is supported, so check out what&#8217;s possible on the <a href="http://wiki.novemberborn.net/sifr3/Styling">Styling wiki</a>.</p><div class="fvch-code"><pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre><pre><span class="js"><span class="js-reserved-keyword">var</span> yourtypeface <span class="js-operator">=</span> <span class="js-bracket">{</span>
src<span class="js-operator">:</span> <span class="js-string">'/path/yourtypeface.swf'</span>
<span class="js-bracket">}</span>;

sIFR.activate<span class="js-bracket">(</span>yourtypeface<span class="js-bracket">)</span>;

sIFR.<span class="js-native-keyword">replace</span><span class="js-bracket">(</span>yourtypeface, <span class="js-bracket">{</span>
selector<span class="js-operator">:</span> <span class="js-string">'h2.sifr-title'</span>,
css<span class="js-operator">:</span> <span class="js-string">'h2.sifr-title{ font-size:14px; background-color:#cccccc; }'</span>
<span class="js-bracket">}</span><span class="js-bracket">)</span>;</span></pre></div><h2>7. HTML Items Inside Your sIFR Title</h2><p>sIFR has also the possibility to add <em>em, </em><strong>strong</strong> or even links (or anything else) inside your title. These kind of features make sIFR really awesome in use.</p><p>Styling goes as following:</p><div class="fvch-code"><pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre><pre><span class="js"><span class="js-reserved-keyword">var</span> yourtypeface <span class="js-operator">=</span> <span class="js-bracket">{</span>
src<span class="js-operator">:</span> <span class="js-string">'/path/yourtypeface.swf'</span>
<span class="js-bracket">}</span>;

sIFR.activate<span class="js-bracket">(</span>yourtypeface<span class="js-bracket">)</span>;

sIFR.<span class="js-native-keyword">replace</span><span class="js-bracket">(</span>yourtypeface, <span class="js-bracket">{</span>
selector<span class="js-operator">:</span> <span class="js-string">'h2.sifr-title'</span>,
,css<span class="js-operator">:</span> <span class="js-bracket">[</span>
<span class="js-string">'h2.sifr-title{ font-size: 14px; background-color: #CCCCCC; }'</span>
,<span class="js-string">'em { font-style:italic;; }'</span>
,<span class="js-string">'strong { font-weight:bold; }'</span>
,<span class="js-string">'a { text-decoration: none; }'</span>
,<span class="js-string">'a:hover { text-decoration: underline; }'</span>
<span class="js-bracket">]</span>

<span class="js-bracket">}</span><span class="js-bracket">)</span>;</span></pre></div><h2>8. Examples</h2><p>Everyone would like to see some examples where sIFR is used to see how it works and looks.</p><ul><li><a href="/dd-articles/sIFR-demo/">Default Demo Example</a></li><li><a href="http://www.blitzmagonline.com/">Blitz Magazine Online</a></li><li><a href="http://www.jindou.com.au/">Jindou</a></li><li><a href="http://www.jindou.com.au/">Streetlamp</a></li><li><a href="http://www.deafcando.org.au/">Deaf Can Do</a></li><li><strong><a href="http://wiki.novemberborn.net/sifr3/Examples">Need more Examples?</a></strong></li></ul><h2>You want more?</h2><p>sIFR doesn&#8217;t stop with the information I gave you here, many more things are possible. Here are some resources that you might enjoy.</p><ul><li><a href="http://www.mikeindustries.com/sifr">Mike Davidson</a> and <a href="http://novemberborn.net/">Mark Wubben</a> &#8211; Authors of sIFR! Keep up the good work guys!<a href="http://novemberborn.net/"><br /> </a></li><li><a href="http://wiki.novemberborn.net/sifr3">Official sIFR wiki</a> &#8211; Includes extra information about <a href="http://wiki.novemberborn.net/sifr3/Styling">Styling</a>, <a href="http://wiki.novemberborn.net/sifr3/JavaScript+Configuration">Javascript Configuration</a> and many more.</li><li><a href="http://www.sifrgenerator.com/">sIFR Generator</a></li><li><a href="http://en.wikipedia.org/wiki/Scalable_Inman_Flash_Replacement">Wikipedia Page</a></li><li><a href="http://discuss.joyent.com/viewforum.php?id=20">Forum dedicated to sIFR</a> &#8211; Go there for your advanced questions!</li></ul><p><strong><em>Keep in mind that I am a human too, so if you have found any bug, typo or error, please <a href="#respond">let me know</a> to make this tutorial as helpful as possible. </em></strong></p> ]]></content:encoded> <wfw:commentRss>http://divitodesign.com/typography/implant-sifr3-healthy-alternative-browser-text/feed/</wfw:commentRss> <slash:comments>31</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 9/12 queries in 0.003 seconds using disk: basic
Object Caching 309/309 objects using disk: basic

Served from: divitodesign.com @ 2012-05-22 10:52:07 -->
