<?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>Blog: timdream &#187; MozTW</title>
	<atom:link href="http://blog.timc.idv.tw/categories/moztw/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.timc.idv.tw</link>
	<description>網路、Mozilla、天文、物理、科學、科幻、社會 …… 自由</description>
	<lastBuildDate>Wed, 28 Jul 2010 03:44:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Responsive Web Design</title>
		<link>http://blog.timc.idv.tw/posts/responsive-web-design/</link>
		<comments>http://blog.timc.idv.tw/posts/responsive-web-design/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 03:44:59 +0000</pubDate>
		<dc:creator>timdream</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[MozTW]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://blog.timc.idv.tw/?p=963</guid>
		<description><![CDATA[Ethan Marcotte 的《Responsive Web Design》，布丁爸爸說這是 2010 上半年最重要的文章之一。 內文主要是在闡述一個重要的 Idea：「Responsive Web Design」。隨著 Web 從 PC 螢幕移動到各式各樣的裝置，為每個裝置設計不同的網站版本（iPad 版、iPhone 版、手機版）是個 viable 但是不 scalable 的解決方法。作者認為，網站開發時如同「Responsive Architecture」的概念一樣，讓環境去適應使用者的存在 －－ 像是自動調節室內溫度、將窗戶霧化以保護隱私等。網站設計不應該是平面出版的電子化，存在於固定的版面、文字大小、圖文配置；設計應該要自然的適應不同的裝置，自動調整版面的 flow，甚至是互動 UI 的大小等等。 實作的細節，作者花了後半的篇幅在介紹 CSS media query。Media Query 是以前 CSS 2 的 media type 延伸，不同的是它不只是一組預先設定好的媒體（螢幕、紙本、點字、語音&#8230;），它可以讓開發者自行設定 CSS 規則適用的裝置類型、寬度等等。文章內提供了具體的範例，展示了使用 Media Query，作者可以指定當裝置的螢幕寬度小於多少、或是介於多少時，網頁可以隨之切換欄數、圖片寬度、圖文配置等等。 我自己把文章印了出來（地球對不起 &#62; &#60;），認真讀了一遍，滿有收穫的。雖然 CSS media query 是早就知道的東西，但是不了解前面的設計哲學與意義就不會有動機去玩它（現在就超有動機的哈）。作者的文筆讓人耳目一新，闡述概念的方式相當的生動，可以拿來練英文（真的）。 有個研伸的問題，作者也有簡略提到。CSS media query 解決了排版適應裝置畫面的問題，但如果開發者希望在不同裝置呈現不同的內容，甚至不同的互動時，多版本網站還是解法。如果只是幾行字，或許可以用 display 屬性開關切換掉，但總不會 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.alistapart.com/authors/m/emarcotte">Ethan Marcotte</a> 的<strong>《<a href="http://www.alistapart.com/articles/responsive-web-design/">Responsive Web Design</a>》</strong>，<a href="http://iamhlb.com/">布丁爸爸</a><a href="http://twitter.com/bobchao/status/19557422609">說這是 2010 上半年最重要的文章之一</a>。</p>
<p>內文主要是在闡述一個重要的 Idea：「Responsive Web Design」。隨著 Web 從 PC 螢幕移動到各式各樣的裝置，為每個裝置設計不同的網站版本（iPad 版、iPhone 版、手機版）是個 viable 但是不 scalable 的解決方法。作者認為，網站開發時如同「Responsive Architecture」的概念一樣，<strong>讓環境去適應使用者的存在</strong> －－ 像是自動調節室內溫度、將窗戶霧化以保護隱私等。網站設計不應該是平面出版的電子化，存在於固定的版面、文字大小、圖文配置；<strong>設計應該要自然的適應不同的裝置，自動調整版面的 flow，甚至是互動 UI 的大小等等</strong>。</p>
<p>實作的細節，作者花了後半的篇幅在介紹 <strong>CSS media query</strong>。Media Query 是以前 <a href="http://www.w3.org/TR/CSS2/media.html">CSS 2 的 media type</a> 延伸，不同的是它不只是一組預先設定好的媒體（螢幕、紙本、點字、語音&#8230;），它可以讓開發者自行設定 CSS 規則適用的裝置類型、寬度等等。文章內提供了具體的範例，展示了使用 Media Query，作者可以指定當裝置的螢幕寬度小於多少、或是介於多少時，網頁可以隨之切換欄數、圖片寬度、圖文配置等等。</p>
<p>我自己把文章印了出來（地球對不起 &gt; &lt;），認真讀了一遍，滿有收穫的。雖然 CSS media query 是早就知道的東西，但是不了解前面的設計哲學與意義就不會有動機去玩它（現在就超有動機的哈）。作者的文筆讓人耳目一新，闡述概念的方式相當的生動，可以拿來練英文（真的）。</p>
<p>有個研伸的問題，作者也有簡略提到。CSS media query 解決了排版適應裝置畫面的問題，但如果開發者希望在不同裝置呈現不同的內容，甚至不同的互動時，多版本網站還是解法。如果只是幾行字，或許可以用 display 屬性開關切換掉，但總不會 <a href="http://www.facebook.com/">Facebook</a> 套了另一份 CSS 就變成 <a href="http://touch.facebook.com/">Facebook for touch devices</a> 吧 <img src='http://blog.timc.idv.tw/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> 。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc.idv.tw/posts/responsive-web-design/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>知識信用與 HTML5</title>
		<link>http://blog.timc.idv.tw/posts/intellectual-honesty-and-html5/</link>
		<comments>http://blog.timc.idv.tw/posts/intellectual-honesty-and-html5/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 15:36:50 +0000</pubDate>
		<dc:creator>timdream</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[MozTW]]></category>

		<guid isPermaLink="false">http://blog.timc.idv.tw/?p=959</guid>
		<description><![CDATA[Chris Blizzard 的文章 intellectual honesty and html5，正中我上篇文章講的 Apple 如何假裝開放實際上還是在做 vendor locked-in 的陰謀(陽謀?)。只是這次做的太明顯然後就翻船了。 Blizzard 主要的論點是 Apple 竟然大聲說他們喜歡創新的網路，那出來的產品跟作法就要言行一致 －－ 尤其是 HTML5 這一系列的創新本身的目標之一就是互通性 －－ 不能到處廣告說 Safari 支援 HTML5 然後故意把其他也支援的瀏覽器從示範網頁排除掉；這種顯然是沒有信用、不誠懇的傳遞知識的做為。 Mozilla 的 Sayre 做了一個很酸的 HTML5 demo，哈哈哈 (當然不代表 Mozilla 的立場)。]]></description>
			<content:encoded><![CDATA[<p>Chris Blizzard 的文章 <a href="http://www.0xdeadbeef.com/weblog/2010/06/intellectual-honesty-and-html5/">intellectual honesty and html5</a>，正中我<a href="http://blog.timc.idv.tw/posts/ipad-ready-ipad-only/">上篇文章</a>講的 Apple 如何假裝開放實際上還是在做 vendor locked-in 的陰謀(陽謀?)。只是這次做的太明顯然後就翻船了。</p>
<p>Blizzard 主要的論點是 Apple 竟然大聲說他們喜歡創新的網路，那出來的產品跟作法就要言行一致 －－ 尤其是 HTML5 這一系列的創新本身的目標之一就是互通性 －－ 不能到處廣告說 Safari 支援 HTML5 然後故意把其他也支援的瀏覽器從示範網頁排除掉；這種顯然是沒有信用、不誠懇的傳遞知識的做為。</p>
<p>Mozilla 的 Sayre 做了<a href="http://blog.mozilla.com/rob-sayre/2010/06/04/check-out-these-html5-demos/">一個很酸的 HTML5 demo</a>，哈哈哈 (當然不代表 Mozilla 的立場)。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc.idv.tw/posts/intellectual-honesty-and-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 File API + XmlHttpRequest = SWFUpload, now what?</title>
		<link>http://blog.timc.idv.tw/posts/html5-file-api-xmlhttprequest-swfupload-now-what/</link>
		<comments>http://blog.timc.idv.tw/posts/html5-file-api-xmlhttprequest-swfupload-now-what/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 16:10:01 +0000</pubDate>
		<dc:creator>timdream</dc:creator>
				<category><![CDATA[MozTW]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.timc.idv.tw/?p=879</guid>
		<description><![CDATA[So what should you do if you decided to ditch SWFUpload and embrace HTML5 solution for ajax file upload? In honor of the releases of Firefox 3.6 (with File API), I decided to just that in the GFX Firefox promotion site. (sounds perfectly reasonable to use Fx-only technology on such site, right?) Firefox now gives [...]]]></description>
			<content:encoded><![CDATA[<p>So what should you do if you decided to ditch <a href="http://swfupload.org/">SWFUpload</a> and embrace HTML5 solution for ajax file upload? In honor of the releases of <a href="http://www.mozilla.com/">Firefox 3.6</a> (with File API), I decided to just that in the <a href="http://gfx.tw/">GFX Firefox promotion site</a>. <small>(sounds perfectly reasonable to use Fx-only technology on such site, right?)</small> Firefox now gives us the bricks (File API, binary XHR, and File drag-drop), but to build a house it still takes some work. <a href="http://demos.hacks.mozilla.org/openweb/uploadingFiles/">The Mozilla Hacks demo</a> works great but to work with the existing site I need:</p>
<ol>
<li>To create a SWFUpload-like button that opens file selection dialog instead of HTML form file input.</li>
<li>To send the file as a ordinary file upload form &#8211; no need to change php backend to handle raw post</li>
<li>Send the file by jQuery.ajax, firing global callbacks</li>
</ol>
<p>I came up with these methods to solve them:</p>
<p><span id="more-879"></span></p>
<h3>SWFUpload-like button</h3>
<div style="margin: 1em auto">
<input type="file" />
</div>
<p>From the JavaScript almighty <a href="http://www.quirksmode.org/">ppk</a> we know that <a href="http://www.quirksmode.org/dom/inputfile.html">file input from control is almost impossible to style</a>. The solution outlined on that page only tell us how to replace the control with images using <code>opacity: 0</code> trick. In order to fit the clickable area into my 65&#215;65-px button, I have to enlarge the control and confine it into a &lt;div&gt; with <code>overflow: hidden</code>. </p>
<div style="overflow: hidden; height: 65px; width: 65px; background: #ffcccc; margin: 1em auto">
<input type="file" style="opacity: 0.5" />
</div>
<p>The actual hard part is how to enlarge the control. It turns out in Firefox <strong>it ignores CSS specified height and width</strong>; the only thing left for you to set is <code>font-size</code> propriety. </p>
<div style="overflow: hidden; height: 65px; width: 65px; background: #ffcccc; margin: 1em auto">
<input type="file" style="font-size: 65px; opacity: 0.5" />
</div>
<p>Another CSS properity it ignores is the cursor. Firefox puts the &#8220;browse&#8221; button at the very right, so you might what to make sure the arrow cursor, instead of text-input cursor, shows.</p>
<div style="overflow: hidden; height: 65px; width: 65px; background: #ffcccc; margin: 1em auto; position: relative">
<input type="file" style="font-size: 65px; opacity: 0.5; position: absolute; right: 0" />
</div>
<h3>Simulate form upload</h3>
<p>On Mozilla Hacks demo, the file is sent as raw HTTP POST/PUT data. To process such input, one must craft the server-side script all over, without any upload-handling library that I&#8217;ve known of. So we go back to client-side solution: the question now effectively becomes <strong>how to implement <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> format to your (raw) post data</strong>. I&#8217;ll simply post my code snippet below &#8211; turn out to be quite self-explanatory. <sup><a href="#note-rfc-1522">*</a></sup></p>
<pre>
var bd = 'gfx-xhrupload-'
	+ parseInt(Math.random()*(2 &lt;&lt; 16));
var data = '--' + bd + '\n'
	+ 'content-disposition: form-data; name="Filedata";'
	+ ' filename="' + files[0].name + '"\n'
	+ 'Content-Type: ' + files[0].type + '\n\n'
	+ ev.target.result + '\n\n'
	+ '--' + bd + '--';
</pre>
<p>Where <code>ev.target.result</code> is the binary string represent the file, access using FileReader object, and <code>files</code> is the FileList object.</p>
<h3>Send the file via jQuery.ajax</h3>
<blockquote>
<p><strong>Update:</strong> Just found an easy way to do this right instead below: overwrite <code>xhr.send</code> with <code>xhr.sendAsBinary</code> since it&#8217;s seems all right to send text data in binary mode.<a href="#xhr-prototype"><sup>*</sup></a></p>
<pre>
if (window.XMLHttpRequest &#038;&#038; XMLHttpRequest.prototype.sendAsBinary) {
	XMLHttpRequest.prototype.send = function (data) {
		return this.sendAsBinary(data);
	};
}
</pre>
</blockquote>
<p>You might think this is the easiest part, but in reality the normal <code>$.ajax</code> won&#8217;t work even if you set the correct Content-Type, which, according to RFC 1867, is <code>'multipart/form-data, boundary=' + bd</code>.</p>
<p>What went wrong? The problem is jQuery hard-coded <code>xhr.send(data)</code> in it&#8217;s function, and it does not send binary data. I resolved the problem by <strong>actually copying jQuery code, &#8220;patch&#8221; it, and overwrite the original $.ajax function.</strong> I added a &#8220;binary&#8221; option for the purpose; the function would switch to <code>xhr.sendAsBinary(data)</code> if the option is set to true.</p>
<h3>Bonus: File drag and drop</h3>
<p>What SWFUpload doesn&#8217;t do is to make the control accepts files by droping them on it. With Firefox 3.6 you could to that, but you cannot hook the drop event on the &lt;input&gt; itself. Frankly speaking, the button would be to small to aim, so for the sake of better UX, a larger overlay, like the one in Mozilla Hacks demo, should be made. Do remember that hiding the overlay as soon as dragleave fires will stop drop event from firing though &#8211; took me a day to figure that out.</p>
<p>Also, keep in mind your transparent button will accept file dropping if the user had installed <a href="https://addons.mozilla.org/firefox/addon/2190">dragdropupload</a> add-on.</p>
<h3>Conclusion</h3>
<p>With all these research, looks like it&#8217;s actually possible to write <strong>a SWFUpload.js without Flash</strong>. The library would support anything SWFUpload does, except cursor choices on the button. For my project, I didn&#8217;t craft a new <code>XHRUpload()</code> object to replace <code>SWFUpload()</code> because I don&#8217;t need that much of functionality, yet it&#8217;s something can be done.</p>
<p><a href="http://twitter.com/timdream/status/8017601285">It struck me</a> that HTML 5 is practically involves around what Google want to do things w/o Flash. StreetView? We got WebGL. GMail attach. upload? Got File API.</p>
<p>HTML 5. Exciting new world.</p>
<p><small>For complete code on the implementation, stay tuned and check code <a href="http://gfx.tw/js/page.editor.js">here</a> once it went live. For the site, we have not deliver English version yet, but feel free to play around with buttons and symbols &#8211; you should be able to understand it without reading any Chinese.</small></p>
<p><small><strong><a id="note-rfc-1522">Note: </a></strong>According to the MIME spec, the filename should be encoded according to RFC 1522 (&#8220;quoted-printable&#8221;) if it contains characters other than US-ASCII. Personally I replace these characters with underlines instead &#8211; <code>name = name.replace(/[^\x20-\x7E]/g, '_');</code>.</p>
<p><small><strong><a id="xhr-prototype">More update: </a></strong><code>XMLHttpRequest.prototype.sendAsBinary</code> instead of <code>(new XMLHttpRequest()).sendAsBinary<code></small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc.idv.tw/posts/html5-file-api-xmlhttprequest-swfupload-now-what/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Firefox 的預設 Windows 中文字型預設值修改提議</title>
		<link>http://blog.timc.idv.tw/posts/firefox-default-zh-tw-font/</link>
		<comments>http://blog.timc.idv.tw/posts/firefox-default-zh-tw-font/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 02:58:31 +0000</pubDate>
		<dc:creator>timdream</dc:creator>
				<category><![CDATA[MozTW]]></category>

		<guid isPermaLink="false">http://blog.timc.idv.tw/?p=842</guid>
		<description><![CDATA[如果您不想看這落落長的解釋，請往下捲看範例，分享一下您覺得哪個比較好看、容易閱讀。 Firefox 的預設中文字型設定存在 about:config 裡面的 font.name-list.*.zh-TW，裡面列出的字型在下列情況下會被套用在出現的文字上： 文字是中文，且 網頁沒有指定任何中文字型或指定 generic font name，且 HTML 元素的 lang 屬性 設定在 zh-TW，或 設定語言的 font.name 與 font.name-list 屬性沒有任何中文字型且 Firefox 為中文版 目前 sans-serif 和 serif 字型的預設值都放在 PMingLiu，也就是新細明體/細明體。既然 Microsoft 在最近的 Windows 與 Office 提供了新的字型「微軟正黑體」，或許我們可以考慮把這兩個預設值換過去。 Why fix something that is not broken? 是不是「broken」，要看您怎麼定義它 (^^;)。新細明體多年以來是網路設計師唯一的選擇（標楷體太醜了不考慮），在螢幕解析度隨著科技進步，我們再也不需要點陣字才能看清楚中文筆劃的時候，貼近作業系統廠商所提供的新功能是比較好的方向。 新的 Windows 瀏覽器，例如 Safari 與 Chrome，已經將設定換到正黑體了。新版的 Opera 也是。 那就直接改吧，有什麼問題呢？ 有一些 [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
<p>如果您不想看這落落長的解釋，請往下捲看範例，分享一下您覺得哪個比較好看、容易閱讀。</p>
</blockquote>
<p>Firefox 的預設中文字型設定存在 about:config 裡面的 <code>font.name-list.*.zh-TW</code>，裡面列出的字型在下列情況下會被套用在出現的文字上：</p>
<ul>
<li>文字是中文，且</li>
<li>網頁沒有指定任何中文字型或指定 generic font name，且</li>
<li>HTML 元素的 lang 屬性
<ul>
<li>設定在 zh-TW，或</li>
<li>設定語言的 font.name 與 font.name-list 屬性沒有任何中文字型且 Firefox 為中文版</li>
</ul>
</ul>
<p>目前 sans-serif 和 serif 字型的預設值都放在 PMingLiu，也就是新細明體/細明體。既然 Microsoft 在最近的 Windows 與 Office 提供了新的字型「<strong>微軟正黑體</strong>」，或許我們可以考慮把這兩個預設值換過去。</p>
<h3>Why fix something that is not broken?</h3>
<p>是不是「broken」，要看您怎麼定義它 (^^;)。新細明體多年以來是網路設計師唯一的選擇（標楷體太醜了不考慮），在螢幕解析度隨著科技進步，我們再也不需要點陣字才能看清楚中文筆劃的時候，貼近作業系統廠商所提供的新功能是比較好的方向。</p>
<p>新的 Windows 瀏覽器，例如 Safari 與 Chrome，已經將設定換到正黑體了。新版的 Opera 也是。</p>
<h3>那就直接改吧，有什麼問題呢？</h3>
<p>有一些 pros and cons 需要釐清；雖說是大哉問，因為我們沒有量化的數據可以確定：</p>
<ul>
<li>正黑體在某些電腦上反而是比較難看的字型，例如沒有開 ClearType 的 Windows XP，或是開了卻沒有 tune 過。
<ul>
<li>沒有正黑體的電腦不管預設值怎麼改都沒差。</li>
<li>不確定「特別安裝了正黑體」的 Windows XP 的比率。或許約等於 Office 2007 的比率？</li>
</ul>
</li>
<li>必須在「使用者習慣」與「提供更好選擇」做抉擇。
<ul>
<li>市場上只剩下 IE6/7/8 還是預設在新細明體呀，改到正黑體變成是產品差異化，但是使用者喜歡這個差異嗎？</li>
<li>很多知名的網站會掉進上列的字型套用條件，對使用者的感受相當大。</li>
</ul>
</li>
<li>一般使用者很難找到這個設定值
<ul>
<li>選項視窗裡面的字型是 <code>font.name.*.zh-TW</code>，當年因為不想讓語言屬性影響英文字的顯示，所以一直都放在 Arial 與 Times New Roman。</li>
<li>中文字是因為那兩個字型沒有那些字所以才找 font.name-list 裡指定的字型的。</li>
<li>如果使用者不喜歡，他無法從選項視窗改回來。</li>
</ul>
</li>
</ul>
<h3>來個有圖有真相吧</h3>
<p>簡單來說，如果大家覺得不錯，我們可以把 Windows <ins>XP</ins> 上的 Yahoo 奇摩首頁從這個樣子（點進去看完整圖）：</p>
<p><a href="http://bit.ly/5fvjD3"><img src="http://blog.timc.idv.tw/wp-content/uploads/yahoo-part-ming.PNG" alt="yahoo-part-ming" title="yahoo-part-ming" width="500" height="190" class="aligncenter size-full wp-image-852" /></a></p>
<p>變成這個樣子：</p>
<p><a href="http://bit.ly/6RMjHx"><img src="http://blog.timc.idv.tw/wp-content/uploads/yahoo-part-hei.png" alt="yahoo-part-hei" title="yahoo-part-hei" width="500" height="190" class="aligncenter size-full wp-image-854" /></a></p>
<p>這兩個 screenshot 是在 Windows XP 上開 ClearType （沒有 tune 過）的結果。想要測試自己的電腦，請打開 about:config，輸入 zh-TW，修改兩個 font.name-list，從「<strong>PMingLiU, MingLiU</strong>」改成「<strong>微軟正黑體, PMingLiU, MingLiU</strong>」。歡迎提供 Vista 或是 7 上面的 screenshot （話說我還真的不知道有什麼不同）</p>
<p><strong>Update:</strong> Windows 7 和 Vista 下面有回應回報 ClearType + 正黑體不會太細。</p>
<p>已知此設定會影響的網站有：<strong>Yahoo!奇摩首頁、Google 首頁、PIXNET 首頁、無名小站首頁、Facebook 英文版上的中文字（中文版把語言指到 zh 所以沒有影響）、GMail、Twitter、Plurk 預設模板</strong>。</p>
<h3>所以？</h3>
<p>告訴我您認為哪個字型比較容易閱讀吧。網頁設計師如果有一些經驗和數據可以分享，也請不吝指教。</p>
<h3>番外篇：那其他作業系統呢？</h3>
<p>Mac OS X 的設定很歡樂的放在 LiGothic，而不是 Snow Leopard <a href="http://zonble.github.com/tcfail/">萬惡的 Heiti TC</a>。倒是在討論這件事情的過程我們發現 monospace.zh-TW 指定的字型是錯的，這個已經開 bug 報上去了（感謝 Irvin）。</p>
<p>Linux 則是完全沒有寫 font.name-list 預設值 &#8230; Firefox 會很合理的去拉 Gnome 與系統 fontconfig 所定義的 sans-serif 與 serif 字型。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc.idv.tw/posts/firefox-default-zh-tw-font/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>MozTW 招募新手喔！</title>
		<link>http://blog.timc.idv.tw/posts/moztw-wants-you/</link>
		<comments>http://blog.timc.idv.tw/posts/moztw-wants-you/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 11:43:19 +0000</pubDate>
		<dc:creator>timdream</dc:creator>
				<category><![CDATA[MozTW]]></category>

		<guid isPermaLink="false">http://blog.timc.idv.tw/?p=837</guid>
		<description><![CDATA[MozTW 招募新手喔！11/21 晚上 7 點我們會在高雄辦個小聚，介紹現在進行的事項還有你能幫助的部份。 我們希望找到有熱情能夠承諾把生活中一部分的時間拉出來，負責完成某項工作的人。當然既然是志願性質的，就不會逼你做你不想做的事情啦。還有，不要覺得自己沒能力，我們沒有任何一件工作是能夠自稱為專家的人在處理；無論從企劃到技術&#8230;XD 我們目前進行的工作大概有： L10n: Firefox、Firefox Mobile、Weave Sync、Mozilla.com；(Thunderbird、AMO、Sunbird、SeaMonkey) Web Dev: Server Admin, moztw.org 主站、抓火狐、其他臨時活動等等；(歡迎提供企劃；Facebook 遊戲？) Docs: moztw.org 主站；(Mozilla Links、moztw Wiki、SUMO) 括號是目前懸空的工作（如果沒有人接手可能會斷掉的事情）。 而我們需要下列技能（當然，別忘了前面提到，您不一定是 pro 才能參與）： Web Developer Web Designer Technical evangelist Usability specialist (Localization or Web) Translator (Localization or documentation) 如果有興趣會到場的話，麻煩來簽個到吧！另外台北場會在高雄之後的下週或是下下週末進行，如果無法到高雄的朋友可以考慮。 Update: 台北場相關資訊。 PS: 寫完上面的列表才發現原來雜工做的事情還真雜呀 (T_T)&#8230;]]></description>
			<content:encoded><![CDATA[<p>MozTW 招募新手喔！11/21 晚上 7 點我們會在高雄辦個小聚，介紹現在進行的事項還有你能幫助的部份。</p>
<p>我們希望找到有熱情能夠承諾把生活中一部分的時間拉出來，負責完成某項工作的人。當然既然是志願性質的，就不會逼你做你不想做的事情啦。還有，不要覺得自己沒能力，我們沒有任何一件工作是能夠自稱為專家的人在處理；無論從企劃到技術&#8230;XD</p>
<p>我們目前進行的工作大概有：</p>
<ul>
<li>L10n: Firefox、Firefox Mobile、Weave Sync、Mozilla.com；(Thunderbird、AMO、Sunbird、SeaMonkey)</li>
<li>Web Dev: Server Admin, moztw.org 主站、抓火狐、其他臨時活動等等；(歡迎提供企劃；Facebook 遊戲？)</li>
<li>Docs: moztw.org 主站；(Mozilla Links、moztw Wiki、SUMO)</li>
</ul>
<p>括號是目前懸空的工作（如果沒有人接手可能會斷掉的事情）。</p>
<p>而我們需要下列技能（當然，別忘了前面提到，您不一定是 pro 才能參與）：</p>
<ul>
<li>Web Developer</li>
<li>Web Designer</li>
<li>Technical evangelist</li>
<li>Usability specialist (Localization or Web)</li>
<li>Translator (Localization or documentation)</li>
</ul>
<p>如果有興趣會到場的話，麻煩<a href="http://forum.moztw.org/viewtopic.php?p=153098#p153098">來簽個到吧</a>！另外台北場會在高雄之後的下週或是下下週末進行，如果無法到高雄的朋友可以考慮。</p>
<p><strong>Update: <a href="http://forum.moztw.org/viewtopic.php?f=48&#038;t=28876">台北場相關資訊</a>。</strong></p>
<p>PS: 寫完上面的列表才發現原來雜工做的事情還真雜呀 (T_T)&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc.idv.tw/posts/moztw-wants-you/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Firefox 5 Birthday!</title>
		<link>http://blog.timc.idv.tw/posts/firefox-5-birthday/</link>
		<comments>http://blog.timc.idv.tw/posts/firefox-5-birthday/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 07:18:16 +0000</pubDate>
		<dc:creator>timdream</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[MozTW]]></category>

		<guid isPermaLink="false">http://blog.timc.idv.tw/?p=832</guid>
		<description><![CDATA[要怎麼形容我們這個社群在幹麻呢？最近因故又遇到了這個問題。不過也是剛好正在翻譯Firefox 五週年！網站的文案，發現文中的描述的概念很簡單，卻很精確：我們希望人人的網際生活體驗能變的更美好。 不管你有沒有在用 Firefox 或是覺得它好不好用，Firefox 五年的存在的確讓 web 變的更好；即便不是市場上的 dominant force，但鳳凰的重生(*)的確驅使了新的技術進步，與隨之而來的網路應用。想想看，下個五年我們能一起成就什麼？ * 參考 about:mozilla。 技術筆記： 這個網站 (project 代號 [Fyfx]) 我貢獻了中文 embedded font 的部份（標題後面的「五週年！」三個字），其中用到了 tka 的神妙 script，把 Droid Sans 字型 (3MB) 裡面會用到的字抽出來組 subset 字型 (16KB) 的技術。用 Droid 是因為版權，還有要同時讓簡繁日韓四個 locale 都能使用；我知道寫法和繁體標準字不一樣，不過這是 trade off。 當然要感謝 tka 大大的幫助！]]></description>
			<content:encoded><![CDATA[<p><object width="560" height="340"><param name="movie" value="http://www.youtube-nocookie.com/v/-ULDH90H530&#038;hl=zh_TW&#038;fs=1&#038;color1=0x3a3a3a&#038;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/-ULDH90H530&#038;hl=zh_TW&#038;fs=1&#038;color1=0x3a3a3a&#038;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>要怎麼形容我們這個社群在幹麻呢？最近因故又遇到了這個問題。不過也是剛好正在翻譯<a href="http://www.spreadfirefox.com/5years/zh-TW/">Firefox 五週年！</a>網站的文案，發現文中的描述的概念很簡單，卻很精確：<strong>我們希望人人的網際生活體驗能變的更美好。</strong></p>
<p>不管你有沒有在用 Firefox 或是覺得它好不好用，Firefox 五年的存在的確讓 web 變的更好；即便不是市場上的 dominant force，但鳳凰的重生(*)的確驅使了新的技術進步，與隨之而來的網路應用。想想看，下個五年我們能一起成就什麼？ </p>
<p>* 參考 <a href="http://en.wikipedia.org/wiki/About:mozilla">about:mozilla</a>。</p>
<p><strong>技術筆記：</strong> 這個網站 (project 代號 [Fyfx]) 我貢獻了中文 embedded font 的部份（標題後面的「五週年！」三個字），其中用到了 tka 的神妙 script，把 Droid Sans 字型 (3MB) 裡面會用到的字抽出來組 subset 字型 (16KB) 的技術。用 Droid 是因為版權，還有要同時讓簡繁日韓四個 locale 都能使用；我知道寫法和繁體標準字不一樣，不過這是 trade off。</p>
<p>當然要感謝 <a href="http://www.tkalu.com/">tka 大大</a>的幫助！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc.idv.tw/posts/firefox-5-birthday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open ID 的登出：易用性與安全性問題</title>
		<link>http://blog.timc.idv.tw/posts/loging-out-an-open-id-sp-an-usibility-and-security-issue/</link>
		<comments>http://blog.timc.idv.tw/posts/loging-out-an-open-id-sp-an-usibility-and-security-issue/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 02:23:11 +0000</pubDate>
		<dc:creator>timdream</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[MozTW]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://blog.timc.idv.tw/?p=806</guid>
		<description><![CDATA[之前在 Twitter 和 Irvin 討論過，後來又在 xdite 的 ptt2 個人板上面也討論過 PIXNET 的 implement 方法，但我一直都沒有講清楚（阿表達能力薄弱呀orz）所以試著在這裡用長篇幅表達看看： Open ID 對許多使用者來說，是首次能將「登入認證」和「登入狀態」兩者拆開的全新體驗。因為是認證機制，所以要在易用性上確保使用者能認知 Open ID 幫他做了什麼，且他自己要做什麼以免身分遭到冒用。 定義一下，「登入認證」就是那組帳號密碼（或是指紋、掌紋、聲音辨識，隨便），「登入狀態」則是使用者是否已經登入的判斷，在網頁上面就是 cookie。 Open ID 的設計讓使用者看起來1可以共用「登入認證」（即，用同一個身份登入不同的網站），甚至看起來2是直接複製「登入狀態」（因為許多 Open ID sp 的作法是如果已經登入 rp 來要認證的話就直接發 token，不顯示確認畫面）。 因為沒有 single sign-off 能力，當使用者登出 sp 的時候，rp 的「登入狀態」不會因此更新。反過來登出 rp 的時候當然不能讓 rp 去登出 sp（想像你去逛一下抓火狐然後按登出結果連 GMail 都登出了&#8230;），只是就以上的情況與 UI 暗示，使用者真的知道登出 PIXNET 主站的時候 murmur.tw 不會跟著登出嗎？ 如果不知道，這就是個安全性問題。使用者去 PIXNET 發完部落格文章然後去 murmur [...]]]></description>
			<content:encoded><![CDATA[<p>之前在 Twitter 和 <a href="http://twitter.com/irvinfly">Irvin</a> 討論過，後來又在 <a href="http://blog.xdite.net/">xdite</a> 的 <a href="telnet://ptt2.cc/" title="板名 xdite">ptt2 個人板</a>上面也討論過 <a href="http://pixnet.net/">PIXNET</a> 的 implement 方法，但我一直都沒有講清楚（阿表達能力薄弱呀orz）所以試著在這裡用長篇幅表達看看：</p>
<p>Open ID 對許多使用者來說，是<strong>首次能將「登入認證」和「登入狀態」兩者拆開的全新體驗</strong>。因為是認證機制，所以要在易用性上確保使用者能認知 Open ID 幫他做了什麼，且<strong>他自己要做什麼以免身分遭到冒用</strong>。</p>
<p>定義一下，「登入認證」就是那組帳號密碼（或是指紋、掌紋、聲音辨識，隨便），「登入狀態」則是使用者是否已經登入的判斷，在網頁上面就是 cookie。</p>
<p>Open ID 的設計讓使用者<em>看起來</em><sup>1</sup>可以共用「登入認證」（即，用同一個身份登入不同的網站），甚至<em>看起來</em><sup>2</sup>是直接複製「登入狀態」（因為許多 Open ID sp 的作法是如果已經登入 rp 來要認證的話就直接發 token，不顯示確認畫面）。</p>
<p>因為沒有 single sign-off 能力，當使用者登出 sp 的時候，rp 的「登入狀態」不會因此更新。反過來登出 rp 的時候當然不能讓 rp 去登出 sp（想像你去逛一下<a href="http://gfx.tw/">抓火狐</a>然後按登出結果連 <a href="http://mail.google.com/mail">GMail</a> 都登出了&#8230;），只是<strong>就以上的情況與 UI 暗示，使用者真的知道登出 PIXNET 主站的時候 <a href="http://murmur.tw/">murmur.tw</a> 不會跟著登出嗎？</strong></p>
<p>如果不知道，這就是個安全性問題。使用者去 PIXNET 發完部落格文章然後去 murmur 碎碎念一下，結果只按了 PIXNET 的登出卻不知道要按 murmur 的登出&#8230; 更何況 murmur 的首頁上只用了一個「使用痞客邦 PIXNET 帳號登入」的按鈕就直接用 OpenID 交換認證。</p>
<p>在我和 xdite 反應這件事情之後，PIXNET 在 sp 端輸入帳號密碼的畫面加上了[同時也登入痞客邦 PIXNET]的勾勾。雖說這個勾勾能讓使用者正確意識到 murmur 和 PIXNET 兩者的「登入狀態」是獨立的，但是因為 PIXNET 做的 Open ID sp 在已認證的狀態下會跳過這個畫面，所以大部分的時候是白搭，使用者根本看不到。</p>
<p>重新整理一次：</p>
<p>Open ID：</p>
<ul>
<li>共用登入認證，sp 端登入後 rp 可以直接拿 token</li>
<li>不共用登入狀態，要分別登出</li>
</ul>
<p>但使用者看起來：</p>
<ul>
<li>因為登入不用重新輸入認證，所以登入狀態好像是共用的</li>
<li>那在 sp 登出的時候 rp 好像會一起登出</li>
<li>實際上不會，所以這造成了<strong>安全性問題</strong></li>
</ul>
<p>這樣的暗示問題在 PIXNET 會比其他網站嚴重，因為使用者明知 murmur 或是 belovely 就是 PIXNET 的網站，要意識到同一家公司的不同網站「登入狀態」竟然是獨立的這還滿難的。畢竟我們都被 Google 或是 Yahoo! 跳來跳去的登入畫面養壞胃口了。</p>
<p>倒是我想不透除了背後從資料庫每次查詢認證以外，Google 怎麼從 google.com 把 blogger.com 的認證拿掉的；不同 domain 的 cookie 不是沒辦法存取嗎？會不會搞半天其實這是唯一的解法&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc.idv.tw/posts/loging-out-an-open-id-sp-an-usibility-and-security-issue/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WebGL</title>
		<link>http://blog.timc.idv.tw/posts/webgl/</link>
		<comments>http://blog.timc.idv.tw/posts/webgl/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 03:13:57 +0000</pubDate>
		<dc:creator>timdream</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[MozTW]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.timc.idv.tw/?p=793</guid>
		<description><![CDATA[用 JavaScript 在網頁上不經由外掛直接 access 機器的 OpenGL 硬體加速。超級誘人的呀！連 Ajaxian 的 Dion Almaer 都 RT 說： Your next 3D shooter will sport a nice &#8220;Your browser is not supported please install Chrome, Safari or Firefox.&#8221; 但我想到的事情是 OpenGL 真正 implement 的情況。記得之前和 Walker 做 Stellarium 的地景的時候，就發現有些電腦 PNG 檔可以超過 3600px，有些不行；有些電腦上有些行星的材質會亂閃，有些不會；有些電腦 Stellarium 會錯誤根本無法啟動。所以標準是一回事，以後要用 Web 寫 3D 遊戲可能要有財力買個五六張顯示卡，加上瀏覽器/作業系統做排列組合測試。真正可能會出現的訊息是： Your graphics card, browser, [...]]]></description>
			<content:encoded><![CDATA[<p>用 JavaScript 在網頁上不經由外掛直接 access 機器的 OpenGL 硬體加速。超級誘人的呀！連 <a href="http://ajaxian.com/">Ajaxian</a> 的 <a href="http://twitter.com/dalmaer">Dion Almaer</a> 都 <a href="http://twitter.com/dalmaer/status/4139870702">RT 說</a>：</p>
<blockquote><p>Your next 3D shooter will sport a nice &#8220;Your browser is not supported please install Chrome, Safari or Firefox.&#8221;
</p></blockquote>
<p>但我想到的事情是 OpenGL 真正 implement 的情況。記得之前和 <a href="http://taipro.blogspot.com/">Walker</a> 做 <a href="http://www.stellarium.org/">Stellarium</a> 的地景的時候，就發現有些電腦 PNG 檔可以超過 3600px，有些不行；有些電腦上有些行星的材質會亂閃，有些不會；有些電腦 Stellarium 會錯誤根本無法啟動。所以標準是一回事，以後要用 Web 寫 3D 遊戲可能要有財力買個五六張顯示卡，加上瀏覽器/作業系統做排列組合測試。真正可能會出現的訊息是：</p>
<blockquote><p>Your graphics card, browser, and OS combination is untested. Use at your own risk!
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.timc.idv.tw/posts/webgl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
