思源/Noto pan-CJK 字體 & Ubuntu

以開源協議授權釋出的字體大多數以拉丁字母等歐洲語言爲主,但最近 Adobe 和 Google 共同推出的思源/Noto pan-CJK 開源字體不只涵蓋了大部份中日韓所需要的字型,而且繁中、簡中、日文和韓文都用了不同的 OTF 檔案,因此對同一個漢字在不同地區的不同寫法就能個別處理,算是解決了 Unicode 一直爲人詬病的 Han unification 問題。

香港人最關心的應該是該字體是否覆蓋 HKSCS,我檢查過部份 hkscs-2008-big5-iso.txt 的 unicode 碼,在 NotoSansHant 裏都能找到,而且目測在 CJK BCD 區裏都有覆蓋,所以應該夠用(在下面的圖找找吧)。

用 Fontforge 查看 NotoSansHant-Regular.otf
用 Fontforge 查看 NotoSansHant-Regular.otf

從下面幾張 screenshot 可以看到香港字顯示效果理想:


想將 Ubuntu 的桌面 UI 和程式的預設字體改成思源/Noto,可以參考 Ingram Chen 的 blog。小弟改良了一下 Ingram 的 fontconfig 設定檔,使系統在不同 locale 下能優先選擇適當的字體,比如 zh_TW 下繁體的 Noto Sans T Chinese 是第一選擇,在 zh_CN 下則爲簡體的 Noto Sans S Chinese,之後其他的 CJK 字體作爲 fallback。

設定檔已放在 20-noto-cjk.conf,下載後執行:

mkdir ~/.config/fontconfig/conf.d
mv 20-noto-cjk.conf ~/.config/fontconfig/conf.d

另外如果要配置英文字體,可以下載 10-latin.conf,修改一下檔案中的字體部份,同樣放進 ~/.config/fontconfig/conf.d 即可。

Nexus One 手機螢幕自己換小筆記

好幾個月前在過馬路的時候不小心把 Nexus One 掉到地上,螢幕立即多了一道裂痕。雖然手機已處於半退役狀態,而且螢幕裂得不嚴重,但看着不爽,索性上淘寶買個螢幕把壞的換掉,也當是練練拆機,況且換不好也無所謂。

Nexus one broken screen

其實拆 Nexus One 不是第一次,由於 Nexus One 的開關鍵有質量問題,很多人用了一段時間後不能開關機,自己也遇到一樣情況,所以當時修過一次。不過換開關鍵比換螢幕要簡單得多。開關鍵在手機頂部,只要拆開頂部的背蓋就可以。但螢幕處於手機的最前方,必須從頭到尾把所有部件拆走。

新舊螢幕並排
新舊螢幕並排
用熱風把螢幕從邊框拆下來後

說一下所需工具和心得:

  • 第一當然是螢幕,在這家淘寶店買,只需 38 RMB,運費 10 RMB 到北京,送貨速度挺快
  • 小十字螺絲批
  • 星型 T4 螺絲批: 之前買的 T4 螺絲批鋼水太差,用了幾次已經滑牙,但發現一字螺絲批也能擰開 T4 螺絲,所以這次先用一字螺絲批代勞。
  • 風筒/熱風槍: 螢幕是被黏着的,要靠熱風才能分解,不一定需要熱風槍,普通的風筒應該足以應付。
  • 萬能膠: 用來把新的螢幕黏回去。

解體

步驟不多說,網上很多教材,這裏就列舉一些我參考過的:

大功告成
大功告成

GPG key transition: 7BD22F74 → D28DA8DC

I should have transitioned my old GPG key to a stronger one for long time, it’s finally done today, with the help of here and here. You can find my signed letter at http://ubuntuone.com/6O2OCf1rg9ulw1eWi13zc2. I am also copying the letter below for your convenience.

Running QQ on Ubuntu Phone

Courtesy to an open source project called uqq on Github, it is now possible to not only run QQ on Linux, but also on Ubuntu Phone! As Ubuntu phone is still under heavy development, and the current SDK is limited for QML-only apps, it is not an easy task to deploy uqq onto the phone, as it uses C++ for its backend. If you are adventurous, you can follow my steps below.

Continue reading Running QQ on Ubuntu Phone

Google Chrome is the winner, Javascript speed-wise

Did some benchmark testing on the Javascript engines of several Mac OS X web browsers by using SunSpider and Google’s V8 benchmark suite. Although Google Chrome is still a development release on OS X, it’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 TraceMonkey 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.

Here are some charts that show the results:

sunspider javascript benchmark of firefox, safari, opera and chrome

OS X web browser Javascript speed comparison among firefox, safari, opera and google chrome

V8 benchmark total score of Firefox, Safari, Opera and Google Chrome

where Open Source technology and Middle Kingdom meet