Subject: Re: Japanese QT
To: None <regional-jp@netbsd.org>
From: None <jb@sdf-eu.org>
List: regional-jp
Date: 03/02/2005 17:59:10
Since the devs aren't answering I'll answer this one.
I'm in the middle of writing a Japanese How-to actually.

>I'd like to know what I need to do to get QT to support japanese fonts.
>The precompiled package doesn't seem to support it. Can I tell pkgsrc
>to add support japanese fonts somehow? I have used KDE in Gentoo
>earlier and learned and loved kiten in KDE. I'd really like to do the
>same in NetBSD.

It would be more helpful if you can be more specific. Like which
version of NetBSD, how the Qt is going to be used, user/developer etc.
I'm going to assume you just want to display Japanese menus etc. on KDE.

   To use Japanese locale on KDE3

     Install kde-i18n-ja using pkgsrc. It can be found in pkgsrc/x11.

   From the KDE desktop.

     Go to Control Center --> Regional & Accessibility -->
     Country/Region & Language --> Languages --> Add Language -->
     Choose Japanese from the pulldown menu --> Move it up in the list
     if its not --> Apply and Exit

   If the fonts don't look aesthetically pleasing then more (ex.
   kochi-ttf) can be installed using pkgsrc in pkgsrc/fonts. Then use
   the GUI supplied by KDE to import them.

>Also, if I have got it right, there's a way to use japanese input in
>general in KDE as one can use in kiten, with shift+space to switch
>between english or +romaji and hiragana/katakana input. How can I do
>that?

I'm not sure if there is a native KDE input method but I'll show an
input method which I know is simple to install, use Shift+Space and
works on KDE.

  Install packages "uim" and "anthy" from pkgsrc/inputmethod.

  Add the following lines to your .xinitrc .

     export LC_CTYPE=ja_JP.eucJP
     export LANG=ja_JP.eucJP
     export XMODIFIERS=@im=uim
     uim-xim &
                                    
 If you are a UTF-8 kind of a person then do the following.             
                                       
     foo: {1} cd /usr/share/locale     
     foo: {2} su                       
     Password:                         
     foo: {1} ln -s en_US.UTF-8 ja_JP.UTF-8                              
     foo: {2} exit
                                       
  Then replace ja_JP.eucJP with ja_JP.UTF-8 in .xinitrc .                
                                       
  If you also use GTK+2 then add the following line to xinitrc .         
                                       
    export GTK_IM_MODULE=uim-anthy     
                                       
  Then let GTK+2 update its immodules. 
                                       
    foo: {1} su                        
    Password:                          
    foo: {1} gtk-query-immodules-2.0 > /usr/pkg/libdata/gtk-2.0/gtk.immodules
    foo: {2} exit                      
                                       
There are other ways to set up Japanese input but its going to be so     
long and complicated I'm not going to go into that mess yet.              
                                       
>I have searched much for info on this, but all I can find is in         
>japanese, and I                       
>can't read that... yet. So if there are any nice tutorials on how to    
>set up things like that, I'd really like to know.                       
                                       
I could be answering the wrong question entirely.  If thats the case,
mail me the link privately and I'll have a look at it.                 
                                       
James                                  
                                       
--
2D68 27A1 F1ED 2F67 C4C9  E6BF 606C 494C 69CF 7942