<?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>Webmonkey &#187; @font-face</title>
    <atom:link href="http://www.webmonkey.com/tag/font-face/feed/" rel="self" type="application/rss+xml" />
    <link>http://www.webmonkey.com</link>
    <description>The Web Developer&#039;s Resource</description>
    <lastBuildDate>Mon, 06 May 2013 17:29:19 +0000</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <generator>http://wordpress.org/?v=3.4.2</generator>
    
    <item>
        <title>Decoding Web Fonts With &#8216;What Font&#8217;</title>
        <link>http://www.webmonkey.com/2011/04/decoding-web-fonts-with-what-font/</link>
        <comments>http://www.webmonkey.com/2011/04/decoding-web-fonts-with-what-font/#comments</comments>
        <pubDate>Fri, 08 Apr 2011 13:44:27 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=50516</guid>
        		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Visual Design]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[Fonts]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2011/04/whatfont.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2011/04/whatfont.jpg" alt="Decoding Web Fonts With &#8216;What Font&#8217;" /></div>Designers have been bemoaning the state of typography in the browser since the dawn of the web. However, CSS 3 and the @font-face rule go a long way toward improving your font options. Throw in tools like lettering.js and easy-to-use font services like TypeKit and it&#8217;s not hard to turn your site into something from [...]]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><div id="attachment_50517" class="wp-caption aligncenter" style="width: 590px"><a href="http://www.webmonkey.com/wp-content/uploads/2011/04/whatfont.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2011/04/whatfont.jpg" alt="" title="whatfont" width="580" height="283" class="size-full wp-image-50517" /></a><p class="wp-caption-text">What Font shows you which font a webpage is using</p></div>Designers have been bemoaning the state of typography in the browser since the dawn of the web. However, CSS 3 and the <code>@font-face</code> rule go a long way toward improving your font options. Throw in tools like <a href="http://www.webmonkey.com/2010/11/lettering-js-makes-complex-typography-easy/">lettering.js</a> and easy-to-use font services like <a href="http://www.webmonkey.com/2009/11/review_typekit_delivers_custom_web_fonts_to_the_masses/">TypeKit</a> and it&#8217;s not hard to turn your site into something from a typography nerd&#8217;s fantasies.</p>
<p>The days of only six font choices on the web are, thankfully, well behind us. Now you can choose from hundreds of fonts, whether you embed your own or use a service like Typekit. We see gorgeous typography on different sites everyday and sometimes we&#8217;re left wondering, what is that cool font?</p>
<p>That&#8217;s why we&#8217;re loving the <a href="http://chengyinliu.com/whatfont.html">What Font bookmarklet</a> from developer Chengyin Liu. What Font is a little JavaScript bookmarklet you can add to your favorite browser and then, when you want to know which font a site is using, just click the bookmark and hover the text in question. What Font will hover a small transparent overlay with the typeface name (see screenshot above).</p>
<p>To try it out, head on over to Liu&#8217;s site and drag the bookmarklet to your browser&#8217;s bookmarks bar.</p>
<p>It&#8217;s worth noting that you can get the same information from Firebug or the WebKit Inspector, but What Font doesn&#8217;t have the interface overhead of Firebug or WebKit&#8217;s developer tools &#8212; it just does one thing and does it well. Couple the What Font bookmarklet with <a href="http://www.webmonkey.com/2010/07/fontfonter-test-web-fonts-on-any-website/">FontFonter</a> and you can preview your website in your favorite new font in no time.</p>
<p><strong>See Also:</strong><br/></p>
<ul>
<li><a href="http://www.webmonkey.com/2010/11/adobe-shows-off-fancy-webkit-based-typography/">Adobe Shows Off Fancy WebKit-Based Typography</a></li>
<li><a href="http://www.webmonkey.com/2010/08/typekit-teams-up-with-adobe-to-offer-more-web-fonts/">Typekit Teams Up With Adobe to Offer More Web Fonts</a></li>
<li><a href="http://www.webmonkey.com/2010/07/fontfonter-test-web-fonts-on-any-website/">FontFonter: Test Web Fonts on Any Website</a></li>
<li><a href="http://www.webmonkey.com/2010/11/lettering-js-makes-complex-typography-easy/">Lettering.js Makes Complex Typography Easy</a></li>
<li><a href="http://www.webmonkey.com/2009/11/review_typekit_delivers_custom_web_fonts_to_the_masses/">Review: Typekit Delivers Custom Web Fonts to the Masses</a></li>
</ul>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2011/04/decoding-web-fonts-with-what-font/feed/</wfw:commentRss>
        <slash:comments>4</slash:comments>

        
    </item>
    
    <item>
        <title>Dealing With the Dreaded &#8216;Flash of Unstyled Text&#8217;</title>
        <link>http://www.webmonkey.com/2010/05/dealing-with-the-dreaded-flash-of-unstyled-text/</link>
        <comments>http://www.webmonkey.com/2010/05/dealing-with-the-dreaded-flash-of-unstyled-text/#comments</comments>
        <pubDate>Mon, 17 May 2010 19:30:08 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=47419</guid>
        		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[typography]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2010/05/t22.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2010/05/t22.jpg" alt="Dealing With the Dreaded &#8216;Flash of Unstyled Text&#8217;" /></div>The use of custom fonts on the web is finally a viable option for designers. Browser support for CSS&#8217;s @font-face rule is pretty solid &#8212; even IE 5 can be wrangled into displaying custom fonts loaded from your server. Services like Typekit, which licenses fonts from well-known font foundries, and free services like Font Squirrel [...]]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_47423" class="wp-caption alignleft" style="width: 187px"><a href="http://www.webmonkey.com/wp-content/uploads/2010/05/t22.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2010/05/t22.jpg" alt="That&#039;s a fancy-lookin&#039; T you got there." title="t22" width="177" height="179" class="size-full wp-image-47423" /></a><p class="wp-caption-text">That's a fancy-lookin' T you got there.</p></div>
