<?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>Wirtuals.pl - PHP, XML, (x)HTML, JavaScript (AJAX), CSS &#187; JavaScript</title>
	<atom:link href="http://wirtuals.pl/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://wirtuals.pl</link>
	<description></description>
	<lastBuildDate>Tue, 13 Dec 2011 15:00:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>cufón &#8211; fonts for the people</title>
		<link>http://wirtuals.pl/2011/01/13/cufon-fonts-for-the-people/</link>
		<comments>http://wirtuals.pl/2011/01/13/cufon-fonts-for-the-people/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 15:22:32 +0000</pubDate>
		<dc:creator>Qiun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wirtuals.pl/?p=151</guid>
		<description><![CDATA[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: No plug-ins required – it can only use features natively supported by the client Compatibility – it has to work on every major [...]<p><a href="http://wirtuals.pl/2011/01/13/cufon-fonts-for-the-people/">cufón &#8211; fonts for the people</a> is a post from: <a href="http://wirtuals.pl">Wirtuals.pl - informacje z Å�wiata internetu</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Cufón aims to become a worthy alternative to <a href="http://wiki.novemberborn.net/sifr/">sIFR</a>,  which despite its merits still remains painfully tricky to set up and  use. To achieve this ambitious goal the following requirements were set:</p>
<ol>
<li>No plug-ins required – it can only use features natively supported by the client</li>
<li>Compatibility – it has to work on every major browser on the market</li>
<li>Ease of use – no or near-zero configuration needed for standard use cases</li>
<li>Speed – it has to be fast, even for sufficiently large amounts of text</li>
</ol>
<p>And now, after nearly a year of planning and research we believe that these requirements have been met.</p>
<h2>So, how does it work?</h2>
<p>Cufón consists of two individual parts – a <a href="http://cufon.shoqolate.com/generate/">font generator</a>, which converts fonts to a proprietary format and a rendering engine written in <a href="http://en.wikipedia.org/wiki/JavaScript">JavaScript</a>.</p>
<h3>The generator</h3>
<div>
<p><img src="https://assets2.github.com/img/d263c27d9e3490e754fe3ad6ffcc57d51eb53ed6?repo=&amp;url=http%3A%2F%2Fcufon.shoqolate.com%2Fdoc%2FGeneration.png&amp;path=" alt="" /></p>
</div>
<p>In reality the generator is little more than a web-based interface to <a href="http://fontforge.sourceforge.net/">FontForge</a>. First, the generator builds a custom <a href="http://fontforge.sourceforge.net/scripting-tutorial.html">FontForge script</a> based on user input and then runs it, saving the result as an <a href="http://www.w3.org/TR/SVG/">SVG</a> font. The SVG font is then parsed and SVG paths are converted to VML paths. This is a crucial step in achieving stellar performance in Internet Explorer, as it supports <a href="http://www.w3.org/TR/NOTE-VML.html">VML</a> natively. The resulting document is then converted into <a href="http://www.json.org/">JSON</a> with a mix of functional JavaScript. This has numerous advantages:</p>
<ol>
<li>To include a font, you only need to load it with the standard <code>&lt;script&gt;</code> tag as any other JavaScript file and it will be registered automatically</li>
<li>There is no need to manually parse the file on client-side again</li>
<li>External JavaScript files block execution until they have loaded, which helps us to achieve a flicker-free, clean replacement</li>
<li>It compresses extremely well. While often somewhat large in terms  of file size without any compression, a compressed font usually weighs  in 60-80% less than the original.</li>
</ol>
<p>The process is then repeated for the rest of the fonts given to  the generator (if any) and the resulting JavaScript file is sent back to  the client with a distinctive filename.</p>
<h3>The renderer</h3>
<p>The renderer is a bit more complicated. It consists of 3 parts – a Core, which provides the API and common functionality, and two rendering engines. One of them renders VML shapes and is used for Internet Explorer (it supports VML from version 5.5), while the other one uses the widely supported <a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML5</a> <a href="http://www.whatwg.org/specs/web-apps/current-work/#the-canvas-element"><code>&lt;canvas&gt;</code></a> element. Due to the path data already being VML, little work is needed in the VML  engine. The canvas engine, however, must convert all paths to the  corresponding sets of drawing commands provided by the canvas API.  This turned out to be somewhat tricky at first, but a solution was  found after two complete rewrites in the form of code generation and  caching, resulting in a <a href="http://bkwld.com/blog/2009/06/cufon-speed-test/">very fast</a> renderer.</p>
<p><a href="http://wiki.svg.org/Inline_SVG">Inline SVG</a> was also considered but quickly turned down due to it being  surprisingly slow in the few browsers that actually support it properly.</p>
<p>More: <a href="http://cufon.shoqolate.com">http://cufon.shoqolate.com</a></p>
<p><a href="http://wirtuals.pl/2011/01/13/cufon-fonts-for-the-people/">cufón &#8211; fonts for the people</a> is a post from: <a href="http://wirtuals.pl">Wirtuals.pl - informacje z Å�wiata internetu</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wirtuals.pl/2011/01/13/cufon-fonts-for-the-people/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The small calendar 2010</title>
		<link>http://wirtuals.pl/2010/02/24/the-small-calendar-2010/</link>
		<comments>http://wirtuals.pl/2010/02/24/the-small-calendar-2010/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 19:06:35 +0000</pubDate>
		<dc:creator>Qiun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://wirtuals.pl/?p=92</guid>
		<description><![CDATA[The small calendar 2010 The small calendar 2010 is a post from: Wirtuals.pl - informacje z Å�wiata internetu<p><a href="http://wirtuals.pl/2010/02/24/the-small-calendar-2010/">The small calendar 2010</a> is a post from: <a href="http://wirtuals.pl">Wirtuals.pl - informacje z Å�wiata internetu</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.grafishdesign.it/blog/the-small-calendar-eng">The small calendar 2010</a></p>
<p><a href="http://wirtuals.pl/2010/02/24/the-small-calendar-2010/">The small calendar 2010</a> is a post from: <a href="http://wirtuals.pl">Wirtuals.pl - informacje z Å�wiata internetu</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wirtuals.pl/2010/02/24/the-small-calendar-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use PHP functions in JavaScript</title>
		<link>http://wirtuals.pl/2010/02/15/use-php-functions-in-javascript/</link>
		<comments>http://wirtuals.pl/2010/02/15/use-php-functions-in-javascript/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 11:46:24 +0000</pubDate>
		<dc:creator>Qiun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://wirtuals.pl/?p=78</guid>
		<description><![CDATA[Use PHP functions in JavaScript Use PHP functions in JavaScript is a post from: Wirtuals.pl - informacje z Å�wiata internetu<p><a href="http://wirtuals.pl/2010/02/15/use-php-functions-in-javascript/">Use PHP functions in JavaScript</a> is a post from: <a href="http://wirtuals.pl">Wirtuals.pl - informacje z Å�wiata internetu</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://phpjs.org/">Use PHP functions in JavaScript</a></p>
<p><a href="http://wirtuals.pl/2010/02/15/use-php-functions-in-javascript/">Use PHP functions in JavaScript</a> is a post from: <a href="http://wirtuals.pl">Wirtuals.pl - informacje z Å�wiata internetu</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wirtuals.pl/2010/02/15/use-php-functions-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

