<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Javascript/CSS Font Detector</title>
	<atom:link href="http://ajaxian.com/archives/javascriptcss-font-detector/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/javascriptcss-font-detector</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Lalit Patel</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248416</link>
		<dc:creator>Lalit Patel</dc:creator>
		<pubDate>Wed, 21 Mar 2007 05:47:06 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248416</guid>
		<description>Johan SundstrÃ¶m has presented this data in a more interesting and cool layout here: http://exhibit.ecmanaut.googlepages.com/installed-fonts.html. 
Thanks Johan.</description>
		<content:encoded><![CDATA[<p>Johan SundstrÃ¶m has presented this data in a more interesting and cool layout here: <a href="http://exhibit.ecmanaut.googlepages.com/installed-fonts.html" rel="nofollow">http://exhibit.ecmanaut.googlepages.com/installed-fonts.html</a>.<br />
Thanks Johan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lalit Patel</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248176</link>
		<dc:creator>Lalit Patel</dc:creator>
		<pubDate>Wed, 14 Mar 2007 18:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248176</guid>
		<description>@German Rumm 
Some applications like Google Document &amp; Spreadsheets, Browser based chat clients like Meebo, etc can use this.</description>
		<content:encoded><![CDATA[<p>@German Rumm<br />
Some applications like Google Document &amp; Spreadsheets, Browser based chat clients like Meebo, etc can use this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: German Rumm</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248154</link>
		<dc:creator>German Rumm</dc:creator>
		<pubDate>Wed, 14 Mar 2007 12:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248154</guid>
		<description>Hi there, everyone.

Anyone has any ideason how this font detector can be used?

It&#039;s not of much use to web-designers, since CSS can already sorta &quot;detect fonts&quot;. I mean, you can provide several font-families, and the first one found will work.

One use I thought of was &quot;helper&quot; function to Word/Excel document generator. You use Javascript to test if a font is available on a system, and then create a Word/Excel document with that font. I was thinking about PDF, but PDF embeds fonts inside document for portability, soany font you decide to use will be available when you open PDF.

Maybe some more uses, anyone?</description>
		<content:encoded><![CDATA[<p>Hi there, everyone.</p>
<p>Anyone has any ideason how this font detector can be used?</p>
<p>It&#8217;s not of much use to web-designers, since CSS can already sorta &#8220;detect fonts&#8221;. I mean, you can provide several font-families, and the first one found will work.</p>
<p>One use I thought of was &#8220;helper&#8221; function to Word/Excel document generator. You use Javascript to test if a font is available on a system, and then create a Word/Excel document with that font. I was thinking about PDF, but PDF embeds fonts inside document for portability, soany font you decide to use will be available when you open PDF.</p>
<p>Maybe some more uses, anyone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Misha</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248118</link>
		<dc:creator>Misha</dc:creator>
		<pubDate>Tue, 13 Mar 2007 15:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248118</guid>
		<description>Why don&#039;t you take something more complex than mm..l as a test-string? I think it will make it much more reliable, becauce there can be many fonts that have same-size  &quot;m&quot;s on 24px. increase font-size too.</description>
		<content:encoded><![CDATA[<p>Why don&#8217;t you take something more complex than mm..l as a test-string? I think it will make it much more reliable, becauce there can be many fonts that have same-size  &#8220;m&#8221;s on 24px. increase font-size too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lalit Patel</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248101</link>
		<dc:creator>Lalit Patel</dc:creator>
		<pubDate>Tue, 13 Mar 2007 13:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248101</guid>
		<description>@Daniel Luz
Since we know beforehand all the fonts that we are going to check, we can select a base font appropriately after testing locally and verifying that its dimensions don&#039;t match with any of the fonts in the test set. Further I have seen that if we change the test string which we use (I am using mmmmmmml) we get different results. Like when I was writing this example, I was getting same dimensions for Tahoma and Trebuchet MS, but when I changed the string, I was able to uniquely differentiate all the fonts.

I agree its a added overhead to start the script working for a site. Drawback is one cannot just plug an play with this script. I will have to make the test more unambiguous so that it would give better results. Thank you for you inputs. I will surely work on this.</description>
		<content:encoded><![CDATA[<p>@Daniel Luz<br />
Since we know beforehand all the fonts that we are going to check, we can select a base font appropriately after testing locally and verifying that its dimensions don&#8217;t match with any of the fonts in the test set. Further I have seen that if we change the test string which we use (I am using mmmmmmml) we get different results. Like when I was writing this example, I was getting same dimensions for Tahoma and Trebuchet MS, but when I changed the string, I was able to uniquely differentiate all the fonts.</p>
<p>I agree its a added overhead to start the script working for a site. Drawback is one cannot just plug an play with this script. I will have to make the test more unambiguous so that it would give better results. Thank you for you inputs. I will surely work on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bipin</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248100</link>
		<dc:creator>Bipin</dc:creator>
		<pubDate>Tue, 13 Mar 2007 13:04:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248100</guid>
		<description>Bravo Darling ;)</description>
		<content:encoded><![CDATA[<p>Bravo Darling ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Luz</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248099</link>
		<dc:creator>Daniel Luz</dc:creator>
		<pubDate>Tue, 13 Mar 2007 12:23:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248099</guid>
		<description>I agree, Lalit, but you still fall into the problem of depending on a base font for comparisons. Arial is a particularly bad choice because it is a known clone of Helvetica, but you could run out of luck for pretty much any font you chose (it could happen that the base font and the tested font do not have anything in common other than the same dimensions for that very string you chose to test).</description>
		<content:encoded><![CDATA[<p>I agree, Lalit, but you still fall into the problem of depending on a base font for comparisons. Arial is a particularly bad choice because it is a known clone of Helvetica, but you could run out of luck for pretty much any font you chose (it could happen that the base font and the tested font do not have anything in common other than the same dimensions for that very string you chose to test).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lalit Patel</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248096</link>
		<dc:creator>Lalit Patel</dc:creator>
		<pubDate>Tue, 13 Mar 2007 12:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248096</guid>
		<description>@Daniel Luz 
I agree with you that if we change the default font, the results may not be the same. I wrote this script to work as &quot;detection&quot; of fonts rather than &quot;identification&quot;, and I think even if we change the default font, we would be able to detect the fonts.
For example. We know that most of the Windows machines have Arial font and Linux machines have Helvetica or Sans. (And as you said, luckily they both have same width.) We wont generally test the presence of Arial or a Verdana Font generally. We would want to detect whether a non-default font is present or not. So before detecting a set of fonts with our script, what we can do is just select a more suitable common comparator font (which I selected as Arial in my case) for which we can detect the presence of all the uncommon fonts we need for our page. So even if two fonts have exactly same dimensions but as long as the dimensions don&#039;t match with the base font, they can be detected.

Thanks.</description>
		<content:encoded><![CDATA[<p>@Daniel Luz<br />
I agree with you that if we change the default font, the results may not be the same. I wrote this script to work as &#8220;detection&#8221; of fonts rather than &#8220;identification&#8221;, and I think even if we change the default font, we would be able to detect the fonts.<br />
For example. We know that most of the Windows machines have Arial font and Linux machines have Helvetica or Sans. (And as you said, luckily they both have same width.) We wont generally test the presence of Arial or a Verdana Font generally. We would want to detect whether a non-default font is present or not. So before detecting a set of fonts with our script, what we can do is just select a more suitable common comparator font (which I selected as Arial in my case) for which we can detect the presence of all the uncommon fonts we need for our page. So even if two fonts have exactly same dimensions but as long as the dimensions don&#8217;t match with the base font, they can be detected.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Bassett</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248083</link>
		<dc:creator>Aaron Bassett</dc:creator>
		<pubDate>Tue, 13 Mar 2007 09:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248083</guid>
		<description>I wasn&#039;t really happy with the way this worked so I wrote up how you can check for a [particular font using getFontList() and the external interface.
You can see it here with explination: http://foobr.co.uk/2007/03/detect_fonts_with_javascript_and_flash/</description>
		<content:encoded><![CDATA[<p>I wasn&#8217;t really happy with the way this worked so I wrote up how you can check for a [particular font using getFontList() and the external interface.<br />
You can see it here with explination: <a href="http://foobr.co.uk/2007/03/detect_fonts_with_javascript_and_flash/" rel="nofollow">http://foobr.co.uk/2007/03/detect_fonts_with_javascript_and_flash/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Luz</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248060</link>
		<dc:creator>Daniel Luz</dc:creator>
		<pubDate>Mon, 12 Mar 2007 21:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248060</guid>
		<description>I must say I found it quite disappointing; there&#039;s nothing really novel here. It assumes the default sans-serif font is Arial (meaning if you change it to any other font the test will fail for your default font), and it will also fail if you try to compare two fonts with the same dimensions â€” which is the case between Arial and Helvetica, for instance.</description>
		<content:encoded><![CDATA[<p>I must say I found it quite disappointing; there&#8217;s nothing really novel here. It assumes the default sans-serif font is Arial (meaning if you change it to any other font the test will fail for your default font), and it will also fail if you try to compare two fonts with the same dimensions â€” which is the case between Arial and Helvetica, for instance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Calophi</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248031</link>
		<dc:creator>Calophi</dc:creator>
		<pubDate>Mon, 12 Mar 2007 13:49:37 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248031</guid>
		<description>This also seems to work fine in IE7 and Safari 2.0.4.  Very spiffy application!</description>
		<content:encoded><![CDATA[<p>This also seems to work fine in IE7 and Safari 2.0.4.  Very spiffy application!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lalit Patel</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248027</link>
		<dc:creator>Lalit Patel</dc:creator>
		<pubDate>Mon, 12 Mar 2007 11:15:43 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248027</guid>
		<description>Sorry, my previous comment was was for @black</description>
		<content:encoded><![CDATA[<p>Sorry, my previous comment was was for @black</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lalit Patel</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248026</link>
		<dc:creator>Lalit Patel</dc:creator>
		<pubDate>Mon, 12 Mar 2007 11:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248026</guid>
		<description>@Paul D 
Paul, we are using the same string (in this case &#039;mmmmmmmmmml&#039;) for all the type faces, and the font-size is same for all (in this case 24px). After creating a SPAN node in this fashion, we then calculate the width of the SPAN element and compare it with the width of the SPAN element of the default &#039;sans-serif&#039; font.</description>
		<content:encoded><![CDATA[<p>@Paul D<br />
Paul, we are using the same string (in this case &#8216;mmmmmmmmmml&#8217;) for all the type faces, and the font-size is same for all (in this case 24px). After creating a SPAN node in this fashion, we then calculate the width of the SPAN element and compare it with the width of the SPAN element of the default &#8216;sans-serif&#8217; font.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: black</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248024</link>
		<dc:creator>black</dc:creator>
		<pubDate>Mon, 12 Mar 2007 10:35:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248024</guid>
		<description>I like this, but what are width/height? They seem wrong for Cursive (187 px width) and monospace (157 px width), as clearly cursive should be less than monospace. Arial Black is a few px wider than monospace, but has a width of 250px+. What&#039;s the deal with this?

I always thought that something like text-clipping: ellipsis; could be done with javascript for Gecko/Opera browsers, any takers? :)</description>
		<content:encoded><![CDATA[<p>I like this, but what are width/height? They seem wrong for Cursive (187 px width) and monospace (157 px width), as clearly cursive should be less than monospace. Arial Black is a few px wider than monospace, but has a width of 250px+. What&#8217;s the deal with this?</p>
<p>I always thought that something like text-clipping: ellipsis; could be done with javascript for Gecko/Opera browsers, any takers? :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul D</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248023</link>
		<dc:creator>Paul D</dc:creator>
		<pubDate>Mon, 12 Mar 2007 10:19:22 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248023</guid>
		<description>In Safari (Webkit nightly build), it says &quot;true&quot; for each font regardless of whether I have it or not.</description>
		<content:encoded><![CDATA[<p>In Safari (Webkit nightly build), it says &#8220;true&#8221; for each font regardless of whether I have it or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominik Hahn</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248022</link>
		<dc:creator>Dominik Hahn</dc:creator>
		<pubDate>Mon, 12 Mar 2007 10:13:55 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248022</guid>
		<description>Smart idea! :)</description>
		<content:encoded><![CDATA[<p>Smart idea! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lalit Patel</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248019</link>
		<dc:creator>Lalit Patel</dc:creator>
		<pubDate>Mon, 12 Mar 2007 08:03:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248019</guid>
		<description>&lt;b&gt;UPDATE&lt;/b&gt;
Javascript/CSS Font Detector now works fine on Opera 9.10. It required to execute the script after it is completely loaded. I guess, Opera cannot calculate the offset width untill all the parents are completely loaded.</description>
		<content:encoded><![CDATA[<p><b>UPDATE</b><br />
Javascript/CSS Font Detector now works fine on Opera 9.10. It required to execute the script after it is completely loaded. I guess, Opera cannot calculate the offset width untill all the parents are completely loaded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobie Langel</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248018</link>
		<dc:creator>Tobie Langel</dc:creator>
		<pubDate>Mon, 12 Mar 2007 07:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248018</guid>
		<description>Looks like a simple and smart idea.

The JavaScript could do with a bit of refactoring, notably to be able to pass the font name whose presence you want to test for as an argument and just have a &lt;code&gt;Boolean&lt;/code&gt; returned.

Apart from that, bravo - smart!</description>
		<content:encoded><![CDATA[<p>Looks like a simple and smart idea.</p>
<p>The JavaScript could do with a bit of refactoring, notably to be able to pass the font name whose presence you want to test for as an argument and just have a <code>Boolean</code> returned.</p>
<p>Apart from that, bravo &#8211; smart!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lalit Patel</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248017</link>
		<dc:creator>Lalit Patel</dc:creator>
		<pubDate>Mon, 12 Mar 2007 07:19:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248017</guid>
		<description>@Zuriban
Yes, I am currently trying to port it to Opera. There seems to be some problem in the way opera treats &lt;code&gt;offsetWidth&lt;/code&gt;. I guess there is some problem with nesting of elements.</description>
		<content:encoded><![CDATA[<p>@Zuriban<br />
Yes, I am currently trying to port it to Opera. There seems to be some problem in the way opera treats <code>offsetWidth</code>. I guess there is some problem with nesting of elements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zuriban</title>
		<link>http://ajaxian.com/archives/javascriptcss-font-detector/comment-page-1#comment-248016</link>
		<dc:creator>Zuriban</dc:creator>
		<pubDate>Mon, 12 Mar 2007 07:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2199#comment-248016</guid>
		<description>correction, - &quot;false&quot; when I open the page with Opera 9.10, in Firefox 2.0.0.2 everything seems to work well :)</description>
		<content:encoded><![CDATA[<p>correction, &#8211; &#8220;false&#8221; when I open the page with Opera 9.10, in Firefox 2.0.0.2 everything seems to work well :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