<p>The use of custom fonts on the web is finally a viable option for designers.</p>
<p>Browser support for CSS&#8217;s <code>@font-face</code> rule is pretty solid &#8212; even IE 5 can be wrangled into displaying custom fonts loaded from your server. Services like <a href="http://typekit.com/">Typekit</a>, which licenses fonts from well-known font foundries, and free services like <a href="http://www.fontsquirrel.com/">Font Squirrel</a> are helping to smooth the licensing issues surrounding custom fonts on the web.</p>
<p>However, while browser support and licensing is getting sorted quickly, there&#8217;s still one big problem with web fonts &#8212; the dreaded &#8220;Flash of Unstyled Text,&#8221; or FOUT.</p>
<p>The problem (despite the name, it has nothing to do with Adobe Flash) stems from how browsers render a page: progressively, prioritizing the raw content, then grabbing the stylesheet and then grabbing any external font files. The actual FOUT effect can be seen in the wild, but it varies by browser.</p>
<p>Internet Explorer will load the font file as soon as it encounters the <code>@font-face</code> in your CSS, which minimizes FOUT. However, make sure to put your <code>@font-face</code> declaration above any script tags, otherwise IE will hold the entire page until the font loads.</p>
<p>Safari and Chrome (and other WebKit browsers) hide any text styled with <code>@font-face</code> until the font is fully loaded. This means your styled text content is invisible at first, and then pops onto the screen later, after the font file loads.</p>
<p>Firefox loads all your text normally and displays it using a fallback font. Then, a half-second or so later, that text is &#8220;upgraded&#8221; when the custom font data is loaded. The result is a jarring font change, much like older, Flash-based font solutions. Mozilla is currently treating this behavior <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=499292">as a bug in Firefox</a>. Mozilla plans to adopt the WebKit-style rendering in the future.</p>
<p>Obviously none of these cases is ideal, and the little loading hiccup, no matter what form it manifests itself in, is noticeable even to the most oblivious of web users.</p>
<p>FOUT sucks. So, what do you do? There are a variety of techniques that can be used to minimize &#8212; and even eliminate &#8212; the FOUT.</p>
<p><span id="more-47419"></span></p>
<p>First, limit your pages to only one or two external fonts. While the golden age of custom fonts has indeed arrived, try not to abuse the machinery.</p>
<p>Another obvious solution is to minimize the size of your included font file. This starts with choosing fonts with smaller payloads when possible. Not all font packages are equal &#8212; when it comes to the web, stick to fonts in the kilobyte range rather than some of the bigger, multi-megabyte files out there.</p>
<p>If your server supports it, be sure to serve your font files using gzip compression. Read developer <a href="http://www.phpied.com/gzip-your-font-face-files/">Stoyan Stefanov&#8217;s great article on gzipping font files</a>. His tests show a 45-to-70 percent reduction in file size when using gzip to serve font files. If you&#8217;re using <a href="http://hacks.mozilla.org/2009/10/woff/">WOFF-formatted fonts</a>, you can skip this step, because WOFF already includes compression.</p>
<p>So you&#8217;ve selected small font files and only a couple of varieties, and you&#8217;re serving them with gzip compression. But you&#8217;ve still got a FOUT. What to do?</p>
<p>Start with heavy caching. Set your expires header to something in the very far future, which will cause the browser to cache your font files almost indefinitely. It won&#8217;t help for the initial page load, but subsequent loads will happen faster.</p>
<p>Then you can get even trickier &#8212; but caution, for here be dragons. None of these techniques is 100 percent effective, and all have drawbacks like slower page-load times and incomplete browser support.</p>
<p>One way to trick the browser into downloading the font file sooner is to use the font declaration to style the <code>&lt;html&gt;</code> tag. For example, say you have an <code>@font-face</code> declaration in your stylesheet and a class &#8220;myfont&#8221; that uses it. Apply that class to the HTML element like so:</p>
<p>
<pre class="brush: js">
&lt;html class="myfont"&gt;
</pre>
<p>As per the CSS spec, <code>@font-face</code> does not cascade, so the whole page won&#8217;t inherit the font. But both Firefox and Opera will load the font file much sooner. Unfortunately, WebKit browsers will not. </p>
<p>You can trick WebKit browsers into loading the font sooner by adding an element to the head of your page. <a href="http://paulirish.com/2009/fighting-the-font-face-fout/">Developer Paul Irish has an example</a> of this in a post on <code>@font-face</code>. Irish points out that adding a tag to your header will cause WebKit to download the font file:</p>
<p>
<pre class="brush: js">
<b class="myfont" style="position:absolute; visibility:hidden">download please</b>
</pre>
<p>The problem is that obviously this is not valid HTML, and most browsers will render the element in the document body when the page loads, so you need to remove or hide it. Although it may work, we don&#8217;t suggest using this technique unless absolutely necessary.</p>
<p>Another possibility is to hide the entire page until the font file loads. This is one the solutions TypeKit has started to use, adding a new class to the page body tag when the font files have been loaded. Just hide the body tag, then set the loaded class to &#8220;visible,&#8221; and you&#8217;ll avoid the FOUT.</p>
<p>Of course, this method avoids the FOUT by holding up the entire page, which may not be the best solution.</p>
<p>The final &#8212; and perhaps most useful &#8212; solution to FOUT is to simply learn to live with it. Browsers load fonts in roughly the same way they load images. Slow internet connections have always meant progressive page loads, with elements staggering in as the browser draws the page.</p>
<p>With more and more sites adopting <code>@font-face</code>, services like Typekit and other custom web-font solutions in spite of the Flash of Unstyled Content, more users will become accustomed to the hiccups. This will make your own site stand out less.</p>
<p>These solutions aren&#8217;t perfect, but when has the web ever been a source of perfection?</p>
<p><strong>See Also:</strong><br/></p>
<ul>
<li><a href="http://www.webmonkey.com/2009/08/use_font-face_today_with_free__legal_fonts/">Use <code>@font-face</code> Today With Free, Legal Fonts</a></li>
<li><a href="http://www.webmonkey.com/2010/04/google-chrome-to-support-the-web-open-font-format/">Google Chrome to Support the Web Open Font Format</a></li>
<li><a href="http://www.webmonkey.com/2009/10/boingboing_discovers_the_dark_side_of_css3/">Boing Boing&#8217;s Redesign Uncovers the Dark Side of Web Fonts</a></li>
<li><a href="http://www.webmonkey.com/2009/11/review_typekit_delivers_custom_web_fonts_to_the_masses/">Review: Typekit Delivers Custom Web Fonts to the Masses</a></li>
<li><a href="http://www.webmonkey.com/2009/10/mozilla_throws_its_weight_behind_improving_web_type__adopts_woff_for_firefox/">Mozilla Throws Its Weight Behind Improving Web Type, Adopts WOFF for Firefox</a></li>
</ul>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2010/05/dealing-with-the-dreaded-flash-of-unstyled-text/feed/</wfw:commentRss>
        <slash:comments>14</slash:comments>

        
    </item>
    </channel>
</rss>
