Announcement

Collapse
No announcement yet.

HOWTO: Installing Japanese that looks nice on Kubuntu Edgy : 日本語

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HOWTO: Installing Japanese that looks nice on Kubuntu Edgy : 日本語

    HOWTO: Installing Japanese that looks nice on Kubuntu Edgy : 日本語

    OK, so it drove me absolutely crazy and I very nearly switched back to Fedora which would have been a great shame. All I wanted to do was install Japanese input that looked OK in an English install of Ubuntu. There were many different guides out there and most of which were incomplete or based on previous versions. So I have put what worked for me together in this thread. It might not work for you and I don't claim to have come up with it myself, but maybe some people might find it helpful. I hope the next version of Kubuntu has this out of the box (as Fedora does).

    This was originally an Ubuntu guide, but I've adjusted it for Kubuntu (6.10). I found that if you try using the same techniques as in Ubuntu, you get problems like not being able to input into Open Office. For this reason you must follow slightly different steps.

    There are two issues here:
    1.Installing the SCIM/SKIM input system that will work in a locale other than converting your whole install to Japanese, i.e. you want Japanese input in an English login.
    2.The fonts look initially terrible. Therefore a certain amount of customisation is required to make all the Kanji's render in the same style and Hiragana & Katakana to render in a non-handwriting style.

    1.
    First lets make sure you have the correct repositories installed in order to automatically download the relevant packs. Open the repositories list file:

    Code:
    kdesu kwrite /etc/apt/sources.list
    Add the following line at the bottom:

    Code:
    deb [url]http://archive.ubuntulinux.jp/ubuntu-ja[/url] edgy/
    Now update your repos with:

    Code:
    sudo apt-get update
    Go to K Menu / System / Language Support and select Japanese. This should install the basics.

    Now, right hand click on your taskbar, select 'Add Applet to Panel' and add 'Skim Panel Applet'.

    You should now have a skim icon in your taskbar. If not, activate skim using K Menu / Utilities / Skim Input Method Platform.

    Right hand clicking on the icon (or otherwise) open the 'Configure Skim' window. Under 'General SCIM' / Other, make sure that panel program is set to scim-panel-kde. Config module should be kconfig. In advanced make sure that your Unicode Locale is selected and add it if not. The US one should be provided as default, but in my case I changed it to 'en_GB.UTF-8' for UK. You can find out what locale you are using:

    Code:
    locale | grep LANG=
    Now, you want to set up the system so that SCIM is the default input method for your locale:

    Code:
    sudo im-switch -z en_GB -s scim
    Note that you will need to change the locale to your relevant one (the en_GB) bit. Also note that this command must be run as sudo. I tried without and my system would no longer boot until I deleted the file in ~/.xinput.d.

    2.
    Now might be a good time to reboot the system. Hopefully, Japanese input should now be available. That might be enough for you, but for me, I really couldn't cope with the horrible fonts that defaulted especially as they were nice and pretty in Fedora. Especially, the fact that Kanjis were often rendered in different fonts annoyed me. Here's the next step.

    Now that you have the Japanese repositories set up (see above), you'll want to get a nice set of fonts. Please make sure that you also have the universe and multiverse components enabled in your repos. (This can be done easily by making sure that 'universe multiverse' is present in the component section of Adept Manager's manage repositories window).

    Code:
    sudo apt-get install msttcorefonts ttf-dejavu ipafont ipamonafont ttf-arphic-ukai ttf-arphic-uming
    This will install the Microsoft (Freeware) core fonts and a number of other useful fonts, specifically ones that support Japanese unicode characters.

    Unfortunately, I am very disappointed in the Kubuntu distribution of Japanese fonts. You will almost certainly want this to be changed to MSGothic and MSMincho. These are Microsoft fonts, but they are freeware and are actually from a company called Ricoh so you can sleep at night knowing you're not using Microsoft if you want. They need to be downloaded and installed manually. They can be found at the following 2 sites.

    http://www.themeworld.com/cgi-bin/pr...msgothic.0.zip
    http://www.themeworld.com/cgi-bin/pr...msmincho.0.zip

    or

    http://www.wafu.ne.jp/3dlogo/fonts/msgothic.ttf
    http://www.wafu.ne.jp/3dlogo/fonts/msmincho.ttf

    So download the file and you need to copy them into the fonts directory. This will need root privileges and is probably easiest done using the file explorer:

    Code:
    kdesu konqueror /
    That will give you a browser with the right privileges. So copy your downloaded ttf files and paste them into a folder under the fonts tree. I recommend:

    Code:
    /usr/share/fonts/truetype/msttcorefonts
    Now we need to rebuild the fonts cache:

    Code:
    sudo fc-cache -f -v
    OK, so that might well be enough, but I think you'll probably still have your Japanese fonts not running at optimum and the default might be a little ugly. Lets set up the order in which we like the fonts to be selected. Open the “.fonts.conf” file in your home directory:

    kdesu kwrite .fonts.conf
    Mine reads as follows:

    Code:
    <?xml version="1.0"?>
    <fontconfig>
     <alias>
     <family>serif</family>
     <prefer>
     <family>Times New Roman</family>
     <family>MS 明朝</family>
     <family>IPAPMincho</family>
     <family>Sazanami Mincho</family>
     <family>Kochi Mincho</family>
     <family>DejaVu Serif</family>
     <family>Bitstream Vera Serif</family>
     <family>Thorndale AMT</family>
     <family>Luxi Serif</family>
     <family>Nimbus Roman No9 L</family>
     <family>Times</family>
     <family>Frank Ruehl</family>
     <family>MgOpen Canonica</family>
     <family>AR PL SungtiL GB</family>
     <family>AR PL Mingti2L Big5</family>
     <family>FreeSerif</family>
     <family>Baekmuk Batang</family>
     </prefer>
     </alias>
     <alias>
     <family>sans-serif</family>
     <prefer>
     <family>Verdana</family>
     <family>MS ゴシック</family>
     <family>IPAPGothic</family>
     <family>Sazanami Gothic</family>
     <family>Kochi Gothic</family>
     <family>DejaVu Sans</family>
     <family>Bitstream Vera Sans</family>
     <family>Arial</family>
     <family>Albany AMT</family>
     <family>Luxi Sans</family>
     <family>Nimbus Sans L</family>
     <family>Helvetica</family>
     <family>Nachlieli</family>
     <family>MgOpen Moderna</family>
     <family>AR PL KaitiM GB</family>
     <family>AR PL KaitiM Big5</family>
     <family>FreeSans</family>
     <family>Baekmuk Dotum</family>
     <family>SimSun</family>
     </prefer>
     </alias>
     <alias>
     <family>monospace</family>
     <prefer>
     <family>Courier New</family>
     <family>MS ゴシック</family>
     <family>IPAGothic</family>
     <family>Sazanami Gothic</family>
     <family>Kochi Gothic</family>
     <family>DejaVu Sans Mono</family>
     <family>Bitstream Vera Sans Mono</family>
     <family>Andale Mono</family>
     <family>Cumberland AMT</family>
     <family>Luxi Mono</family>
     <family>Nimbus Mono L</family>
     <family>Courier</family>
     <family>Miriam Mono</family>
     <family>FreeMono</family>
     <family>AR PL KaitiM GB</family>
     <family>Baekmuk Dotum</family>
     </prefer>
     </alias>
     <match target="font" >
     <edit mode="assign" name="embeddedbitmap" >
     <bool>false</bool>
     </edit>
     </match>
     <match target="font" >
     <edit mode="assign" name="autohint" >
     <bool>true</bool>
     </edit>
     </match>
    So, save the file and reboot. Now with any luck the order of fonts should have been updated so that the default Japanese type face is actually a clean one first and foremost instead of the ugly first serving. Also it disables the built in bitmap font which can really make kanji's look odd next to anti aliased hiragana etc. For most people this setting will be fine. If you're not happy, by all means leave out the embeddedbitmap setting.

    If you're still having problems consider the following:
    Code:
    sudo dpkg-reconfigure fontconfig-config
    WARNING:
    Do not install these packs:
    ttf-sazanami-gothic ttf-sazanami-mincho

    I have found them to be unstable and cause my system not to boot.

    Also please see the following links:

    Original Ubuntu thread:
    http://ubuntuforums.org/showthread.php?t=338991

    Japanese in Java (Kubuntu)
    http://kubuntuforums.net/forums/index.php?topic=13461.0

    Adding Japanese fonts to the Xwindows list to be available in a wider range of apps
    http://ubuntuforums.org/showthread.php?t=340544

    #2
    Re: HOWTO: Installing Japanese that looks nice on Kubuntu Edgy : 日本語

    Have just updated the section on font packs. Finally managed to trace a serious error to the ttf-sazanami-gothic ttf-sazanami-mincho packs. Don't install them they'll cause problems with your booting into KDE.

    Comment


      #3
      Re: HOWTO: Installing Japanese that looks nice on Kubuntu Edgy : 日本語

      followed ur guy but now sKim doesnt want to load, i followed all the instructions and added the applet in the taskbar.. any help on making it work will be appreciated..

      Comment


        #4
        Re: HOWTO: Installing Japanese that looks nice on Kubuntu Edgy : 日本語

        Did you set the panel program to: scim-panel-kde and config module to kconfig before you ran im-switch or after?
        You should do it first. Try running "kdesu skim" and checking your settings for root. Also check the global file in the .scim directory of your /home path and also you /root path.

        Comment


          #5
          Re: HOWTO: Installing Japanese that looks nice on Kubuntu Edgy : 日本語

          i reinstalled my system and got the japanese input to work but following step by step ur guide thanks, only thing is i cant input into open office...

          when i runned the "sudo im-switch -z en_GB -s scim" command i got the following message :

          No system wide default defined just for locale en_US .
          Use "all_ALL" quasi-locale and set IM.

          dont know if that may be related to the reason input doesnt work in open office, any help will be appreciated on getting it to work on it..

          thanks and nice guide.

          どもありがとうございます。

          Comment

          Working...
          X