OLPC in Chinese

Basic Requirement

Package Repository

Chinese Font

The current Chinese font RPM is based on CJKUnifonts Project's uming, ukai and Taipei PCF fonts. Since Taipei font contains only Big5 glyphs with 16x16 and 24x24 pixel dot-matrix font, we decided to drop it and re-pack uming and ukai into separated packages. In this way, people can only install necessary ones to save space. Ideally, Heiti (黑體字) would be best for viewing on OLPC's LCD. We planed to use it when uhei released in the future. We've already packaged rpm package, now pending to commit into OLPC repos.

http://hep1.phys.ntu.edu.tw/~john/olpc/fonts-cjk-uming-1.olpc1-1.noarch.rpm http://hep1.phys.ntu.edu.tw/~john/olpc/fonts-cjk-uming-1.olpc1-1.src.rpm

http://hep1.phys.ntu.edu.tw/~john/olpc/fonts-cjk-ukai-1.olpc1-1.noarch.rpm http://hep1.phys.ntu.edu.tw/~john/olpc/fonts-cjk-ukai-1.olpc1-1.src.rpm

For the special design of XO's LCD screen, it seems not so necessary to use embedded bitmap fonts. Single line strokes do not look good in color mode. Besides, the smallest font in "Write" app. (font size #8) is already of 20x20 pixel. There is also no much difference on performance when displaying with antialias on or off. However, there is a performance issue when displaying large size CJK contents. (Browser app.) You can easily notice the sluggish by pressing page up/down. According to someone (update here?), the caching for PANGO/Cairo is only of 256 characters. It's obviously not enough for CJK fonts. (would disable PANGO help?) The official Firefox 2.0.0.5 from Mozilla official package is of no this problem.

As the true-type fonts are managed under fontconfig architecture, one can also directly put the ttf/ttc file under /usr/share/fonts as root.

To turn off antialias, one can put the followings into ~olpc/.fonts.conf.

<?xml version="1.0"?>
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>

  <match target="font">
    <test name="family" compare="contains">

      <string>Sun</string>
      <string>Sazanami</string>
      <string>AR PL</string>
      <string>IPAMona</string>

      <string>Min</string>
      <string>Hei</string>
      <string>宋</string>
      <string>明</string>

      <string>黑</string>
    </test>

    <test name="pixelsize" compare="less_eq"><int>24</int></test>
    <edit name="embeddedbitmap" mode="assign"><bool>true</bool></edit>

    <edit name="antialias" mode="assign"><bool>false</bool></edit>
    <edit name="hinting" mode="assign"><bool>true</bool></edit>
  </match>


</fontconfig>

SCIM Input Method installation

OLPC currently uses "en_US.UTF-8" locale. We can use _SCIM_ input method without modification. SCIM can be installed with "yum" from fedora extra.

Install SCIM

yum install scim scim-gtk

Notes: It seems that the configuration for IM on OLPC is different from ordinary Fedora releases for the unstable version. A work around is needed to add scim's setting in ~olpc/.xinitrc to startup it. (No need for stable version! tested on 406.15)

export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
scim -d

Also, to have better performance, one can add the following before 'exec sugar' to disable PANGO:

export MOZ_DISABLE_PANGO=1

And than install whatever languages you need. Here are some examples:

Install Chinese input module/tables

yum install scim-chewing scim-tables-chinese

Install Japanese input module

yum install scim-anthy

Install Korean input module

yum install scim-hangul

Install Thai input tables

yum install scim-tables-thai

Install Vietnamese input tables

yum install scim-tables-vietnamese

ps. Somehow the package dependency is too much for SCIM. A re-pack would be needed to save space by removing those un-necessary dependencies and avoiding dirty hacks.

Screen Shots

Chinese input with SCIM in Web.activity

Japanese input with SCIM in Web.activity

Note on the font rendering defect?

GCIN Input Method installation

Alternatively, we can use _GCIN_ Chinese input method without modification. For unstable version of OLPC ROM, one will need to put similar definitions in ~olpc/.xinitrc . GCIN can be installed either with "yum" from fedora extra or manually from RPM packages of FC6/7. Reference for the later method can be found here: http://cle.linux.org.tw/trac/wiki/GcinScreenOLPC

Note: though GCIN is much lighter, the dependency is also too much. You'll need to install qt, libcms and some others unnecessary ones.

Screen Shots

Chinese input in "write" app.

Chinese input for "browser" app.

Due to the _suger_ UI, "gcin-setup" looks ugly. At least the words DB option doesn't crash for the latest version.

Photos

A close-up photo taken with a "real" OLPC. (BTest-4 XO)

Font display in reflective mono mode.

Same content in backlight color mode. (note the left-down stroke!)

Reference

OLPCinChinese (last edited 2007-08-02 05:29:15 by ychao)

Any questions? Just drop me a E-mail: