The government of Hong Kong provides binary Hong Kong Supplementary Character Set (HKSCS) software packages for a few popular Linux distributions. These provide both input method (IME) and font software. However, they are only useful if you happen to have one of the supported distributions and versions.
This document provides instructions for extracting the Ming Unicode HKSCS font from any one of these distribution-specific packages so that you can use it on your computer, regardless of distribution or operating system.
1. Download one of the binary Hong Kong Supplemental Character Set (HKSCS) software packages provided by the Hong Kong government web site, such as the Mandrake setup.bin package. 2. "setup.bin" is actually a shell script with a tar file attached to it. So, using an editor, remove all lines of the shell script until you get to the beginning of the tar file. In the file I downloaded, this was everything before line 237: line 233 -> runinstaller $distro ^ line 234 -> cleanup | line 235 -> | REMOVE ALL LINES PRECEDING TAR GZIP line 236 -> exit 0 v ----------------------------------------- line 237 -> ^_<8b>^H^Hs/B?^@^Cpackage.tar^@ì2004.08.09.ETtar xzvf package.tar.gz Since we downloaded the Mandrake distribution, this will result in a "package_mdk" directory. If you downloaded the package for a different distribution, the name will vary accordingly. In any case, an RPM file starting with "imfont" should be present in the untarred directory: -rw-r--r-- 1 edtrager users 10227133 Aug 19 2003 imfont-1.0-0.i386.rpm 4. An "rpm" query command can be used to show what files the "imfont" RPM contains: > rpm -qlp imfont-1.0-0.i386.rpm /usr/share/inputmethod/bin/fontcleanup.sh /usr/share/inputmethod/bin/fontsetup.sh /usr/share/inputmethod/ming_uni.ttf 5. We want to extract only the "ming_uni.ttf" file. We do not want to run the "fontsetup.sh" or "fontcleanup.sh" scripts, especially if we are using a different OS or different distribution. This can be done by using the "--noscripts" option along with the "-i" install option shown below. Recall that to install an RPM requires administrative privileges. Below we use the Linux "su" command with the "-c" option to run the RPM command (Alternatively, you could use "sudo"): > su -c "rpm --noscripts -ivh imfont-1.0-0.i386.rpm" Root Password: ********* imfont ################################################## 6. "ming_uni.ttf" will now be installed the "/usr/share/inputmethod/" directory on your computer. You can now examine the font (for example, using FontForge) or install it as appropriate for your operating system. <-- RETURN TO MAIN PAGE