<?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>greenideas &#187; browsers</title>
	<atom:link href="http://mwhenry.com/blog/tag/browsers/feed/" rel="self" type="application/rss+xml" />
	<link>http://mwhenry.com/blog</link>
	<description>A blog by Matt Henry</description>
	<lastBuildDate>Fri, 02 Jul 2010 23:26:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Ugly font-variant bug</title>
		<link>http://mwhenry.com/blog/2010/04/ugly-font-variant-bug/</link>
		<comments>http://mwhenry.com/blog/2010/04/ugly-font-variant-bug/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 18:21:52 +0000</pubDate>
		<dc:creator>Matt Henry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[font-face]]></category>
		<category><![CDATA[typography]]></category>
		<category><![CDATA[webfonts]]></category>

		<guid isPermaLink="false">http://mwhenry.com/blog/?p=96</guid>
		<description><![CDATA[Here’s an annoying little bug that manifests when you try to set a CSS font-variant property (say, small-caps) with a font that doesn’t provide the requested variant. For instance, here is some text in League Gothic, pulled in via @font-face: League Gothic doesn’t have its own small caps variant. So what happens when you tell [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s an annoying little bug that manifests when you try to set a CSS font-variant property (say, small-caps) with a font that doesn’t provide the requested variant. For instance, here is some text in League Gothic, pulled in via <code>@font-face</code>:</p>
<p><img src="http://mwhenry.com/blog/images/lg-normal.png" alt="Sample of league gothic text, rendered normally"/></p>
<p>League Gothic doesn’t have its own small caps variant. So what happens when you tell the browser to give you one anyway? Here it is with <code>font-variant: small-caps</code> applied as rendered in Firefox:</p>
<p><img src="http://mwhenry.com/blog/images/lg-sc-firefox.png" alt="Sample of league gothic small caps, rendered correctly in Firefox" /></p>
<p>So far, so good. But here’s what you get when you add small caps to League Gothic in Webkit:</p>
<p><img src="http://mwhenry.com/blog/images/lg-sc-webkit.png" alt="Sample of league gothic small caps, which falls back to the default font in Webkit" /></p>
<p>Whoops! Webkit-based browsers (I tested this in Safari, Webkit Nightly, and Chrome for OSX), when they don’t find the specified variant in the font itself, just go to the next font in the stack. In this case, it’s the browser’s default font.</p>
<p>So which behavior is correct? The CSS2 spec essentially left it up to implementors to decide whether or not they would dynamically scale the font to implement small caps. CSS3 removes the ambiguity:</p>
<blockquote><p>If a genuine small-caps font is not available, user agents should simulate a small-caps font, for example by taking a normal font and replacing the lowercase letters by scaled uppercase characters. (<a href="http://www.w3.org/TR/css3-fonts/#small-caps-the-font-variant-property"><cite>CSS fonts module level 3</cite></a>)</p></blockquote>
<p>Although a typographic purist might take issue with this behavior (Bringhurst rails against the practice of “rolling your own” variants by dynamically scaling the existing face), this is what the spec says browsers are supposed to do. And in fact, this is what Firefox does. Webkit, on the other hand, checks each font in the stack in order until it finds one that supplies the desired variant. As in the example above, if there’s nothing else in the stack, it will fall back on the browser’s default font. </p>
<p>Unfortunately, there aren’t really any workarounds for this bug. But it should serve to remind you yet again that it’s super-important to put a good deal of thought into your font stack. Always try to build a stack where all of the fonts are as similar as possible, so when something like this happens, your design doesn’t break too badly.</p>
<p>For reference, or if you’d like to see how your browser of choice handles these cases, <a href="http://mwhenry.com/blog/examples/font-variant/">here are some test cases together on a separate page.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mwhenry.com/blog/2010/04/ugly-font-variant-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I’m Reading: 3/28</title>
		<link>http://mwhenry.com/blog/2008/03/reading-3-28-2008/</link>
		<comments>http://mwhenry.com/blog/2008/03/reading-3-28-2008/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 15:41:25 +0000</pubDate>
		<dc:creator>Matt Henry</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[Acid3]]></category>
		<category><![CDATA[baseball]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://mwhenry.com/?p=13</guid>
		<description><![CDATA[It’s Not a League of Their Own: Boston Dirt Dogs has an excerpt from the 2008 Red Sox Annual in which the authors size up the Sox’ competition in the American League. On the whole, it’s pretty interesting I guess, but the best part is that the section on the Orioles is just one long [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li><a href="http://bostondirtdogs.boston.com/Headline_Archives/2008/03/its_not_a_leagu_1.html">It’s Not a League of Their Own</a>: Boston Dirt Dogs has an excerpt from the <em>2008 Red Sox Annual</em> in which the authors size up the Sox’ competition in the American League. On the whole, it’s pretty interesting I guess, but the best part is that the section on the Orioles is just one long reference to <em>The Wire</em>. And if you read a little further down there’s another <em>Wire</em> reference that’s masquerading as a pithy statement about the economics behind your brand new Tampa Bay <del>Devil</del> Rays:<br />
<blockquote><p>My economics are rusty, but when you have an inferior product in a saturated, inelastic market, one strategy is to re-brand the product. Therefore, exit the Devil, and their aqua uniforms, to be replaced by the San Diego Padres kits with blue replacing sand brown.</p></blockquote>
<p>Stringer Bell is alive and well in the sports pages, folks.</li>
<li><a href="http://www.atoker.com/blog/2008/03/27/webkit-gets-100-on-acid3/">WebKit gets 100% on Acid3</a>: “Yesterday’s news” you say? Nope. The news today is about Webkit/GTK. Awesome news for us LXers. Also, definitely take a look at this <a href="http://webkit.org/blog/174/scenes-from-an-acid-test/">account of the main Webkit team’s road to 100/100</a>. It’s got some fun insights for spectators of the race between Webkit and Opera for full Acid3 compliance. And for some (probably much-needed) perspective, here’s <a href="http://shaver.off.net/diary/2008/03/27/the-missed-opportunity-of-acid-3/">one Mozilla-er’s take on the Acid3 arms race.</a></li>
<li><a href="http://ejohn.org/blog/javascript-talk-at-northeastern/">JavaScript Talk at Northeastern</a>: It’s a video of John Resig’s recent talk at Northeastern on Javascript and jQuery. What are you still doing here?</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mwhenry.com/blog/2008/03/reading-3-28-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I’m Reading: 3/24</title>
		<link>http://mwhenry.com/blog/2008/03/what-im-reading-324/</link>
		<comments>http://mwhenry.com/blog/2008/03/what-im-reading-324/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 17:22:42 +0000</pubDate>
		<dc:creator>Matt Henry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://mwhenry.com/?p=12</guid>
		<description><![CDATA[Nine Techniques for CSS Image Replacement: If you spend any time at all playing with CSS, you know that there are a full bajillion techniques for replacing text with an image. It’s a lot to remember, and I’ll fess up that I tend to use whatever one I happened to have read about most recently [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li><a href="http://css-tricks.com/nine-techniques-for-css-image-replacement/">Nine Techniques for CSS Image Replacement</a>: If you spend any time at all playing with CSS, you know that there are a full bajillion techniques for replacing text with an image. It’s a lot to remember, and I’ll fess up that I tend to use whatever one I happened to have read about most recently rather than taking a considered approach to which of them might be the best solution for a given situation. No more! The above-linked post does a great job of running through the pros and cons of the 9 (9!) major techniques, and from now on you (meaning “I”) no longer have any excuse to not use the best, semantic, most accessible one at every opportunity.</li>
<li><a href="http://meyerweb.com/eric/thoughts/2008/03/23/drugs-bugs-and-ie8/">Drugs, Bugs, and IE8</a>: A predictably good read from Eric Meyer, but I link to it mainly to have an excuse to echo the following point: There are a lot of beta browsers out there right now (one less, now that Safari 3 has shipped). If you’re testing your sites in them and something renders in any way other than what you were expecting, submit a bug report. <strong>Don’t</strong> change your code.</li>
<li><a href="http://webkit.org/blog/166/optimizing-page-loading-in-web-browser/">Optimizing Page Loading in the Web Browser</a>: For the browser builders, network latency is at least as big a problem as connection speed.</li>
<li><a href="http://www.gamasutra.com/view/feature/3581/a_japanese_rpg_primer_the_.php">A Japanese RPG Primer: The Essential 20</a>: Last week, <a href="http://www.gamasutra.com/" title="Gamasutra">Gamasutra</a> published this list of the best of the best in Japanese RPGs throughout the ages. It’s a top-20, so it’s not exhaustive, but it’s sure as hell exhaust<em>ing</em>–i’ve been chipping away at this beastie since last week. Anyway, if you’re at all into JRPGs, it’s a really fun read. It’s also neat to see some old favorites put into context alongside some seminal games that you may never have been exposed to.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mwhenry.com/blog/2008/03/what-im-reading-324/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

