<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <link href="https://friendlybit.com/feed/" rel="self" type="application/atom+xml" />
    <link href="https://friendlybit.com/" rel="alternate" type="text/html" />
    <updated>2009-05-08T20:20:17+02:00</updated>
    <id>https://friendlybit.com</id>
    <title type="html">Friendly Bit - Web development blog</title>
    <subtitle>Friendly Bit is a blog by Emil Stenström, a Swedish web developer that occasionally gets ideas of how to improve the internet.</subtitle>
    
        <entry>
            <title type="html">Custom fonts using Cufón</title>
            <link href="http://friendlybit.com/browsers/custom-fonts-using-cufon/" rel="alternate" type="text/html" title="Custom fonts using Cufón" />
            <published>2009-05-08T20:20:17+02:00</published>
            <updated>2009-05-08T20:20:17+02:00</updated>
            <id>http://friendlybit.com/browsers/custom-fonts-using-cufon/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">If you&#39;ve worked with webdev professionally you know how it goes. &#34;Why can&#39;t a company with a strong visual brand get to use their own font?&#34;, the designer...</summary>
            <content type="html" xml:base="http://friendlybit.com/browsers/custom-fonts-using-cufon/">
                &lt;p&gt;If you&#39;ve worked with webdev professionally you know how it goes. &amp;quot;Why can&#39;t a company with a strong visual brand get to use their own font?&amp;quot;, the designer asks. Then a long discussion about web fonts follow, where you decide to replace the font with a &amp;quot;web safe&amp;quot; font instead. Or do you?&lt;/p&gt;
