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

Thread: HOWTO: Japanese Input and Fonts in Ubuntu 7.10

Hybrid View

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

    Question HOWTO: Japanese Input and Fonts in Ubuntu 7.10

    HOWTO: Installing Japanese that looks nice on Ubuntu 7.10 (Gutsy): 日本語

    Installing Japanese Input and Superior Font Setup in Ubuntu
    Introduction


    This is a guide to setting up Japanese for Ubuntu 7.10 Gutsy. It is intended as a complete guide encompassing all elements required for using Japanese on any language installation of Ubuntu. It covers input (UIM-Anthy) and configuring the Japanese fonts. There are other
    guides around for older versions of Ubuntu or that use the alternative SCIM. 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 7.04 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. I have chosen to switch to UIM from SCIM because SCIM (ubuntu) does not properly support XIM at the moment. That means in applications not written for GTK or QT, you will not be able to use extended characters. UIM on the other hand should support 100% of applications.

    Issues Involved

    There are two main issues here:

    1.Installing the UIM 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 UIM

    This section covers setting up the Japanese input system using UIM 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 gutsy/
    Note that you will need to change 'gutsy' if you are using a different version from 7.10. Now update your repos with:

    Code:
    sudo apt-get update
    At this stage, you will probably get an error saying that the repository is not validated. Ignore this for now. The following step will correct it. 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.

    Installing UIM

    Although the default input method (SCIM) will have been installed, there are still certain bugs which mean that it will not function correctly in all applications, specifically non GTK (Gnome) ones. For this reason we will install UIM. This alternative provides the same input converter (Anthy) as SCIM did, but also provides a much more stable and compatible back end.

    Code:
    sudo apt-get install uim uim-anthy uim-common uim-gtk2.0 uim-qt uim-xim
    As long as you have followed the above steps (including switching on Japanese language support), you should have all the necessary packages installed. Now we need to set up UIM.

    Making UIM available under a non-Japanese login

    Now you want to make UIM (Language input system) available in your English (or other lang) login and not just the Japanese one.

    Code:
    sudo im-switch -s uim-systray
    This will change the input system over to UIM and tell it to dock itself in the system tray at the top of your screen. You now need to restart your computer. When the system has rebooted and you have logged back into Ubuntu, you should notice a new icon in the top right corner (or wherever your systray is). To check that it is working, open text editor. The icons now displayed in the UIM bar allow you to select different input methods. The first one should be clicked on and set to 'Anthy'. This is the Japanese input system. The second one allows you to choose between character types. Holding SHIFT and hitting SPACE will allow you to toggle between these.

    Note: You might want to set Anthy as your default input method. You can do this in the UIM preferences window by clicking on the spanner and screwdriver icon in the UIM bar.

    Setting up the system to display Japanese characters properly

    OK, now you've got Japanese input installed (hopefully). 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:
    gksudo 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.

  2. #2
    Join Date
    Jan 2008
    Location
    Oregon, USA
    Beans
    14
    Distro
    Ubuntu

    Wink Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.10

    I was having MAJOR issues with the SCIM Input method so this tutorial helped me a LOT. Thanks so much. I searched all over on how to fix the problems I was having and would never have imagined that SCIM was responsible. This is the only tutorial which actually helped.

    Problems encountered before replacing SCIM with UIM:
    1. Open Office would crash every time I tried accessing an item in any menu.
    2. Couldn't enter any text to rename any files or folders (especially on the desktop).

  3. #3
    Join Date
    Mar 2007
    Location
    Scotland
    Beans
    137
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.10

    I used this method but I found that creating the fonts.conf file changed some of my default fonts (e.g. in the terminal, etc) to less nice ones. How can I change the order so that it's just the Japanese fonts that are changed.

    p.s. I didn't originally have a fonts.conf file.

  4. #4
    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.10

    If you want to change the fonts used by the system for generic stuff, you have two choices.

    1. You can to to System / Preferences / Appearance / Fonts and select the application fonts you want there.

    2. You can edit the fonts.conf file yourself and swap the first line in each section with the font you want. Note that "serif", "sans-serif" and "monospace" are not actually fonts, they simply refer to the list you have in the fonts.conf file. In the example I gave above, Times New Roman is the serif font, Verdana is the sans-serif font and Courier New is the monospace font. On my system I think this looks pretty good. You may think otherwise and therefore substitute your own selection to the top of the list.

    Note, this will only change fonts you already have selected as this generic 3 fonts. Terminal usually uses the system serif font. However, you can specifically set a different font to use in terminal itself.

    Also, you might want to enable subpixel smoothing in the font dialogue if you have an LCD screen as it makes the fonts a lot smoother.

    Hope this helps.

  5. #5
    Join Date
    Feb 2008
    Location
    Burbank/Brea, CA
    Beans
    58
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.10

    Excellent How-to! I'm very much a new-comer to the Ubuntu scene and currently living in Japan, having Japanese input is a plus! Thanks for helping me make that possible!

    ありがとう ございました! 

  6. #6
    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.10

    With regards to my earlier comments about SCIM, it seems the XIM module is not in fact broken. There are however certain problems you might experience if you're using a locale other than en_US.UTF-8. So for people outside the US, if you want to run SCIM in XIM mode:

    Install SCIM using the default language packs from System / Admin / Language support. Run "im-switch -z en_GB -s scim". You'll need to change the en_GB to whatever your locale is. Then into your ~/.scim/global file and make sure there a line with:

    /SupportedUnicodeLocales = en_US.UTF-8,en_GB.UTF-8

    Note also that there is no space after the comma. If you put a space in, it won't work. Again you'll have to change en_GB to your locale.

    Now log out and log back in again. Should work now!

  7. #7
    Join Date
    Feb 2008
    Beans
    11

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.10

    ありがとぅございます (terima kasih, thank you very much)

  8. #8
    Join Date
    Mar 2008
    Location
    Osaka, Japan
    Beans
    224
    Distro
    Hardy Heron (Ubuntu Development)

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.10

    Hi
    I followed the guide, but it did not seem to improve display of the fonts.
    Actually the Japanese fonts in Hardy look ok to me. But the really horrible ones are the ones used in Firefox to display Japanese web pages.
    I was hoping to fix that, but your method did not seem to effect Firefox...
    So I reversed the steps to try and get back to where I was before following your guide.

    But I cannot get the fonts to go back to the handwriting style they had before (for hiragana and katakana). Can you tell me how can I revert to that style?

    Also, do you know anyway to fix theJapanese fonts for Firefox 3b4? (actually the English ones look awful in Firefox too though...)

  9. #9
    Join Date
    May 2007
    Beans
    264

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.10

    I have have 日本語 input. But am facing other problems.


    1) The keyboard shortcut to toggle between japanese and direct input only works sometimes Most of them I have to use the mouse. I'm using KDE.



    2) How do I get japanese language support in every program? And I don't mean writting. This is what troubles me:

    I downloaded an archive from amule, whose filename showed japanese characters (kanji alphabet) in amule.

    The downloaded file no longer shows japanese characters in the filename, neither in bash, nor in konqueror.

    Opening the archive with xarchive shows the archive's filename correctly (with japanese characters).
    But it messes up all the filenames of the mp3s inside. It can't handle the filenames and ends up by showing the same name for several files.
    The result is that when I try to extract the files, it only extracts some... the ones that have different names.

    If I go to bash and use the non-FOSS unrar program I can list the filenames with no problems (both kanji, katakana and hiragana)... I see some squared dots in the rar file comments section, but I think those are supposed to be there.
    Extracted files have the correct filename both in bash and in konqueror.

    I put the mp3s in Amarok and the ID3 tags get all messed up for most of the files




    3) Where do I get a spellcheker?
    I am learning japanese and I don't know if it's こにちわ or こにちいわ. This is just an example. A spell checker will help me a lot.


    4) When I install ttf-vlgothic or ttf-arphic-ukai I get this message:
    Code:
    Setting up ttf-vlgothic (20071215-2) ...
    /var/cache/fontconfig: invalid cache file: 3830d5c3ddfd5cd38a049b759396e72e-x86-64.cache-2
    /var/cache/fontconfig: invalid cache file: 7ef2298fde41cc6eeb7af42e48b7d293-x86-64.cache-2
    /var/cache/fontconfig: invalid cache file: cabbd14511b9e8a55e92af97fb3a0461-x86-64.cache-2
    /var/cache/fontconfig: invalid cache file: 3830d5c3ddfd5cd38a049b759396e72e-x86-64.cache-2
    /var/cache/fontconfig: invalid cache file: 7ef2298fde41cc6eeb7af42e48b7d293-x86-64.cache-2
    /var/cache/fontconfig: invalid cache file: cabbd14511b9e8a55e92af97fb3a0461-x86-64.cache-2
    No CIDSupplement specified for Gulim-Regular, defaulting to 0.
    No CIDSupplement specified for KochiGothic-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for Mikachan-PB, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Uni-JaH, defaulting to 0.
    No CIDSupplement specified for SazanamiGothic-Regular, defaulting to 0.
    No CIDSupplement specified for Mikachan-JaH, defaulting to 0.
    No CIDSupplement specified for Mikachan-P-JaH, defaulting to 0.
    No CIDSupplement specified for SazanamiMincho-Regular, defaulting to 0.
    No CIDSupplement specified for Mikachan-P, defaulting to 0.
    No CIDSupplement specified for Mikachan, defaulting to 0.
    No CIDSupplement specified for KochiGothic-Regular, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Light, defaulting to 0.
    No CIDSupplement specified for SazanamiGothic-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Uni-Ja, defaulting to 0.
    No CIDSupplement specified for KochiMincho-Regular, defaulting to 0.
    No CIDSupplement specified for KochiMincho-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Uni-GB, defaulting to 0.
    No CIDSupplement specified for SazanamiMincho-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for Mikachan-PS-JaH, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Uni, defaulting to 0.
    No CIDSupplement specified for Mikachan-PS, defaulting to 0.
    No CIDSupplement specified for Batang-Regular, defaulting to 0.
    No CIDSupplement specified for Mikachan-PB-JaH, defaulting to 0.
    No CIDSupplement specified for Dotum-Regular, defaulting to 0.
    No CIDSupplement specified for Headline-Regular, defaulting to 0.
    
    
    
    
    
    Setting up ttf-arphic-ukai (0.1.20060928-2.2) ...
    /var/cache/fontconfig: invalid cache file: 089dead882dea3570ffc31a9898cfb69-x86-64.cache-2
    No CIDSupplement specified for Gulim-Regular, defaulting to 0.
    No CIDSupplement specified for ZenKai-Uni-Medium-JaH, defaulting to 0.
    No CIDSupplement specified for KochiGothic-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for Mikachan-PB, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Uni-JaH, defaulting to 0.
    No CIDSupplement specified for SazanamiGothic-Regular, defaulting to 0.
    No CIDSupplement specified for Mikachan-JaH, defaulting to 0.
    No CIDSupplement specified for Mikachan-P-JaH, defaulting to 0.
    No CIDSupplement specified for SazanamiMincho-Regular, defaulting to 0.
    No CIDSupplement specified for Mikachan-P, defaulting to 0.
    No CIDSupplement specified for ZenKai-Uni-Medium-GB, defaulting to 0.
    No CIDSupplement specified for Mikachan, defaulting to 0.
    No CIDSupplement specified for KochiGothic-Regular, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Light, defaulting to 0.
    No CIDSupplement specified for SazanamiGothic-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Uni-Ja, defaulting to 0.
    No CIDSupplement specified for KochiMincho-Regular, defaulting to 0.
    No CIDSupplement specified for KochiMincho-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for ZenKai-Uni-Medium-Ja, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Uni-GB, defaulting to 0.
    No CIDSupplement specified for SazanamiMincho-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for Mikachan-PS-JaH, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Uni, defaulting to 0.
    No CIDSupplement specified for Mikachan-PS, defaulting to 0.
    No CIDSupplement specified for ZenKai-Uni-Medium, defaulting to 0.
    No CIDSupplement specified for Batang-Regular, defaulting to 0.
    No CIDSupplement specified for Mikachan-PB-JaH, defaulting to 0.
    No CIDSupplement specified for Dotum-Regular, defaulting to 0.
    No CIDSupplement specified for Headline-Regular, defaulting to 0.
    /var/cache/fontconfig: invalid cache file: 089dead882dea3570ffc31a9898cfb69-x86-64.cache-2

    Thank you.
    Last edited by kung fu buntu; April 5th, 2008 at 06:21 PM.

  10. #10
    Join Date
    Mar 2008
    Location
    Osaka, Japan
    Beans
    224
    Distro
    Hardy Heron (Ubuntu Development)

    Re: HOWTO: Japanese Input and Fonts in Ubuntu 7.10

    The 2nd problem you are having might be to do with fonts. Try to set a Japanese capable font for document and/or application in your font settings (in admin>prefs>appearance)


    I don't know about spell checking in Japanese, but for a lot of words when you hit the space bar it will try and convert to kanji if iyouve typed the word correctly. If it doesn't, or only converts parts of it, then chances are you've made a mistake

    and its こんにちは by the way

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
  •