个人工具

“UbuntuHelp:HowtoFixIndicFontRendering”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第3行: 第3行:
 
== Problem ==
 
== Problem ==
 
The rendering of Indic fonts in Ubuntu Breezy and Ubuntu Dapper is incorrect. The following '''bug reports''' are related to this problem:
 
The rendering of Indic fonts in Ubuntu Breezy and Ubuntu Dapper is incorrect. The following '''bug reports''' are related to this problem:
* [[https://launchpad.net/distros/ubuntu/+source/ttf-freefont/+bug/6134|Prevents correct rendering of Unicode text in Indian languages]]
+
* [https://launchpad.net/distros/ubuntu/+source/ttf-freefont/+bug/6134 Prevents correct rendering of Unicode text in Indian languages]
* [[https://launchpad.net/distros/ubuntu/+source/ttf-indic-fonts/+bug/48280|ttf-telugu-fonts and ttf-kannada-fonts ignored due to missing lang field in fonts.cache-1]]
+
* [https://launchpad.net/distros/ubuntu/+source/ttf-indic-fonts/+bug/48280 ttf-telugu-fonts and ttf-kannada-fonts ignored due to missing lang field in fonts.cache-1]
* (firefox in Ubuntu Dapper only) [[https://launchpad.net/distros/ubuntu/+source/firefox/+bug/48326|Incorrectly rendered Telugu, Kannada, and Hindi text, even with MOZ_ENABLE_PANGO=1]]
+
* (firefox in Ubuntu Dapper only) [https://launchpad.net/distros/ubuntu/+source/firefox/+bug/48326 Incorrectly rendered Telugu, Kannada, and Hindi text, even with MOZ_ENABLE_PANGO=1]
 
=== Actual results ===
 
=== 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. <<BR>> {{http://librarian.launchpad.net/3017292/Screenshot-gedit-bad.png}}
 
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. <<BR>> {{http://librarian.launchpad.net/3017292/Screenshot-gedit-bad.png}}
第18行: 第18行:
 
== Solution ==
 
== Solution ==
 
=== Ubuntu Breezy ===
 
=== Ubuntu Breezy ===
Remove the [[http://packages.ubuntu.com/dapper/x11/ttf-freefont|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 [[http://indlinux.org|IndLinux]] mailing list for this solution.
+
Remove the [http://packages.ubuntu.com/dapper/x11/ttf-freefont 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 [http://indlinux.org 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 [[http://www.indlinux.org/wiki/index.php/FontInstallation#Distro_specifics|FontInstallation]].
+
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 [http://www.indlinux.org/wiki/index.php/FontInstallation#Distro_specifics FontInstallation].
 
=== Ubuntu Dapper ===
 
=== Ubuntu Dapper ===
 
The following solutions fix the general rendering of Telugu text in Ubuntu Dapper.
 
The following solutions fix the general rendering of Telugu text in Ubuntu Dapper.

2008年10月19日 (日) 15:35的版本

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