&lt;p&gt;You could think it&#39;s strange that in 2009, we can&#39;t use any fonts we want on the web, and I would fully agree. You could ask whose fault that is, and I would reply with a quote from a &lt;a href=&#34;http://www.w3.org/Fonts/Misc/minutes-2008-10&#34;&gt;meeting between browser makers in august 2008&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;My understanding, from Chris, is that supporting direct linking of the fonts would be a great disservice to the independent font industry. &lt;strong&gt;A high-level decision within MS&lt;/strong&gt; says we won&#39;t implement that in IE. So what is done other than EOT is [probably] not going to interop with IE. &amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;quot;MS&amp;quot; is of course Microsoft, and &amp;quot;Chris&amp;quot;, is referring to Chris Wilson, Platform Architect of the Internet Explorer Platform team. The same Chris has also written a &lt;a href=&#34;http://cwilso.com/2008/07/23/fonts-embedding-vs-linking/&#34;&gt;longer text about font linking&lt;/a&gt; on his blog. I first thought that this was something the font foundries had pushed through, but on the above post it seems that this is also a personal opinion. Browsers (but only IE) need to protect fonts from getting pirated.&lt;/p&gt;
&lt;p&gt;And that&#39;s the whole reason why we don&#39;t have cross-browser fonts on the web today. (Although direct linking to fonts work in all the latest versions of Firefox, Opera, and Safari). Nice isn&#39;t it?&lt;/p&gt;
&lt;h2 id=&#34;embedding-fonts-anyway&#34;&gt;Embedding fonts anyway&lt;a href=&#34;#embedding-fonts-anyway&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Of course, there&#39;s still a need to embed custom fonts on webpages. That means clever developers will develop techniques will work around a broken internet explorer. No matter what the font founderies and Internet Explorer team thinks.&lt;/p&gt;
&lt;p&gt;My reasoning for why this is a good thing is because that&#39;s how everything else works in the browser. Even though anyone can copy an image, we have a big market for stock images. Even though anyone can copy the HTML, CSS, and Javascript of a whole site, we still have people building websites for money. &lt;strong&gt;Fonts are no different&lt;/strong&gt;, and the exact same business model that works for stock images can work for fonts.&lt;/p&gt;
&lt;p&gt;***&lt;/p&gt;
&lt;p&gt;One popular technique is sIFR, a way to use javascript to replace regular html with flash. Inside the flash you embed the font you want, and voilá, you can use any font you want. sIFR misses one crucial point though: It&#39;s far too annoying to embed a font inside a flash movie. You need a commercial program, and you need to know what you&#39;re doing. And you&#39;re dependent on flash support. It&#39;s not that bad, but a bit annoying to work with.&lt;/p&gt;
&lt;p&gt;So for a recent project I&#39;ve been playing with &lt;a href=&#34;http://wiki.github.com/sorccu/cufon/about&#34;&gt;Cufón&lt;/a&gt;, which uses javascript, but draws on canvas, or in VML for browsers that don&#39;t support canvas (IE). They have an extremely friendly website, which walks you through the process of getting things to work, and the font conversion needed is available directly on the website. I&#39;ve only used it for simple cases, but it works really well.&lt;/p&gt;
&lt;p&gt;All in all, Cufón is a great alternative until IE gets its shit together.&lt;/p&gt;
&lt;p&gt;PS. Famous people that don&#39;t agree with me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://clagnut.com/&#34;&gt;Richard Rutter&lt;/a&gt;, author of the clagnut blog suggests that font founderies &lt;a href=&#34;http://clagnut.com/blog/2166/&#34;&gt;server-side generate our fonts on demand&lt;/a&gt;, much like Google Maps only sends a part of the map, and not all of it.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://joeclark.org/&#34;&gt;Joe Clark&lt;/a&gt;: &amp;quot;Quite simply, there is &lt;a href=&#34;http://blog.fawny.org/2008/07/22/billhillsite/&#34;&gt;no broad clamour&lt;/a&gt; among Web &lt;em&gt;designers&lt;/em&gt; to use any font they want.&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://jasonsantamaria.com/&#34;&gt;Jason Santa Maria&lt;/a&gt;: &amp;quot;embedding normal typefaces without any sort of precautions is putting it on a silver platter for anyone to take freely. That’s like saying people steal from stores anyway, so let’s just leave the doors unlocked at night :)&amp;quot;&lt;/li&gt;
&lt;li&gt;And of course, the IE team…&lt;/li&gt;
&lt;li&gt;…and all the typeface makers in the world.&lt;/li&gt;
&lt;/ul&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Reminder: Cross browser font sizes</title>
            <link href="http://friendlybit.com/css/reminder-cross-browser-font-sizes/" rel="alternate" type="text/html" title="Reminder: Cross browser font sizes" />
            <published>2006-06-30T18:15:09+02:00</published>
            <updated>2006-06-30T18:15:09+02:00</updated>
            <id>http://friendlybit.com/css/reminder-cross-browser-font-sizes/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;m sure most of you have already read the excellent experiment on font sizes but it&#39;s important enough to summarice here. The problem is how to make as...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/reminder-cross-browser-font-sizes/">
                &lt;p&gt;I&#39;m sure most of you have already read the &lt;a href=&#34;http://www.thenoodleincident.com/tutorials/box_lesson/font/index.html&#34; title=&#34;Noodleincidents guide on font sizes&#34;&gt;excellent experiment&lt;/a&gt; on font sizes but it&#39;s important enough to summarice here.&lt;/p&gt;
&lt;p&gt;The problem is how to make as many browsers as possible display fonts in the same size, without using pixels or other absolute units. Why shouldn&#39;t you use fixed font sizes? Because they make Internet Explorer unable to zoom the text with text-zoom, something that&#39;s bad for accessibility.&lt;/p&gt;
&lt;p&gt;When you start experimenting with this problem you quickly get into problems. I tested in Firefox 1.5, Internet Explorer 6 and Opera 9 and it was incredibly hard (Want a challange? Don&#39;t read on, try it by yourself) even with just those few browsers. Opera has problems with units it seems. If you use em:s you can&#39;t use more than two decimals, Opera will round it them differently than the others.&lt;/p&gt;
&lt;p&gt;Anyway, Owen Briggs solved this for us in a very simple way:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;c&#34;&gt;/* Set the size in percent on the body */&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;body&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;font-size&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;76&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;%&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;c&#34;&gt;/* All other sizes should be in em units with maximum of one decimal */&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;font-size&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;h1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;font-size&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;h2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;font-size&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;1.8&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;From my simple tests it seems to work fine. Did you know?&lt;/p&gt;

            </content>
        </entry>
    
</feed>