<?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>Brad Frost Web&#187; Brad Frost Web | Photoshop Trick for CSS Sprites: Rollover Color with Missing Fonts</title>
	<atom:link href="http://bradfrostweb.com/blog/tag/sprites/feed/" rel="self" type="application/rss+xml" />
	<link>http://bradfrostweb.com</link>
	<description>Web Design, Music and Art</description>
	<lastBuildDate>Wed, 01 Sep 2010 19:45:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Photoshop Trick for CSS Sprites: Rollover Color with Missing Fonts</title>
		<link>http://bradfrostweb.com/blog/web/photoshop-css-sprites-rollover-color-missing-fonts/</link>
		<comments>http://bradfrostweb.com/blog/web/photoshop-css-sprites-rollover-color-missing-fonts/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 06:42:58 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[font replacement]]></category>
		<category><![CDATA[missing fonts]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[sprites]]></category>

		<guid isPermaLink="false">http://bradfrostweb.com/?p=575</guid>
		<description><![CDATA[As a web developer working with a variety of designers, I often find myself in situations where I need to create rollover states in Photoshop for text assets whose fonts I don't have installed on my computer.  Here's a technique to bypass that problem entirely.]]></description>
			<content:encoded><![CDATA[<div id="attachment_583" class="wp-caption alignnone" style="width: 660px"><img src="http://bradfrostweb.com/wp-content/uploads/2010/02/css_sprite_photoshop_color.png" alt="CSS Sprite Technique Using Color Overlay in Photoshop" title="CSS Sprite Technique Using Color Overlay in Photoshop" width="650" height="401" class="size-full wp-image-583" /><p class="wp-caption-text">CSS Sprite Technique Using Color Overlay in Photoshop</p></div>
<p>As a web developer working with designers who provide me with a plethora of assets, I often find myself in situations where I need to create rollover states in Photoshop for text assets whose fonts I don&#8217;t have installed on my computer.  <span id="more-575"></span></p>
<p>How often have you seen the dreaded:<br />
<blockquote>&#8220;The following fonts are missing&#8230;Font substitution will occur&#8221;</p></blockquote>
<p> dialog when trying to simply change the color of the font in your design? This usually occurs when you&#8217;re creating an image sprite using those fancy-schmancy non-web fonts designers love so much.</p>
<p>While I highly recommend using <a href="http://wiki.github.com/sorccu/cufon/" title="Cufon - Fonts for the people">Cufon</a> or <a href="http://wiki.novemberborn.net/sifr/" title="sIFR (Scalable Inman Flash Replacement)">SiFR</a> to dynamically replace web text with the correct fancy font, I treat navigation text differently. </p>
<p><strong>Why?</strong> For one, Cufon and SiFR rely on Javascript and/or Flash in order to achieve the correct result, and I&#8217;ve had instances of bugs in both of them. Also, a bad instance of <a href="http://www.bluerobot.com/web/css/fouc.asp/" title="Flash of Unstyled Content">FOUC</a> can help ruin an otherwise elegant design.</p>
<p>So instead I use the <a href="http://stopdesign.com/archive/2003/03/07/replace-text.html" title="Fahrner Image Replacement Technique">Fahrner Image Replacement</a> and a well-designed <a href="http://www.alistapart.com/articles/sprites/" title="CSS Image Sprites">image sprite</a> to accomplish my top level navigation systems. It requires extra effort on my part and isn&#8217;t as flexible as using the aforementioned techniques, <strong>BUT</strong> in my experience its a more bulletproof solution.</p>
<p>Now back to the situation at hand: I have this great-looking font in my PSD but don&#8217;t have it on my computer. I need to make rollovers for all these navigation states and I can&#8217;t click into the text without altering its appearance. What&#8217;s a developer to do? Here are the required steps:</p>
<ol>
<li><strong>Duplicate the Photoshop layer</strong> and position according to the sprite design</li>
<li>In the layers panel, double click on the layer to bring up the <strong>Layer Style</strong> dialog box</li>
<li>In the left column of the Layer Style dialog, select <strong>Color Overlay</strong> and change to the desired color</li>
<li><strong>Lather, Rinse, Repeat</strong> for as many elements needed to complete the navigation</li>
<li><strong>Save</strong> out PNG or GIF (depending on file size)</li>
<li><strong>Style</strong> using CSS to create the rollover effect</li>
</ol>
<div id="attachment_582" class="wp-caption alignnone" style="width: 660px"><img src="http://bradfrostweb.com/wp-content/uploads/2010/02/photoshop_color_overlay.jpg" alt="Photoshop&#039;s Color Overlay Dialog Box" title="Photoshop&#039;s Color Overlay Dialog Box" width="650" height="400" class="size-full wp-image-582" /><p class="wp-caption-text">Photoshop's Color Overlay Dialog Box</p></div>
<p>At the end of the day, this technique may be tedious but its very reliable.  Users without Javascript enabled can see the design in all its glory, you don&#8217;t have to bother the designers to send you over every single font they have, and at the end of the day you&#8217;ve built a nice fully-functioning navigation system with one image and some CSS know-how. Don&#8217;t you feel good about yourself?</p>
]]></content:encoded>
			<wfw:commentRss>http://bradfrostweb.com/blog/web/photoshop-css-sprites-rollover-color-missing-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
