<?xml version="1.0" encoding="utf-8"?>
<!-- generator="wordpress/2.2" -->
<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/"
	>

<channel>
	<title>fortes.com &#187; Sistr</title>
	<link>http://fortes.com</link>
	<description>Typed live in front of a studio audience in Seattle</description>
	<pubDate>Fri, 25 Jan 2008 17:39:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>
	<language>en</language>
			<item>
		<title>Introducing Sistr</title>
		<link>http://fortes.com/2007/09/17/introducing-sistr/</link>
		<comments>http://fortes.com/2007/09/17/introducing-sistr/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 23:20:58 +0000</pubDate>
		<dc:creator>fil</dc:creator>
		
		<category><![CDATA[Sistr]]></category>

		<category><![CDATA[Silverlight]]></category>

		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://fortes.com/2007/09/17/introducing-sistr/</guid>
		<description><![CDATA[


Over the weekend I spent some time seeing if I could replicate the functionality found in the excellent sIFR, using Silverlight instead of Flash. The result is Sistr. For the impatient &#8212; here&#8217;s a demo test page.
Note: This definitely isn&#8217;t ready for a production site, this is an early version for feedback purposes only. There [...]]]></description>
			<content:encoded><![CDATA[<ul class="photo">
<li><a href="http://flickr.com/photos/fortes/1337717840/"><img src="http://farm2.static.flickr.com/1255/1337717840_78497e0379.jpg" alt="Plane Engine over the midwest" /></a></li>
</ul>
<p>Over the weekend I spent some time seeing if I could replicate the functionality found in the excellent <a href="http://www.mikeindustries.com/sifr">sIFR</a>, using <a href="http://silverlight.net/">Silverlight</a> instead of Flash. The result is <a href="http://fortes.com/projects/silverlight/sistr">Sistr</a>. For the impatient &#8212; here&#8217;s a <a href="http://static.fortes.com/projects/silverlight/sistr/side-by-side.html">demo test page</a>.</p>
<p><strong>Note:</strong> This <em>definitely</em> isn&#8217;t ready for a production site, this is an early version for feedback purposes only. There are still plenty of bugs, trust me.</p>
<h3>Usage</h3>
<ol>
<li>Download <a href="http://static.fortes.com/projects/silverlight/sistr/sistr.js"><tt>sistr.js</tt></a> and save it to your web server (or reference it directly from <a href="http://static.fortes.com/projects/silverlight/sistr/sistr.js">this site</a>).</li>
<li>Create a zip file with the font(s) you wish to use. Upload this to your webserver as well (Silverlight will only use fonts that are retrieved via HTTP).</li>
<li>Add the following into your HTML page:
<pre><code class="html sch">&lt;script type=&quot;text/javascript&quot; src=&quot;sistr.js&quot;&gt;&lt;/script&gt;</code></pre>
</li>
<li>In your CSS file, define a new class called <code>sistr-replace</code> (anything that starts with &#8220;sistr-&#8221; works). Here&#8217;s an example:
<pre><code class="html sch">.sistr&#x002D;replace { }</code></pre>
</li>
<li>Use the <code>font-family</code> property to set the font name and URL to the font files, enclose them in quotes and separate with the &#8220;|&#8221; character (e.g. <code>font-family: "Fil's Font|filfont.zip"</code>). Make sure you also specify backup fonts for users who don&#8217;t have Silverlight installed, like so:
<pre><code class="html sch">.sistr&#x002D;replace { font&#x002D;family: &quot;FontName|fonts.zip&quot;, Verdana, Arial, Sans&#x002D;Serif; }</code></pre>
</li>
<li>Set the <code>class</code> property on some of your HTML elements to <code>sistr-replace</code> (or whatever else you used) and re-load. For example:
<pre><code class="html sch">&lt;h3 class=&quot;entry&#x002D;title sistr&#x002D;replace&quot;&gt;Hello World!&lt;/h3&gt;</code></pre>
</li>
<li>Your text should now be rendered using Silverlight.</li>
</ol>
<p>Take a look at the <a href="http://static.fortes.com/projects/silverlight/sistr/side-by-side.html">demo test page</a> as well.</p>
<h3>Pros &#038; Cons vs. sIFR</h3>
<p>Pro:</p>
<ul>
<li><strong>Simpler setup</strong>: All you need to do is include the <tt>sistr.js</tt> file in your page and edit your CSS &#8212; you do not need to edit any Silverlight or JavaScript code. sIFR is pretty easy too, but you need the Flash editing program in order to create a SWF file.</li>
<li><strong>Support for Transparent Backgrounds</strong>: sIFR provides partial support, but it&#8217;s not recommended within Firefox (I believe this is an issue with Flash).</li>
</ul>
<p>Con:</p>
<ul>
<li><strong>Lack of Silverlight Install Base</strong>: Silverlight is nowhere near as common as Flash.</li>
<li><strong>No protection for Font Files</strong>: In order to use a custom font with Silverlight, you have to have the font file available for download on a web server &#8212; you cannot embed it or protect it in any way. This means you must use fonts that you either created or are liberally licensed (public domain, etc).</li>
<li><strong>Immature</strong>: Both Flash and sIFR are much, much more mature than Silverlight and Sistr. There are many bugs that I have not sorted out yet.</li>
<li><strong>Many limitations</strong>: See below</li>
</ul>
<h3>Known Issues</h3>
<ul>
<li><strong>No support for line height</strong>: Limitation in Silverlight</li>
<li><strong>Must use absolute units for <code>font-size</code> in IE</strong>: Due to IE&#8217;s lack of a <code>getComputedStyle</code> equivalent.</li>
<li><strong>Occasional sizing issues</strong>: I think this may be a Silverlight bug, but occasionally text will get cut off in the vertical direction. Not sure how to fix it yet</li>
<li><strong>Font size doesn&#8217;t respond to user changes</strong>: Works fine if you reload though</li>
<li><strong>No support for <code>:hover</code> state</strong></li>
<li><strong>No support for nested hyperlinks</strong></li>
<li><strong>Text selection does not work</strong>: Not sure how screen readers react either</li>
<li><strong>Cannot support nested bold in Firefox</strong>: Works in IE though</li>
</ul>
<p>Let me know if you find others &#8212; or want to help fix bugs!</p>
]]></content:encoded>
			<wfw:commentRss>http://fortes.com/2007/09/17/introducing-sistr/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.849 seconds -->
