Monday, November 12, 2007

No More Hard-to-Read Chinese Text!

NEWS: Currently the font is included in the Ubuntu Hardy Heron repository! Install the "ttf-wqy-zenhei" package

Recently I have been continually fine-tuning my Ubuntu to give me the best (i.e. most comfortable) environment for me to work with. One of the major quirks is the hard to read Chinese fonts, which is due to the fact that it's pretty hard to hint SongTi (宋体) fonts.

Somehow it's pretty surprising that Ubuntu's repositories doesn't come with HeiTi (黑体) or Chinese Gothic fonts, which has thicker strokes. But luckily there's this open source, GPL'ed font foundary, Wen Quan Yi, which does provide their HeiTi variant called "Zen Hei". Basically what I do is grab the package, install the Debian package (execute `dpkg --install wqy-zenhei-0.2.15-1.deb`), adding the configuration to match the font in my /etc/fonts/local.conf file (see my previous article for details) and lastly execute `sudo fc-cache -fv`.

Once I done that and restart my applications, now I had 100% reliable and perfectly readable Chinese pages! :D

Friday, November 09, 2007

From Gentoo to Ubuntu

By some circumstances, I found myself migrated to Ubuntu Linux from Gentoo. It's not a intentional flavour change, to be honest: but rather just happened that I royally screwed my partition table as I shuffle them around. An attempt to raking in dormant partitions (mainly my old Linux installations) and salvaging them for better use ended up having myself wiped out the LVM partition that my Gentoo lives in. Whoops! No doubt that fdisk may as well be your best friend or your best enemy.

Luckily I have my home partition and personal data separated out and I didn't have any production MySQL databases (phew...), so I'm still safe :). (that coming from someone who have screwed up Linux several times, my best advice is better to keep all your important out from your OS partition :p)

So, mainly due to my own laziness of not wanting to spent a whole day just to set a razor-edged Gentoo (i.e. which is very time consuming but you do get to craft every single nook-and-cranny of the system: customized the way you wanted it to), I opt for Ubuntu instead.

But that said, installing Ubuntu using their Desktop Installation CD is only a breeze if you didn't find the need to use LVM. But in the end, it's not as hard as it seemed as Chantra from did posted up a tutorial on how to do so, which basically needs you to:

  • Execute `sudo apt-get install lvm2`
  • Setup your LVM partitions; or if you have an existing LVM setup, just activate the volume group by executing `vgchange -ay VolGroup` (where VolGroup is the name of your volume group)
  • Once make sure that the logical volumes have entries in /dev/VolGroup/... (again, VolGroup is the name of your volume group), kick up the installation GUI. Remember to use the "Manual" option when you reached the partitioning section
  • Once installed, DON'T REBOOT FIRST! Mount all your logical volumes and the /boot partition into /target. Chroot into /target, perform an `apt-get update` there then install LVM2 (Otherwise you won't be able to boot into your computer)

So now I'm running Ubuntu and got it setup in a breeze and I'm pretty impressed on how polished the Ubuntu team have made it to be. Coming from a Gentoo background, I'm really impressed because if you happen to build everything yourself, you'd end up noticing a lot of small quirks which give some rough bumps in interacting with the user interface (especially Compiz, during my days in Gentoo I never seemed to get it "right").

And never needing to leave my PC overnight to let emerge do it's thing (i.e. compiling updates) is a definite plus :).