Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

LHS browser is in Ubuntu 11.10 which renders the chinese text perfectly. RHS however, is in Ubuntu 12.04, which renders blurry chinese.

Can anyone tell me why Ubuntu cannot render Chinese text clearly in 12.04??

share|improve this question
    
I reckon that this problem goes to the recognition of the font - UMing. When in Ubuntu 11.10, after installing the Chinese Traditional language pack, ALL Chinese are decoded in UMing font by the system automatically. However, in Ubuntu 12.04, this is not detected. Please help. –  The questioner Jul 31 '12 at 1:31

1 Answer 1

This problem occurs because all fonts on Ubuntu 12.04 seem to be hinted and antialiased in the same way, using the same fontconfig rules. So the Chinese fonts look fuzzy just like the Latin fonts. In other distributions, there are special rules for Chinese fonts to make sure that they are not antialiased.

To fix this problem, I installed UMing and WenQuanYi Bitmap Song fonts, deleted a rule against bitmap fonts, and then created a custom set of fontconfig rules.

  1. Make sure UMing fonts are installed. They should be automatically installed when you add Chinese language support to your system through System Settings > Language Support.
  2. Open a terminal and type the following to install WenQuanYi Bitmap Song font:

    sudo apt-get install xfonts-wqy

  3. Remove a rule against bitmap fonts:

    cd /etc/fonts/conf.d
    sudo rm /etc/fonts/conf.d/70-no-bitmaps.conf
    sudo ln ../conf.avail/70-yes-bitmaps.conf .

  4. Create /etc/fonts/local.conf file:

    sudo gedit /etc/fonts/local.conf

  5. Copy and paste the following into the editor, and modify it according to the fonts that you have installed.

    <?xml version = "1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
    
    <!--Disable font alias for Chinese <= 18px -->
    
        <match target="font">
    
            <test qual="any" name="family" compare="eq">
    
                <string>AR PL UMing CN</string>
                <string>AR PL UMing TW</string>
                <string>AR PL UMing HK</string>
                <string>AR PL UMing TW MBE</string>
                <string>AR PL ZenKai Uni</string>
                <string>Ming(ISO10646)</string>
                <string>MingLiu</string>
                <string>PMingLiu</string>
                <string>Kochi Mincho</string>
                <string>Baekmuk Dotum</string>
    
            </test>
    
            <test name="pixelsize" compare="less_eq">
    
                <double>18</double>
    
            </test>
    
            <edit name="antialias">
    
                <bool>false</bool>
    
            </edit>
    
            <edit name="hinting">
    
                <bool>true</bool>
    
            </edit>
    
       </match>
    
    <alias>
    
        <!-- Choose best serif fonts -->
    
        <family>serif</family>
    
        <prefer>
    
            <family>DejaVu Serif</family>
            <family>Liberation Serif</family>
            <family>Times New Roman</family>
            <family>Times</family>
            <family>AR PL UMing CN</family>
            <family>AR PL ShanHeiSun Uni</family>
            <family>AR PL Mingti2L Big5</family>
            <family>AR PL SungtiL GB</family>
            <family>SimSun</family>
    
        </prefer>
    
    </alias>
    
    <alias>
    
        <!-- Choose best sans serif fonts -->
    
        <family>sans-serif</family>
    
        <prefer>
    
            <family>Ubuntu</family>
            <family>DejaVu Sans</family>
            <family>Liberation Sans</family>
            <family>Arial</family>
            <family>Verdana</family>
            <family>Helvetica</family>
            <family>WenQuanYi Bitmap Song</family>
            <family>VL PGothic</family>
    
        </prefer>
    
    </alias>
    
    <alias>
    
        <!-- Choose best monospace fonts -->
    
        <family>monospace</family>
    
        <prefer>
    
            <family>Ubuntu Mono</family>
            <family>DejaVu Sans Mono</family>
            <family>Liberation Mono</family>
            <family>Courier New</family>
            <family>Courier</family>
            <family>WenQuanYi Zen Hei Mono</family>
            <family>VL Gothic</family>
            <family>AR PL ShanHeiSun Uni</family>
    
        </prefer>
    
    </alias>
    
    </fontconfig>
    

  1. Save the file, close all programs, log out and log back in.

Doing these steps fixed the problem for me in most programs. Unfortunately if you use Chromium browser the fonts are still blurry. I'm not sure how to fix that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.