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

Thread: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, problems

  1. #1
    Join Date
    May 2007
    Location
    Brooklyn, NY
    Beans
    193
    Distro
    Ubuntu 11.04 Natty Narwhal

    HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, problems

    So I may not be an expert on this matter, but I've spent probably a good dozen or so hours battling with problems related to Ubuntu's Chinese language support, including several at the Chinese forums and wiki, and I learned a few things in the process, which I thought I'd share with the community in case some of this should prove to be helpful. This should be considered a guide for those who want to install Chinese language support (to be able to read and write Chinese characters) on a non-Chinese version of Ubuntu, like an English language version, for students of Chinese language, for example. The Chinese version, with Chinese menus and a Chinese login, often doesn't have any of these problems that I'll be describing.

    1) Install Chinese Language support in System -> Administration -> Language Support by selecting Chinese and enable support of complex characters in the checkbox below. It has been noted elsewhere that in Fiesty you might actually have to uncheck this box if it's already checked, hit apply, and then check it again. This should install SCIM. When you log out and log back in, a little keyboard icon in the system tray indicates that SCIM is runinng.

    2) Configure SCIM. This should be in System -> Preferences. Go to "global setup" and choose the input method you'll be using. For example, I use 拼音 but others go for other input methods. Familiarize yourself with the keystrokes necessary to activate SCIM, or set ones you like. That way, whenever you want to write Chinese you can just press Cntl+space. I've got it hooked up to change between English and Chinese input every time I press Print Screen, which I find useful.

    3) Now you'll notice that you can input Chinese. But what if you have some characters that come out in serif, and others in sans? Does it look really strange? That's probably because Ubuntu is trying to display Chinese characters using a Japanese font, and is only displaying them with the Chinese font when the Japanese font doesn't contain that particular Chinese character. The way to fix this is by changing the font locale to zh_CN. This can be done by running

    Code:
    fontconfig-voodoo -f -s zh_CN
    and has worked for me in the past using this method, but there's the chance it might not work under Gutsy, as it tends to give Chinese fonts priority over even regular Western fonts, thereby making your normal western text look all aliased and ugly. To fix this, one of the things you could do is to move the western fonts (ie Bitstream, Deja Vu, etc) higher up on the list in the file /usr/share/language-selector/fontconfig/zh_CN by running

    Code:
    sudo gedit /usr/share/language-selector/fontconfig/zh_CN
    and editing the file accordingly. But in case this doesn't work for some reason, another way to do this is first to revert your voodoo settings:

    Code:
    fontconfig-voodoo -f -s none
    then make a file called .fonts.conf with all the same stuff in it as a fixed-up zh_CN file would have. For example, mine looks like this:

    Code:
    <fontconfig>
    	<include ignore_missing="yes">CJK_aliases</include>
    	<alias>
    		<family>serif</family>
    		<prefer>
    			<family>Bitstream Vera Serif</family>
    			<family>DejaVu Serif</family>
    			<family>AR PL UMing CN</family>
    			<family>AR PL ShanHeiSun Uni</family>
    			<family>AR PL UKai CN</family>
    			<family>AR PL ZenKai Uni</family>
    		</prefer>
    	</alias>
    	<alias>
    		<family>sans-serif</family>
    		<prefer>
    			<family>Bitstream Vera Sans</family>
    			<family>DejaVu Sans</family>
    			<family>AR PL UMing CN</family>
    			<family>AR PL ShanHeiSun Uni</family>
    			<family>AR PL UKai CN</family>
    			<family>AR PL ZenKai Uni</family>
    		</prefer>
    	</alias>
    	<alias>
    		<family>monospace</family>
    		<prefer>
    			<family>Bitstream Vera Sans Mono</family>
    			<family>DejaVu Sans Mono</family>
    			<family>AR PL UMing CN</family>
    			<family>AR PL ShanHeiSun Uni</family>
    			<family>WenQuanYi Bitmap Song</family>
    			<family>AR PL UKai CN</family>
    			<family>AR PL ZenKai Uni</family>
    		</prefer>
    	</alias>
    </fontconfig>
    4) Now your Chinese characters display consistently but they're all aliased and ugly-looking under a certain size. That's because there's a few lines in fontconfig that turn off the antialiasing features that would otherwise smooth out the characters. The way to fix this is by editing a file called /etc/fonts/conf.d/70-ttf-arphic-uming.conf where there is a line that says

    Code:
    <test name="pixelsize"  compare="more_eq"><int>17</int></test>
    There, you can change the number 17 to whatever number you want it to start aliasing from. I changed it to 8, for example.

    And voila! Now you have pretty looking Chinese fonts.

    With that having been said, I really hope that by the next release Ubuntu will have figured this whole thing out, so that people won't have to go through all this just to get their computer to display Chinese correctly.
    MSI x350 / Ubuntu Natty 11.04 (64 bit)
    Poems at---------------jonreeve.com---------------

  2. #2
    Join Date
    Jun 2006
    Location
    Melbourne, Australia
    Beans
    32
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, proble

    Thanks this topic helped quite alot. Just a few things to mention (based on xubuntu Gutsy 64bit):
    The .fonts.config file goes in your home folder, took me a while to figure that one out haha.
    For me the SCIM doesnt activate automatically when using an English session (could be because I use xubuntu). I had to install the scim-bridge package and configure a few files. Check this page for more information.

  3. #3
    Join Date
    Dec 2005
    Location
    Brisbane, Australia
    Beans
    321
    Distro
    Ubuntu Karmic Koala (testing)

    Re: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, proble

    Ah, I have wondering for a while why fonts in Ubuntu look so horrible. Thank you.

  4. #4
    Join Date
    Mar 2007
    Beans
    85

    Re: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, proble

    Unfortunately, I still cant get it...

    I got the keyboard icon to appear... but nothing will trigger it to change to other language... there just no reason for this to be so difficult...

  5. #5
    Join Date
    Nov 2007
    Location
    London
    Beans
    69
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Angry Re: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, proble

    Hello there! I've tried the method you said.. But it doesn't work for me..
    I went to system-administration-language support, unticked chinese, applied, ticked it again, applied, restarted the computer. Then I found the little keyboard icon and went to system-preferences-SCIM input method setup, chose 拼音.
    However, after I hit ctrl+space, I just can not input chinese.. Still english.. In the SCIM setup, control+space is the hotkey for 'Trigger'. What shall I do now?
    My settings:

    Last edited by doowgof; November 18th, 2007 at 04:28 PM. Reason: add more info

  6. #6
    Join Date
    May 2007
    Location
    Brooklyn, NY
    Beans
    193
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, proble

    doofgof, it seems the SCIM setup might be a little more complicated than I originally thought. As echowsays above, this may require more configuration, as outlined on this page.
    MSI x350 / Ubuntu Natty 11.04 (64 bit)
    Poems at---------------jonreeve.com---------------

  7. #7
    Join Date
    Nov 2007
    Location
    London
    Beans
    69
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, proble

    Thank you Jon. However this does not work for me neither.. I guess I need to do some more research..

  8. #8
    Join Date
    Sep 2007
    Beans
    8
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, proble

    多榭你地 !!!

    it all worked fine for me after following the scim guide in ubuntu docs in order to extend support for all gtk apps such as firefox. all you need to do is install the scim-bridge package and change a config file.

    the ime's that come with scim seem so easy to use! i typed the above using the cantonhk ime which is specifically designed for hong kong style cantonese pinyin input. no more copy+paste to search for 多啦A夢 vids on youtube!

  9. #9
    Join Date
    Nov 2007
    Beans
    1

    Re: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, proble

    This was a GREAT help. Chinese works properly now!!

  10. #10
    Join Date
    Aug 2006
    Beans
    23

    Re: HOWTO: Chinese Language Support (Fiesty and Gutsy)--fonts, input, display, proble

    Thanks Jon- this solved the very same ugly Chinese font problem I've been having ever since I installed Gutsy a month ago.

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
  •