{"id":237,"date":"2009-10-09T20:53:36","date_gmt":"2009-10-10T00:53:36","guid":{"rendered":"http:\/\/www.useragentman.com\/blog\/?p=237"},"modified":"2011-05-14T00:51:29","modified_gmt":"2011-05-14T04:51:29","slug":"more-font-face-fun","status":"publish","type":"post","link":"http:\/\/www.useragentman.com\/blog\/2009\/10\/09\/more-font-face-fun\/","title":{"rendered":"More @font-face fun"},"content":{"rendered":"<p>My first post <a href=\"\/blog\/2009\/09\/20\/font-face-in-depth\/\">@font-face in Depth<\/a> got a <strong>huge<\/strong> amount of unexpected attention.\u00a0 Thank you all for your comments and criticism.\u00a0 Since the post, there have been quite a bit of information I have read about and thought I should share.<\/p>\n<h2>SVG fonts for Opera and Chrome<\/h2>\n<p><a href=\"http:\/\/www.snook.ca\/\">Jonathan Snook<\/a> wrote a great article <a href=\"http:\/\/www.snook.ca\/archives\/html_and_css\/becoming-a-font-embedding-master\">regarding Opera 10 and Google Chrome supporting SVG fonts<\/a> (Chrome can load them without any pesky command line switch!).\u00a0  He mentions how to convert TrueType fonts to this format using <a href=\"http:\/\/xml.apache.org\/batik\/\">Batik<\/a>, and that by removing all the <code>&lt;hkren&gt;<\/code> elements inside the file&#8217;s XML can make the font smaller than the original TrueType file.\u00a0 Too bad the browsers don&#8217;t support this format.<\/p>\n<h2>Opera&#8217;s buggy implementation<\/h2>\n<p>I noticed after I launched my first @font-face article that Opera was not loading the fonts on my blog when users visited more than one page.  It turns out that Opera 10&#8217;s implementation of @font-face is a little buggy.  When you feed it a page with an embedded font, you may not see the embedded fonts properly, like in the screenshot below:<\/p>\n<p><div id=\"attachment_238\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/screenshotOpera.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-238\" class=\"size-medium wp-image-238 \" title=\"screenshotOpera\" src=\"https:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/screenshotOpera-300x215.png\" alt=\"screenshotOpera\" width=\"300\" height=\"215\" srcset=\"http:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/screenshotOpera-300x215.png 300w, http:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/screenshotOpera.png 669w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-238\" class=\"wp-caption-text\">Opera sometimes doesn&#39;t load the font at all, and removes other styling (click to enlarge).<\/p><\/div><\/p>\n<p><a href=\"http:\/\/readableweb.com\/opera-admits-font-face-bugs-in-opera-10\/\">According to Opera<\/a>, this happens when &#8220;specifying different weights and styles for a single font-family name&#8221;.  H\u00e5kon Wium Lie, the company&#8217;s Chief Technology Officer , <a href=\"http:\/\/devfiles.myopera.com\/articles\/751\/webfonts-workaround.html\">has described a work-around<\/a> until the company can fix the problem properly.<\/p>\n<p>I am debating whether to implement the work around on my site, or to wait for Opera to fix the problem and patch all Opera 10 installations via auto-update (I&#8217;m leaning towards the latter).<\/p>\n<h2>Performance Issues With Font Embedding<\/h2>\n<p>One of the comments on the last article came from <a href=\"http:\/\/stevesouders.com\/\">Steve Souders<\/a> who had <a href=\"\/blog\/2009\/09\/20\/font-face-in-depth\/#comment-37\">performance concerns with font-embedding<\/a>.  Paul Irish came back with information showing the <a href=\"http:\/\/paulirish.com\/2009\/fighting-the-font-face-fout\/\">when browsers load the fonts, and what they do before the font is loaded<\/a>.\u00a0 He also shows how to use JavaScript to make the loading behaviour consistent between browsers.<\/p>\n<p>The performance issues with font-embedding is something I am going to be keeping an eye on, especially when it comes to font-services, which the OpenType site believes will be <a href=\"http:\/\/opentype.info\/blog\/2009\/07\/29\/why-webfont-services-are-the-future-of-fonts-on-the-web\/\">the future of web font distribution for commercial fonts<\/a>.  Although it doesn&#8217;t seem like much of an issue currently (my blog <em>seems<\/em> to load quickly), I don&#8217;t want to do anything that would slow down my web applications &#8211; especially if I am using them just to make the text look a little prettier.<\/p>\n<h2>Windows XP Rendering Issues<\/h2>\n<p>Boing-Boing had a bad experience with font-embedding.  Turns out <a href=\"http:\/\/www.webmonkey.com\/blog\/Boing_Boing_s_Redesign_Uncovers_the_Dark_Side_of_Web_Fonts\">they got a lot of complaints when they decided to incorporate it into their website<\/a>.  The reason: some users didn&#8217;t have ClearType turned on, and the font Boing-Boing chose looked &#8220;like ass&#8221; without ClearType.<\/p>\n<p>Below are screenshots of this site without ClearType on:<\/p>\n<p><div id=\"attachment_250\" style=\"width: 449px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-250\" class=\"size-full wp-image-250\" title=\"ieNoAA\" src=\"https:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/ieNoAA.png\" alt=\"ieNoAA\" width=\"439\" height=\"336\" srcset=\"http:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/ieNoAA.png 439w, http:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/ieNoAA-300x229.png 300w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><p id=\"caption-attachment-250\" class=\"wp-caption-text\">Internet Explorer without ClearType<\/p><\/div><\/p>\n<p style=\"text-align: center;\">\n<p><div id=\"attachment_251\" style=\"width: 465px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-251\" class=\"size-full wp-image-251\" title=\"firefoxNoAA\" src=\"https:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/firefoxNoAA.png\" alt=\"Firefox without ClearType\" width=\"455\" height=\"327\" srcset=\"http:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/firefoxNoAA.png 455w, http:\/\/www.useragentman.com\/blog\/wp-content\/uploads\/2009\/10\/firefoxNoAA-300x215.png 300w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><p id=\"caption-attachment-251\" class=\"wp-caption-text\">Firefox without ClearType<\/p><\/div><\/p>\n<p>The article stated that there are quite a few XP computers which apparently don&#8217;t have ClearType on by default. I wonder if there are any stats to back that up. If so, then developers embed fonts into pages should test that scenario as well.  It does look different.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My first post @font-face in Depth got a huge amount of unexpected attention.\u00a0 Thank you all for your comments and criticism.\u00a0 Since the post, there have been quite a bit of information I have read about and thought I should share. SVG fonts for Opera and Chrome Jonathan Snook wrote a great article regarding Opera [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,9,10,13],"tags":[27,29,30,28],"class_list":["post-237","post","type-post","status-publish","format-standard","hentry","category-font-face","category-css","category-fonts","category-svg","tag-font-face-opera-chrome","tag-anti-aliasing","tag-cleartype","tag-svg-fonts"],"_links":{"self":[{"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/posts\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":23,"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":3289,"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions\/3289"}],"wp:attachment":[{"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.useragentman.com\/blog\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}