<?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: 使用TypeSelect实现嵌入字体</title>
	<atom:link href="http://www.qianduan.net/typeselect-embedded-fonts.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.qianduan.net/typeselect-embedded-fonts.html</link>
	<description>专注于网站前端设计与前端开发</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:46:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: edielei</title>
		<link>http://www.qianduan.net/typeselect-embedded-fonts.html/comment-page-1#comment-3966</link>
		<dc:creator>edielei</dc:creator>
		<pubDate>Sun, 25 Oct 2009 10:07:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.qianduan.net/?p=11097#comment-3966</guid>
		<description>这也太麻烦了吧，我有个更好的JavaScript文件。
/* fontAvailable jQuery Plugin, v1.1
 *
 * Copyright (c) 2009, Howard Rauscher
 * Licensed under the MIT License
 */
 
(function($) {
	var element;
	
    $.fontAvailable = function(fontName) {
        var width, height;
        
        // prepare element, and append to DOM
        if(!element) {
            element = $( document.createElement( &#039;span&#039; ))
                .css( &#039;visibility&#039;, &#039;hidden&#039; )
                .css( &#039;position&#039;, &#039;absolute&#039; )
                .css( &#039;top&#039;, &#039;-10000px&#039; )
                .css( &#039;left&#039;, &#039;-10000px&#039; )
                .html( &#039;abcdefghijklmnopqrstuvwxyz&#039; )
                .appendTo( document.body );
        }
        
        // get the width/height of element after applying a fake font
        width = element
            .css(&#039;font-family&#039;, &#039;__FAKEFONT__&#039;)
            .width();
        height = element.height();
        
        // set test font
        element.css(&#039;font-family&#039;, fontName);
        
        return width !== element.width() &#124;&#124; height !== element.height();
    }
})(jQuery);</description>
		<content:encoded><![CDATA[<p>这也太麻烦了吧，我有个更好的JavaScript文件。<br />
/* fontAvailable jQuery Plugin, v1.1<br />
 *<br />
 * Copyright (c) 2009, Howard Rauscher<br />
 * Licensed under the MIT License<br />
 */</p>
<p>(function($) {<br />
	var element;</p>
<p>    $.fontAvailable = function(fontName) {<br />
        var width, height;</p>
<p>        // prepare element, and append to DOM<br />
        if(!element) {<br />
            element = $( document.createElement( &#8216;span&#8217; ))<br />
                .css( &#8216;visibility&#8217;, &#8216;hidden&#8217; )<br />
                .css( &#8216;position&#8217;, &#8216;absolute&#8217; )<br />
                .css( &#8216;top&#8217;, &#8216;-10000px&#8217; )<br />
                .css( &#8216;left&#8217;, &#8216;-10000px&#8217; )<br />
                .html( &#8216;abcdefghijklmnopqrstuvwxyz&#8217; )<br />
                .appendTo( document.body );<br />
        }</p>
<p>        // get the width/height of element after applying a fake font<br />
        width = element<br />
            .css(&#8216;font-family&#8217;, &#8216;__FAKEFONT__&#8217;)<br />
            .width();<br />
        height = element.height();</p>
<p>        // set test font<br />
        element.css(&#8216;font-family&#8217;, fontName);</p>
<p>        return width !== element.width() || height !== element.height();<br />
    }<br />
})(jQuery);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 水表配件</title>
		<link>http://www.qianduan.net/typeselect-embedded-fonts.html/comment-page-1#comment-1716</link>
		<dc:creator>水表配件</dc:creator>
		<pubDate>Tue, 21 Jul 2009 08:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.qianduan.net/?p=11097#comment-1716</guid>
		<description>通常情况下就是文字的字体不太好选择。老是不如意</description>
		<content:encoded><![CDATA[<p>通常情况下就是文字的字体不太好选择。老是不如意</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 神采飞扬</title>
		<link>http://www.qianduan.net/typeselect-embedded-fonts.html/comment-page-1#comment-1697</link>
		<dc:creator>神采飞扬</dc:creator>
		<pubDate>Mon, 20 Jul 2009 02:22:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.qianduan.net/?p=11097#comment-1697</guid>
		<description>中文字体的确太大，不过如果使用typeface/typeSelect或者cfon，将文字文件(.ttf)转化成js文件，能够大大的减小字体文件的大小，会比直接使用@font-face好很多。</description>
		<content:encoded><![CDATA[<p>中文字体的确太大，不过如果使用typeface/typeSelect或者cfon，将文字文件(.ttf)转化成js文件，能够大大的减小字体文件的大小，会比直接使用@font-face好很多。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 猫石</title>
		<link>http://www.qianduan.net/typeselect-embedded-fonts.html/comment-page-1#comment-1696</link>
		<dc:creator>猫石</dc:creator>
		<pubDate>Mon, 20 Jul 2009 02:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.qianduan.net/?p=11097#comment-1696</guid>
		<description>中文字体想实现这样个性化不实际吧。一个字体文件就是几M大小。</description>
		<content:encoded><![CDATA[<p>中文字体想实现这样个性化不实际吧。一个字体文件就是几M大小。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 糖伴西红柿</title>
		<link>http://www.qianduan.net/typeselect-embedded-fonts.html/comment-page-1#comment-1694</link>
		<dc:creator>糖伴西红柿</dc:creator>
		<pubDate>Mon, 20 Jul 2009 01:18:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.qianduan.net/?p=11097#comment-1694</guid>
		<description>倒是实现了个性化的需求，不过要加入这么多的js，性能上不可避免的要受影响啊。。。</description>
		<content:encoded><![CDATA[<p>倒是实现了个性化的需求，不过要加入这么多的js，性能上不可避免的要受影响啊。。。</p>
]]></content:encoded>
	</item>
</channel>
</rss>

