<?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>Anthony Wong &#187; Technology</title>
	<atom:link href="http://blog.anthonywong.net/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.anthonywong.net</link>
	<description>Imagine</description>
	<lastBuildDate>Mon, 10 Jan 2011 17:16:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Google Chrome is the winner, Javascript speed-wise</title>
		<link>http://blog.anthonywong.net/2009/07/19/google-chrome-is-the-winner-javascript-speed-wise/</link>
		<comments>http://blog.anthonywong.net/2009/07/19/google-chrome-is-the-winner-javascript-speed-wise/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 18:06:42 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[SunSpider]]></category>
		<category><![CDATA[V8]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web browser]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/?p=166</guid>
		<description><![CDATA[Did some benchmark testing on the Javascript engines of several Mac OS X web browsers by using SunSpider and Google&#8217;s V8 benchmark suite. Although Google Chrome is still a development release on OS X, it&#8217;s already the winner in this test. Safari 4 comes second, it shows similar results in the SunSpider test but loses]]></description>
			<content:encoded><![CDATA[<p>Did some benchmark testing on the Javascript engines of several Mac OS X web browsers by using <a href="http://www2.webkit.org/perf/sunspider-0.9/sunspider-driver.html">SunSpider</a> and Google&#8217;s <a href="http://v8.googlecode.com/svn/data/benchmarks/v5/run.html">V8 benchmark suite</a>. Although Google Chrome is still a development release on OS X, it&#8217;s already the winner in this test. Safari 4 comes second, it shows similar results in the SunSpider test but loses more in the V8 test. Sadly Firefox 3.5 loses to both of them by quite a significant margin, despite the fact that Firefox 3.5 introduces the new <a href="https://wiki.mozilla.org/JavaScript:TraceMonkey">TraceMonkey</a> JavaScript engine. Opera 10.00 beta 2 is just not a viable competitor to all of the others, I hope this is just because of the beta thing.</p>
<p>Here are some charts that show the results:</p>
<p><img style="border: 1px #CCC solid" src="http://blog.anthonywong.net/wp-content/uploads/2011/01/sunspider_javascript_benchmark_firefox_safari_opera_chrome.png" alt="sunspider javascript benchmark of firefox, safari, opera and chrome" title="" width="596" height="320" class="alignnone size-full wp-image-207" /></p>
<p><img style="border: 1px #CCC solid" src="http://blog.anthonywong.net/wp-content/uploads/2011/01/os_x_web_browser_javascript_speed_comparison_vs_firefox_firefox_safari_opera_chrome.png" alt="OS X web browser Javascript speed comparison among firefox, safari, opera and google chrome" title="" width="596" height="320" class="alignnone size-full wp-image-206" /></p>
<p><img style="border: 1px #CCC solid" src="http://blog.anthonywong.net/wp-content/uploads/2011/01/v8_benchmark_total_score_firefox_safari_opera_chrome.png" alt="V8 benchmark total score of Firefox, Safari, Opera and Google Chrome" title="" width="598" height="320" class="alignnone size-full wp-image-204" /></p>
<p><img style="border: 1px #CCC solid" border="1" src="http://blog.anthonywong.net/wp-content/uploads/2011/01/v8_benchmark_score_breakdown_firefox_safari_opera_chrome.png" alt="" title="v8_benchmark_score_breakdown_firefox_safari_opera_chrome" width="600" height="320" class="size-full wp-image-205" /></p>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=166&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2009/07/19/google-chrome-is-the-winner-javascript-speed-wise/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>商業電台網站大混亂</title>
		<link>http://blog.anthonywong.net/2008/07/01/%e5%95%86%e6%a5%ad%e9%9b%bb%e5%8f%b0%e7%b6%b2%e7%ab%99%e5%a4%a7%e6%b7%b7%e4%ba%82/</link>
		<comments>http://blog.anthonywong.net/2008/07/01/%e5%95%86%e6%a5%ad%e9%9b%bb%e5%8f%b0%e7%b6%b2%e7%ab%99%e5%a4%a7%e6%b7%b7%e4%ba%82/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 20:35:23 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[Hong Kong]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[881903]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/2008/07/01/%e5%95%86%e6%a5%ad%e9%9b%bb%e5%8f%b0%e7%b6%b2%e7%ab%99%e5%a4%a7%e6%b7%b7%e4%ba%82/</guid>
		<description><![CDATA[真係未見過有公司咁樣 launch website 嘅，原本個 website run 得好地地，為咗推新 service，將成個 site 換咗佢，結果係搞到好多俾咗錢聽 archive 嘅人聽唔到，特別係一眾 Mac user 同非 Windows user。嗰個新推出嘅 Toolbar 又唔 support OS X，又唔 support Firefox 3。原本嗰 site 都仲有得俾 user 揀用 RealPlayer 定係 Windows Media Player (Microsoft ASF format) 來收聽 realtime 廣播同 archive，但係個新 website 淨係 serve ASF 同埋用佢個 P2P toolbar。香港公司搞 website，已經無眼睇好耐。宜家咩年代啊，做 website 竟然仲唔注意係唔係 cross-platform。雖然 Real Audio 同]]></description>
			<content:encoded><![CDATA[<p>真係未見過有<a href="http://www.881903.com">公司</a>咁樣 launch website 嘅，原本個 website run 得好地地，為咗推新 service，將成個 site 換咗佢，結果係搞到好多俾咗錢聽 archive 嘅人聽唔到，特別係一眾 Mac user 同非 Windows user。嗰個新推出嘅 Toolbar 又唔 support OS X，又唔 support Firefox 3。原本嗰 site 都仲有得俾 user 揀用 RealPlayer 定係 Windows Media Player (Microsoft ASF format) 來收聽 realtime 廣播同 archive，但係個新 website 淨係 serve ASF 同埋用佢個 P2P toolbar。香港公司搞 website，已經無眼睇好耐。宜家咩年代啊，做 website 竟然仲唔注意係唔係 cross-platform。雖然 Real Audio 同 ASF 都係 proprietary，但係點計 RealPlayer 嘅 cross-platform support 都好過 ASF 好多，Mac 有 client，Linux 又有，連 Unix 都有。宜家商台竟然仲廢埋 Real Audio，有無搞錯。其實商台真係好天真好傻，將個 site outsource 俾大陸公司做，大陸公司做 website 出名 IE-only，商台自己嘅 project management 又好有問題，無做好 testing 唔駛講，個 site 宜家俾人<a href="http://beta.881903.com/page/zh-tw/newsdetail.aspx?itemid=43353">媽到飛起</a>，俾咗錢嘅用唔到應有服務，咁都仲唔 rollback 番個舊 site 出來，又或者同時間放番個舊 site 出來一齊行，咁係咪即係話根本無諗過任何 fallback plan，無 contingency plan 嘅呢？前幾日入去商台個 website，赫然發現個 domain name 變咗 beta.881903.com，心諗，唔係唔記得改番 DNS 吓嘛，邊有人用咁嘅 domain name 架，後來先發現原來商台係認真嘅，仲喺埋個 logo 寫住 beta，懶係 web 2.0 咁，真係膠到無朋友。人哋啲 website 寫住 beta，好似 gmail 咁，alpha, beta, gamma 都無問題，因為第一，佢就算係 beta 都仍然好 stable，第二，佢無收我錢。但係商台呢個 case 唔係咁，我真係唔信竟然有人 launch beta service 俾 paid service 嘅 user 咁樣搵香蕉皮自己踩。</p>
<p>好，鬧完，既然俾咗錢，唯有自救，用 XCode + Applescript + shell script 寫咗個 application 俾 Mac OS 10.5 嘅 user 用（唔知 10.4 得唔得，得嘅話通知聲），可以聽得番 archive，<a href="http://blog.anthonywong.net/wp-content/uploads/SUCKR Launcher Installer v0010.dmg">呢度 download</a>。Download 完記得睇 README 點樣用！為咗獲得最佳效果，請同時下載 <a href="http://www.real.com/mac/realplayer">Real Player</a> &#038; <a href="http://www.flip4mac.com/wmv_download.htm">Flip4Mac</a>，得閒可以順手裝埋 <a href="http://perian.org/">Perian</a>。</p>
<p><em>更新 2/7/2008 6:25pm: 如果你安裝咗 Flip4Mac，你要先響 System Preferences 度打開 Flip4Mac，make sure &#8220;Use Filp4Mac WMV Browser Plug-in&#8221; 選項無被揀中。</em></p>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=163&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2008/07/01/%e5%95%86%e6%a5%ad%e9%9b%bb%e5%8f%b0%e7%b6%b2%e7%ab%99%e5%a4%a7%e6%b7%b7%e4%ba%82/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>帝國反擊戰</title>
		<link>http://blog.anthonywong.net/2008/03/27/%e5%b8%9d%e5%9c%8b%e5%8f%8d%e6%93%8a%e6%88%b0/</link>
		<comments>http://blog.anthonywong.net/2008/03/27/%e5%b8%9d%e5%9c%8b%e5%8f%8d%e6%93%8a%e6%88%b0/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 15:14:37 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[betrayer]]></category>
		<category><![CDATA[FUD]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[ODF]]></category>
		<category><![CDATA[OOXML]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/2008/03/27/%e5%b8%9d%e5%9c%8b%e5%8f%8d%e6%93%8a%e6%88%b0/</guid>
		<description><![CDATA[看來中國的袁萌教授自從應邀拜訪微軟帝國之後倒戈一事，與 ODF 編輯 Patrick Durusau 發表支持 OOXML 公開信這兩件事，都是有關連的，不是獨立事件。這些異動在背後操作的無疑是微軟帝國。帝國黔驢技窮，提出的標準技術不行，轉而用“人事”手段收買一些沒有靈魂的人提他們出口術。 延伸閱讀： Slashdot 報導：http://tech.slashdot.org/article.pl?sid=08/03/25/2150226 一篇對 Darusau 的回應：http://lxer.com/module/newswire/view/101017/index.html 來看看 OOXML 有多難看：http://www.robweir.com/blog/2008/03/disharmony-of-ooxml.html]]></description>
			<content:encoded><![CDATA[<p>看來<a href="http://opensource.solidot.org/article.pl?sid=08/03/19/0340211">中國的袁萌教授自從應邀拜訪微軟帝國之後倒戈</a>一事，與 ODF 編輯 <a href="http://www.durusau.net/">Patrick Durusau</a> 發表<a href="http://www.durusau.net/publications/wholoses.pdf">支持 OOXML 公開信</a>這兩件事，都是有關連的，不是獨立事件。這些異動在背後操作的無疑是微軟帝國。帝國黔驢技窮，提出的標準技術不行，轉而用“人事”手段收買一些沒有靈魂的人提他們出口術。</p>
<p>延伸閱讀：<br />
Slashdot 報導：<a href="http://tech.slashdot.org/article.pl?sid=08/03/25/2150226">http://tech.slashdot.org/article.pl?sid=08/03/25/2150226</a><br />
一篇對 Darusau 的回應：<a href="http://lxer.com/module/newswire/view/101017/index.html">http://lxer.com/module/newswire/view/101017/index.html</a><br />
來看看 OOXML 有多難看：<a href="http://www.robweir.com/blog/2008/03/disharmony-of-ooxml.html">http://www.robweir.com/blog/2008/03/disharmony-of-ooxml.html</a></p>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=161&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2008/03/27/%e5%b8%9d%e5%9c%8b%e5%8f%8d%e6%93%8a%e6%88%b0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I helped Firefox today, I&#8217;m feeling great</title>
		<link>http://blog.anthonywong.net/2008/03/19/i-helped-firefox-today-im-feeling-great/</link>
		<comments>http://blog.anthonywong.net/2008/03/19/i-helped-firefox-today-im-feeling-great/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 08:49:56 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/2008/03/19/i-helped-firefox-today-im-feeling-great/</guid>
		<description><![CDATA[It&#8217;s not easy to find a reproducible bug in a stable open source software that has the exposure as large as Mozilla Firefox, which has more than 20% market share of the web browser market in Europe. But I did, and I think I&#8217;m very lucky. Not only that, this bug has been hiding in]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not easy to find a reproducible bug in a stable open source software that has the exposure as large as <a href="http://www.mozilla.com/firefox">Mozilla Firefox</a>, which has more than 20% market share of the web browser market in Europe. But I did, and I think I&#8217;m very lucky. Not only that, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=413310">this bug</a> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=180598">has been hiding in Firefox since 2003</a> (was it the Firefox 1.0 days?), so this bug has been in existence for 5 years, wow, I think I&#8217;m really very lucky to have spotted it.</p>
<p>This bug is serious, but very difficult to manifest itself. Under rare conditions, a form post will be sent to the web server twice without your notice. Say, if you&#8217;re shopping in an online e-shop, and you&#8217;re so &#8220;lucky&#8221; that you encountered this bug, you would be buying the same goods twice, or if you&#8217;re making a payment, you would be paying the amount double.</p>
<p>Thanks <a href="http://blogs.sun.com/pengyang/">Alfred Peng</a> for confirming the bug so that Firefox developers began taking a look at the bug. From the perspective of open source development, identifying and testing thoroughly for the existence of the bug and filing a detail bug report with reproducible steps is the task I should do. The <a href="https://bugzilla.mozilla.org/attachment.cgi?id=304595&#038;action=diff">fix</a> for the bug is just less than 10 lines long (the test case is much longer), but it may take me days if I have to come up with a patch. Filing a bug report is something anyone who speaks English can do, so if you find a bug in Firefox, please go to their <a href="http://bugzilla.moziila.org">bug tracking system</a> and submit a problem report. The more people contribute to it, the better the software will become, and by doing so, we, in turn, are helping ourselves to create a more pleasant web experience. </p>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=159&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2008/03/19/i-helped-firefox-today-im-feeling-great/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Is switching proxies on Mac OS 10.5 scriptable?</title>
		<link>http://blog.anthonywong.net/2008/01/29/is-switching-proxies-on-mac-os-105-scriptable/</link>
		<comments>http://blog.anthonywong.net/2008/01/29/is-switching-proxies-on-mac-os-105-scriptable/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 19:29:37 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/2008/01/29/is-switching-proxies-on-mac-os-105-scriptable/</guid>
		<description><![CDATA[I often need to change the network proxies settings frequently due to the need to bypass the GFW when accessing websites that are considered &#8220;bad&#8221;, and have to set the settings back to not using any proxies when accessing &#8220;good&#8221; websites. Doing so in Firefox is easy thanks to the little yet handy plugin called]]></description>
			<content:encoded><![CDATA[<p>I often need to change the network proxies settings frequently due to the need to bypass the <a href="http://zh.wikipedia.org/wiki/GFW"><abbr title="The Great Firewall">GFW</abbr></a> when accessing websites that are considered &#8220;bad&#8221;, and have to set the settings back to not using any proxies when accessing &#8220;good&#8221; websites.</p>
<p>Doing so in Firefox is easy thanks to the little yet handy plugin called SwitchProxy, but for Safari or other applications which use the global system settings of Mac OS, one has to go through many steps in System Preferences to set them, and then go through the exact steps again to unset them. Too repetitive. I wish there is a way to set and unset proxies easily, but I cannot find one. I bit the bullet and use <a href="http://www.apple.com/applescript/">AppleScript</a> (yuck) to do that, here&#8217;s the complete script (beware, this is my first AppleScript program):</p>
<p><small></p>
<pre>
set proxyServer to "localhost"
set proxyPort to "30000"

tell application "System Preferences"
  activate
  set the current pane to pane id "com.apple.preference.network"
  get the name of every anchor of pane id "com.apple.preference.network"
  reveal anchor "Proxies" of pane id "com.apple.preference.network"
end tell

tell application "System Events"
  tell process "System Preferences"
    tell window "Network"
      tell sheet 1
        tell tab group 1
          tell group 1
            repeat with n from 1 to 3
              tell scroll area 1
                tell table 1
                  select row n
                  tell row n
                    click checkbox 1
                    set turnOnProxy to value of checkbox 1
                  end tell
                end tell
              end tell
              if turnOnProxy is 1 then
                tell group 1
                  set focused of text field 1 to true
                  set value of text field 1 to proxyPort
                  set focused of text field 2 to true
                  set value of text field 2 to proxyServer
                end tell
              end if
            end repeat
          end tell
        end tell
        click button "OK"
      end tell
      click button "Apply"
    end tell
  end tell
end tell

ignoring application responses
  tell application "System Preferences" to quit
end ignoring

if turnOnProxy is 1 then
  say "Proxies are set"
else
  say "Proxies are unset"
end if
</pre>
<p></small></p>
<p>I hate to use AppleScript as it simply plays back what a human does, and so the speed is slow, which takes about 5 seconds to finish. I tried to do that by shell script but I couldn&#8217;t find the right way to do so, having looked at the <code>defaults</code> command but seems it is not capable at what I want. Anybody knows?</p>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=158&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2008/01/29/is-switching-proxies-on-mac-os-105-scriptable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Kai font for MacTeX on OS X</title>
		<link>http://blog.anthonywong.net/2008/01/24/using-kai-font-for-mactex-on-os-x/</link>
		<comments>http://blog.anthonywong.net/2008/01/24/using-kai-font-for-mactex-on-os-x/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 19:02:41 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MacTeX]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/2008/01/24/using-kai-font-for-mactex-on-os-x/</guid>
		<description><![CDATA[Typesetting LaTeX with CJK on Mac OS X is provided out-of-box by MacTeX, so working with LaTeX should be a breeze on Mac OS X. However, MacTeX ships with only two Chinese fonts, Arphic Ming Big5 (bsmi) and Arphic Sung GB2312 (gbsn). As I want to use Kai I have to look around for solutions.]]></description>
			<content:encoded><![CDATA[<p>Typesetting <a href="http://www.latex-project.org">LaTeX</a> with CJK on Mac OS X is provided out-of-box by <a href="http://www.tug.org/mactex/">MacTeX</a>, so working with LaTeX should be a breeze on Mac OS X. However, MacTeX ships with only two Chinese fonts, Arphic Ming Big5 (bsmi) and Arphic Sung GB2312 (gbsn). As I want to use Kai I have to look around for solutions.</p>
<p>I found this <a href="http://g5dual.eed.yzu.edu.tw/~lab/latex/install_cjk.html">great website</a> that explains how to use LaTeX and the CJK package on OS X. The good news is that the author of the page provides a shell script for installing any Unicode truetype fonts for TexLive so that you can use the truetype fonts in your LaTeX documents. The bad news is&#8230; it doesn&#8217;t work on my system. I tried it on both Arphic Big5 and GB2312 Kai fonts, and when I ran  my LaTeX document through the <code>latex</code> command (or in TeXShop, for that matters), I came to this error:</p>
<pre style="border: 1px solid #DDD; padding: 2px">
! Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `utf8'.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.194 ^^[
         ndinput
</pre>
<p>Trying the shell script on the STKaiti font (/Library/Fonts/华文楷体.ttf) shipped with OS X, is even worse, because ttf2tfm gives a "Bus error" (or segfault on Linux) when parsing the truetype font, looks like a bug in ttf2tfm:</p>
<pre style="border: 1px solid #DDD; padding: 2px">
$ ttf2tfm stkaiti.ttf -P 0 -E 3 -w "stkaitiu@Unicode@"
This is ttf2tfm version 1.5

stkaitiu00:

Glyph  Code   Glyph Name                Width  llx    lly      urx    ury
------------------------------------------------------------------------
Bus error
</pre>
<p>At the end, I resort to extracting the necessary files from Debian packages (hurray Debian) and put them into ~/Library/texmf, and that works!</p>
<p>The Debian packages I use are <a href="http://packages.debian.org/lenny/latex-cjk-chinese-arphic-bkai00mp">latex-cjk-chinese-arphic-bkai00mp</a> and <a href="http://packages.debian.org/lenny/latex-cjk-chinese-arphic-gkai00mp">latex-cjk-chinese-arphic-gkai00mp</a>. Since Debian packages are just <code>ar</code> archives, they can be extracted by the <code>ar x <deb></code> command. After the deb package has been extracted, extract the data.tar.gz file, and then look for the folders called <code>fonts</code> and <code>tex</code>, move them to <code>~/Library/texmf</code>, which you have to create. Now you should have a directory structure like this:</p>
<p><a href="http://blog.anthonywong.net/wp-content/uploads/2008/01/mactex-font-installation.png" rel="lightbox[pics154]" title="MacTex font installation"><img src="http://blog.anthonywong.net/wp-content/uploads/2008/01/mactex-font-installation.png" width="550" height="310" alt="MacTex font installation" class="imageframe imgaligncenter"  style="border: solid 1px #CCC; padding: 4px"/></a></p>
<p>After the font files have been put in place, run these two commands (for the Big5 Kai truetype font):</p>
<pre>
$ sudo texhash
$ sudo updmap --enable Map bkaiu.map
</pre>
<p>For the GB2312 one, use:</p>
<pre>
$ sudo texhash
$ sudo updmap --enable Map gkaiu.map
</pre>
<p>It's that easy!</p>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=154&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2008/01/24/using-kai-font-for-mactex-on-os-x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ajax Japanese handwriting recognition</title>
		<link>http://blog.anthonywong.net/2007/07/13/ajax-japanese-handwriting-recognition/</link>
		<comments>http://blog.anthonywong.net/2007/07/13/ajax-japanese-handwriting-recognition/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 04:54:37 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[handwriting recognition]]></category>
		<category><![CDATA[Japanese]]></category>
		<category><![CDATA[lamerpad]]></category>
		<category><![CDATA[SVM]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/2007/07/13/ajax-japanese-handwriting-recognition/</guid>
		<description><![CDATA[Stumbled upon a toy which performs Japanese handwriting recognition online by using ajax as the frontend. As I said it&#8217;s just a toy so the correctness is so so, but nonetheless a very good proof-of-concept. This toy uses Support Vector Machine as the underlying algorithm so the program is able to learn from the user&#8217;s]]></description>
			<content:encoded><![CDATA[<p>Stumbled upon a <a href="http://chasen.org/~taku/software/ajax/hwr/">toy</a> which performs Japanese handwriting recognition online by using ajax as the frontend. As I said it&#8217;s just a toy so the correctness is so so, but nonetheless a very good proof-of-concept. This toy uses <a href="http://en.wikipedia.org/wiki/Support_vector_machine">Support Vector Machine</a> as the underlying algorithm so the program is able to learn from the user&#8217;s handwriting. Ever since I made <a href="http://www.debian.org.hk/~ypwong/lamerpad.html">lamerpad</a> I realize that pattern recognition should be a better means to handle handwriting recognition than analyzing stroke patterns, such as stroke order, numbers and positions, which lamerpad employs, as stroke structures vary from person to person. But by using machine learning algorithms like SVM or artificial neural networks, a hybrid system could be made, such system not only can learn from how the character looks, but also how the character is written by the user. By now Chinese handwriting recognition technology is already quite mature, but just no such open source programs, <a href="http://www.scim-im.org">SCIM</a> handwriting module, anyone?</p>
<ul>
<li><a href="http://www.teresi.us/html/writing/handwriting.html">http://www.teresi.us/html/writing/handwriting.html</a>: &#8220;Handwriting Recognition, Using a Neural Network Character Classifier&#8221;, have a description of Newton Messagepad&#8217;s handwriting recognition engine</li>
<li><a href="http://www.byte.com/art/9609/sec17/art7.htm">http://www.byte.com/art/9609/sec17/art7.htm</a>: overview of companies that work on Chinese handwriting recognition</li>
</ul>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=151&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2007/07/13/ajax-japanese-handwriting-recognition/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Google Calendar SMS Alert Comes to China</title>
		<link>http://blog.anthonywong.net/2007/06/15/google-calendar-sms-alert-comes-to-china/</link>
		<comments>http://blog.anthonywong.net/2007/06/15/google-calendar-sms-alert-comes-to-china/#comments</comments>
		<pubDate>Fri, 15 Jun 2007 15:25:14 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[China]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google calendar]]></category>
		<category><![CDATA[SMS]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/2007/06/15/google-calendar-sms-alert-comes-to-china/</guid>
		<description><![CDATA[Now Google Calendar users in China can finally enjoy the same SMS alert service as in other countries. Although they mentions China Unicom as the only mobile provider to be supported, I have no problem in registering the service and receiving alerts even I&#8217;m a China Mobile subscriber. This alert service is very handy to]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img src="http://blog.anthonywong.net/wp-content/uploads/2007/06/google-calendar-sms.png" width="530" height="147" alt="google-calendar-sms.png" class="imageframe imgaligncenter" /></p>
<p>Now Google Calendar users in China can finally enjoy the same SMS alert service as in other countries. Although they  <a href="http://www.google.com/support/calendar/bin/answer.py?answer=37226&#038;hl=en#C">mentions</a> China Unicom as the only mobile provider to be supported, I have no problem in registering the service and receiving alerts even I&#8217;m a China Mobile subscriber. This alert service is very handy to everyone, as Google Calendar will send you SMS to your mobile phone whenever an event is going to begin.</p>
<p>An interesting tidbit is, they sent the verification code to my mobile phone via HUTCHISON_HK, where HUTCHISON is one of the mobile service providers in Hong Kong. It seems that Google choose neither China Mobile nor China Unicom, the two major mobile providers in China, as their partners.</p>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=149&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2007/06/15/google-calendar-sms-alert-comes-to-china/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Combining Google Maps and Google Ditu</title>
		<link>http://blog.anthonywong.net/2007/06/05/combining-google-maps-with-google-ditu/</link>
		<comments>http://blog.anthonywong.net/2007/06/05/combining-google-maps-with-google-ditu/#comments</comments>
		<pubDate>Tue, 05 Jun 2007 09:12:48 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[China]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Ditu]]></category>
		<category><![CDATA[Google Maps]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/2007/06/05/combining-google-maps-with-google-ditu/</guid>
		<description><![CDATA[Ditu (地圖, 地图) means map in Chinese. China has long been missing from the global Google Maps. Zooming into the China border, only patches of grey blocks are shown, occasionally with blue lines here and there indicating rivers and lakes, and worst of all, maps are just unavailable after you have drilled down deep enough.]]></description>
			<content:encoded><![CDATA[<p>Ditu (地圖, 地图) means map in Chinese. <a href="http://cryptome.cn/tk/tiananmen-kill.htm">Chi</a><a href="http://www.gwu.edu/~nsarchiv/NSAEBB/NSAEBB16/documents/index.html">na</a> has long been missing from the global <a href="http://maps.google.com">Google Maps</a>. Zooming into the China border, only patches of grey blocks are shown, occasionally with blue lines here and there indicating rivers and lakes, and worst of all, maps are just unavailable after you have drilled down deep enough.</p>
<p>Usually this doesn&#8217;t pose any problems as Google China serves China maps (and only China maps) at <a href="http://ditu.google.com">Google 地图</a>, which provides all the functionalities of the global Google Maps website, <i>sans satellite images</i>. This is annoying nevertheless, it&#8217;d be the best if users can see maps of China seamlessly when they&#8217;re viewing maps.google.com, without jumping out from maps.google.com and then type in another URL just to view some data that&#8217;s still backwardly regarded by the Chinese authority as confidential and sensitive.</p>
<p>&#8220;Hybrid&#8221; mode for China maps is another feature that would be handy to Chinese users. Satellites images are already available but just not being shown on ditu.google.com. Since hybrid mode requires a special layer of map tiles, specially they have a transparent background so that the satellite images can show through underneath the maps, without post-processing map data provided by Mapabc this is not achievable. By Google&#8217;s terms of usage of the map data, processing the maps and then re-distribute is not legal. We can only use some freely redistributable map data such as from <a href="http://www.openstreetmap.org/">www.openstreetmap.org</a>.</p>
<p>Hooking up maps.google.com with maps from Google China is not difficult, actually that&#8217;s much easier than I thought because Google Maps API already have the mechanism to <a href="http://www.google.com/apis/maps/documentation/reference.html#GMapType">add a new map type</a> for <a href="http://www.google.com/apis/maps/documentation/reference.html#GTileLayer">showing custom map data</a>. My proof-of-concept is shown below, press the &#8220;Ditu&#8221; button at the top right hand corner and you&#8217;ll see maps delivered from ditu.google.com.<br />
<center><br />
<iframe width="620px" height="420px" src="http://blog.anthonywong.net/china-ditu-overlays-googlemaps.php"></iframe><br />
</center></p>
<p>Ideally, this &#8220;mashup&#8221; should best be implemented using the new <a href="http://maps.google.com/maps/mm?mapprev=1">Google Mapplets</a>, this will give users the best user experience as they only need to add a mapplet and then Google China maps will be  embedded to the map window automatically, users are not required to go to this page. But since Google Mapplets doesn&#8217;t support adding new map types due to security concerns, this currently is not an option. Frankly, I don&#8217;t see there&#8217;s any security concerns by supporting new map types.</p>
<p>Don&#8217;t be surprised if you notice that the satellite images do not align with the Google China maps, because Google China intentionally shifted the latter to please the Chinese authority. Did it say that the maps are regarded as national security?</p>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=147&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2007/06/05/combining-google-maps-with-google-ditu/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Debian GNU/Linux 4.0 Release Talk</title>
		<link>http://blog.anthonywong.net/2007/05/09/debian-gnulinux-40-release-presentation/</link>
		<comments>http://blog.anthonywong.net/2007/05/09/debian-gnulinux-40-release-presentation/#comments</comments>
		<pubDate>Wed, 09 May 2007 07:49:33 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[Beijing]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[BLUG]]></category>
		<category><![CDATA[Etch]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[talk]]></category>

		<guid isPermaLink="false">http://blog.anthonywong.net/2007/05/09/debian-gnulinux-40-release-presentation/</guid>
		<description><![CDATA[Last night I gave a short presentation at Beijing Linux User Group (BLUG) on the Debian project and the new Etch release. As Roy Chan had given a talk about the new release in the Hong Kong Debian Etch release party, I asked for his permission to use his slides for this talk, and he]]></description>
			<content:encoded><![CDATA[<p>Last night I gave a short presentation at <a href="http://www.beijinglug.org">Beijing Linux User Group</a> (BLUG) on the Debian project and the new Etch release. As <a href="http://blog.xychen.org">Roy Chan</a> had given a talk about the new release in the Hong Kong Debian Etch release party, I asked for his permission to use his slides for this talk, and he happily agreed. I made some modifications to his slides and cut out the part about Linux introduction, you can find the presentation slides in OpenOffice.org 2 format <a href="http://ypwong.org/Debian4.odp">here</a>, PDF version <a href="http://ypwong.org/Debian4.pdf">here</a>. In the meeting <a href="http://www.madphilosopher.ca">Darren</a> mentioned the idea of using peer-to-peer technology in apt, so that users don&#8217;t need to set any repositories in the configuration, this is a very good idea, and coincidentally there is a Google Summer of Code <a href="http://wiki.debian.org/DebTorrent">project</a> on this topic.</p>
<img src="http://blog.anthonywong.net/?ak_action=api_record_view&id=138&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.anthonywong.net/2007/05/09/debian-gnulinux-40-release-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

