Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

  1. #1
    Join Date
    Dec 2006
    Location
    All over the world!
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    HOWTO: Installing Japanese that looks nice on Ubuntu 7.04 (Feisty): 日本語

    Installing Japanese Input and Superior Font Setup in Ubuntu
    Introduction

    This is a guide to setting up Japanese for Ubuntu 7.04 Feisty. It is intended as a complete guide encompassing all elements required for using Japanese on any language installation of Ubuntu. It covers input (SCIM-Anthy) and configuring the Japanese fonts. There are other guides around for older versions of Ubuntu or that use the alternative UIM. They tend to cover elements only. This guide is intended to cover everything. Please note that Kubuntu requires slightly different steps. Please follow the relevant page accordingly. This is an updated version based on the original 6.10 one, but with some sections changed. Please note that if you follow this guide, your fonts will be reconfigured. This might mean losing some font settings you may have made.
    Issues Involved

    There are two main issues here:

    1.Installing the SCIM 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.
    Japanese Input with SCIM

    This section covers setting up the Japanese input system using SCIM Anthy. This involves, downloading, installing and configuring it so that you can use it in non-Japanese locales (e.g. your system is in English).

    Setting Up Repositories

    First lets make sure you have the correct repositories installed in order to automatically download the relevant packs. Make sure you have the Universe and Multiverse repositories switched on. This can be done in 'Synaptic Package Manager' under the repositories tab. Also, you need the Japanese repository too. Open the repositories list file:

    Code:
    gksudo gedit /etc/apt/sources.list
    Add the following line at the bottom:

    Code:
    deb http://archive.ubuntulinux.jp/ubuntu-ja feisty/
    Now update your repos with:

    Code:
    sudo apt-get update
    After adding the repository and running the update, you also need to add a keyring for the new location:

    Code:
    sudo apt-get install ubuntu-ja-keyring
    Adding Ubuntu Language Support

    Go to System / Administration / Language Support and select Japanese. This should install the basics.

    Making SCIM available under a non-Japanese login


    Now you want to make SCIM (Language input system) available in your English (or other lang) login and not just the Japanese one. First open the scim_startup file:
    Code:
    gksudo gedit /etc/X11/Xsession.d/74custom-scim_startup
    Add these lines:
    Code:
    export XMODIFIERS="@im=SCIM"
    export GTK_IM_MODULE="scim"
    export XIM_PROGRAM="scim -d"
    export QT_IM_MODULE="scim"
    Setting up the system to display Japanese characters properly

    OK, now you've got Japanese input installed (hopefully). It will probably require rebooting xwindows (CTRL+ALT+Backspace). But for me, I really couldn't cope with the horrible fonts that defaulted. 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.

    Downloading Repository Fonts


    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.

    Downloading External Fonts

    Unfortunately, I am very disappointed in the Ubuntu selection and you will almost certainly want this to be changed to MSGothic and MSMincho. These are Microsoft fonts, but they are freely available to use and are actually from a company called Ricoh. They need to be downloaded and installed manually. They can be found at the following page.

    http://www.linux.ryukent.co.uk/show.php?id=24

    So download and extract the files 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:
    sudo nautilus --browser
    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
    Rebuilding the font cache

    Now we need to rebuild the fonts cache:

    Code:
    sudo fc-cache -f -v

    Setting up the font order


    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:

    Code:
    gksudo gedit ~/.fonts.conf
    It should read 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>
    </fontconfig>
    So, save the file and reboot xwindows (CTLR+ALT+Backspace). 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:

    Java


    If you are having problems inputting Japanese into some application only (especially Java ones) you might need to update the SCIM settings for the root user too. This can be done by replacing the existing config file in /root/.scim with one from your home directory that you have already set up correctly. Of course you will need root privileges to do that.

    QT


    If you are having problems loading programs that use QT (like skype), try changing your QT_IM_MODULE environment variable to xim (see above).

    Code:
    export QT_IM_MODULE=xim

  2. #2
    Join Date
    Dec 2006
    Location
    Stockholm
    Beans
    317
    Distro
    Ubuntu 17.04 Zesty Zapus

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    Quote Originally Posted by ryukent View Post
    HOWTO: Installing Japanese that looks nice on Ubuntu 7.04 (Feisty): 日本語...

    If you are having problems loading programs that use QT (like skype), try changing your QT_IM_MODULE environment variable to xim (see above).

    Code:
    export QT_IM_MODULE=xim
    Hullo ryukent - long time no see ! The question I pose here may seem a little off topic, as it does not deal with fonts and I'm still using Edgy (I had some uiid problems and couldn't get the beta version of Feisty to work, so I'm waiting for the release on the 19th before upgrading), but since at the very end of your posting you do touch upon the matter which concerns me, I thought it might be OK to address it here. Ever since going over to Ubuntu last December, I've had problems with Skype - it is only recently that, thanks to another poster, I discovered that my problems had to do with the QT module. Following his advice, I found I was able to gain access to Skype, despite having SCIM - on which I am absolutely dependent - installed ; the solution I employ is to write the command
    Code:
    XMODIFIERS=@im=none QT_IM_MODULE=xim skype
    in a terminal, after which Skype starts without difficulty. BUT, there does remain one problem - I cannot use SCIM to type Chinese or Japanese text into a Skype chat message. Even if, for example, I have SCIM set to Anthy, I can't write the phrase «日本語» in the message ; what I get instead is the equivalent in Latin letters, i e, «nihongo». The same is true, mutatis mutandi, of Chinese phrases. My question : if I follow your advice and opening the scim_startup file with :
    Code:
    gksudo gedit /etc/X11/Xsession.d/74custom-scim_startup
    and then add these lines:
    Code:
    export XMODIFIERS="@im=SCIM"
    export GTK_IM_MODULE="scim"
    export XIM_PROGRAM="scim -d"
    export QT_IM_MODULE="scim"
    but change the last line to
    Code:
    export QT_IM_MODULE=xim
    instead, what are the chances of obtaining not only access to Skype, but also to SCIM (i e, CJK languages) in Skype ?...

    Thanks in advance,

    Henri

    PS : I presume that these techniques will work as well in Edgy as in Feisty - or should I wait until after I upgrade ?...

  3. #3
    Join Date
    Dec 2006
    Location
    All over the world!
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    Hmm.... I would imagine your chances are very slim. The fact is, there is a bug in Skype that doesn't like SCIM. This is for the Skype people to fix, but there haven't been any new releases of the linux version for some time and it's not open source. When you change the QT environment variable to XIM, it defaults to standard input for all QT widgets which Skype uses, so with the current offering, you'll only get western characters.

    I did once manage to get SCIM working properly through XIM (which it does in other flavours of Linux). Alas it will no longer. Because it works fine in GTK and QT applications which make up most of apps out there, I think people have simply forgotten about XIM support. Pure X apps (like xterm or Java) still don't have SCIM support in Ubuntu. I have spent hours trying to fix this, but have got nowhere.

    You could try using UIM. It does have much better XIM support.... however, I'm currently experiencing severe issues using it with QT applications of which Skype is one. There seems to be a clear solution and that is for the SCIM people to fix XIM support in Ubuntu and for the Skype people to fix Skype to work with SCIM. I'd love to help but am not part of either, so until then all I can say is good luck and please let me know if you find a solution!

  4. #4
    Join Date
    Dec 2006
    Location
    Stockholm
    Beans
    317
    Distro
    Ubuntu 17.04 Zesty Zapus

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    Ryukent, I've checked out your messages to the SCIM user forum, and while you don't mention Skype explicitly, I presume (please correct me if I am in error) the problem is subsumed under the more general question of SCIM in Java using Ubuntu that you there take up. We shall just have to see if there come any more responses ; for my part, I found it encouraging that James Su (苏哲) himself was the first to respond, even if his suggestion didn't resolve the problem....

    As you have covered the SCIM end of the problem, I have taken it upon myself to write to Skype ; here below a copy of my letter :
    The OS I presently use is Ubuntu Edgy (6.10), with Skype installed via Automatix 2. I have also installed the SCIM input system for, among others, CJK texts, which I use both for work and leisure. Installing SCIM, however, led to Skype becoming unavailable to me, a condition which lasted several months until I finally discovered that by typing in the command «XMODIFIERS=@im=none QT_IM_MODULE=xim skype» in my terminal, Skype could be accessed. A problem still remains, however ; from my keyboard I can only input text written in Latin letters into a Skype chat message ; I have found it impossible to write in texts in Chinese or Japanese. I know that this is not a problem for other OS, thus my daughter, who uses a MAC, has no difficulty writing in Japanese to me directly from her keyboard. I, however, am forced to use such subteruges as first writing a CJK text in a notepad and then pasting it into my chat message, which tends to destroy the spontaneity that constitutes the major part of chatting's charm. My query - does Skype have any intention of resolving this difficulty, so that even we Ubuntu users who employ SCIM can use the latter to write CJK texts into Skype chat messages ?...
    Let us see if somebody, inspired by this problem, comes up with a solution !...

    Henri

  5. #5
    Join Date
    Nov 2006
    Beans
    25
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    Any idea how I change it from SCIM to SKIM, the KDE intecface?

    EDIT:
    btw, with the new fonts I can't see the char meaning ^6 nor half of the chinese chars I use (used mainly for aesthetic purposes), while with the old ones I couldn't see a few of the japanese chars (used for both aesthetic and studying). Any idea how to fix?
    Last edited by kaminix; May 1st, 2007 at 11:32 AM.

  6. #6
    Join Date
    Mar 2007
    Location
    Hokkaido, Japan
    Beans
    69
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    Ok, here's one that's a stumper to me...

    I run Japanese Feisty and in certain Java apps, i.e. Google Talk, etc, I can use scim/anthy and not only switch back & forth from alphabet to Japanese, but view it as well. On the other hand, on certain Java heavy pages such as http://weathernews.jp/, a lot of the Java-ized text shows up as 文字化け, no mater what kind of encoding I have the page set to (i.e. according to the source page, it's Shift-JIS, but even w/ Shift-JIS encoding, no dice).

    Any idea how I can get pages like this to display correctly?

    Thanks & どうも!

    HH
    Dell XPS M1210, Japanese WinXP Pro/Ubuntu Edgy dual boot
    "The improbable we can handle...the impossible just takes a little more time" - My Dad

  7. #7
    Join Date
    Feb 2007
    Location
    Switzerland
    Beans
    61
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    I have xubuntu 7.04 with scim 1.4.4-7ubuntu1, and for me, the problem is _almost_ solved:

    i can use scim (with all the french and spanish accents, with greek ελληνικά and with korean 한글) if i do the following:

    1. either i open a terminal and type "GTK_IM_MODULE=xim" in order to set that environment variable to the proper value (following the advice on http://www.nabble.com/How-do-I-enabl....html#a7162103)
    or
    i add "GTK_IM_MODULE=xim" to ~/.bashrc and reboot.

    2. i open skype _from the terminal_. it does not work from the xfce applications menu, nor from a self-made shortcut button (even if i activate the "run in a terminal" option), nor if it is run at startup as part of the saved xfce session.

    so i always have to open skype manually, and then there is a blocked terminal window, making my desktop even messier

    any hint on how to solve this last little problem? thank you very much!

  8. #8
    Join Date
    Dec 2006
    Beans
    4

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    I run feisty amd 64 and I have no problem running SCIM on my 64 bit version of firefox, but swiftfox (the 32 bit version with plugin's like flash that actually work) will not allow me to use Japanese input. Any idea how to fix this?

  9. #9
    Join Date
    Apr 2005
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    @ryukent:: Good job on your how-to!!

    I just wanted to tell you that you will have to add another repo if you want some special Japanese application like Ch2 Browser.

    Code:
    deb http://archive.ubuntulinux.jp/ubuntu-ja feisty/
    Code:
    deb http://archive.ubuntulinux.jp/ubuntu-ja feisty-ja/

    Source Page:

    http://www.ubuntulinux.jp/download/i...#JA_Repository

    That is all.

    Thank you!!
    Last edited by ubuntu27; July 22nd, 2007 at 07:17 PM.

  10. #10
    Join Date
    Mar 2007
    Beans
    14

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.04

    Are there any similar guides that would allow me to get skim (or at least scim) to work properly for simplified chinese input under an english locale? I couldn't find any, and after hours of fiddling, I just could never get it to run. The best I could do is get it to start, use it or 2 or 3 minutes, and then crash... I can't remember how I did that though...

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •