个人工具

UbuntuHelp:HowtoFixIndicFontRendering

来自Ubuntu中文

跳转至: 导航, 搜索

Problem

The rendering of Indic fonts in Ubuntu Breezy and Ubuntu Dapper is incorrect. The following bug reports are related to this problem:

Actual results

In Ubuntu Breezy, the screenshot below shows how Telugu text is rendered before the problem is fixed. Here, the text appears garbled and is incomprehensible because (1) some adjacent glyphs are of uneven sizes, (2) some accents and vowels are drawn on the wrong consonant, and (3) some consonant clusters are rendered incorrectly. <
> 模板:Http://librarian.launchpad.net/3017292/Screenshot-gedit-bad.png For Ubuntu Dapper, here is a screenshot of:

Expected results

In Ubuntu Breezy, the screenshot below shows how the same Telugu text is rendered after the problem is fixed. Here, the text appears as expected and is comprehensible. <
> 模板:Http://librarian.launchpad.net/3017300/Screenshot-gedit-good.png For Ubuntu Dapper, here is a screenshot of:

Solution

Ubuntu Breezy

Remove the ttf-freefont package because (1) it contains low quality Indic fonts for some Indian languages, and (2) it is given priority over the ttf-indic-fonts package which contains high quality Indic fonts. Thanks to Soumyadip Modak in the IndLinux mailing list for this solution. ttf-indic-fonts does not have all Indian fonts. In a system with ttf-freefont uninstalled and ttf-indic-fonts installed, Tamil text was "shown" in Telugu. After installing ttf-tamil-fonts, Tamil text was seen correctly. ttf-<otherlanguage>-fonts packages are also available. See FontInstallation.

Ubuntu Dapper

The following solutions fix the general rendering of Telugu text in Ubuntu Dapper.

  1. Please see the solution in the bug report (link is above) regarding "ttf-telugu-fonts" and "ttf-kannada-fonts".
  2. Another way to solve the problem is to set fontconfig perferences to prefer Kedage font (from ttf-kannada-fonts) and Pothana2000 font (from ttf-telugu-fonts) over Free``Font. Put something like the following in ~/.fonts.conf or /etc/fonts/local.conf:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <alias>
  <family>sans-serif</family>
  <prefer>
   <family>Kedage</family>
   <family>Pothana2000</family>
  </prefer>
 </alias>
 <alias>
  <family>serif</family>
  <prefer>
   <family>Kedage</family>
   <family>Pothana2000</family>
  </prefer>
 </alias>
 <alias>
  <family>monospace</family>
  <prefer>
   <family>Kedage</family>
   <family>Pothana2000</family>
  </prefer>
 </alias>
</fontconfig>

Firefox

In addition to one of the above solutions, there is one more step you need to perform get correct rendering of Telugu, Kannada, Hindi, etc. text in Ubuntu Dapper. This step is installing the correct language packs for each language (see the bug report above regarding Firefox): I installed the language packs like this: $ sudo apt-get install language-pack-te language-pack-kn Then I ran firefox without any MOZ_ variables: $ firefox te.wikipedia.org kn.wikipedia.org