特殊:Badtitle/NS100:HowtoFixIndicFontRendering:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第28行: | 第28行: | ||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | ||
<fontconfig> | <fontconfig> | ||
<alias> | <alias> | ||
<family>sans-serif</family> | <family>sans-serif</family> | ||
<prefer> | <prefer> | ||
<family>Kedage</family> | <family>Kedage</family> | ||
<family>Pothana2000</family> | <family>Pothana2000</family> | ||
</prefer> | </prefer> | ||
</alias> | </alias> | ||
<alias> | <alias> | ||
<family>serif</family> | <family>serif</family> | ||
<prefer> | <prefer> | ||
<family>Kedage</family> | <family>Kedage</family> | ||
<family>Pothana2000</family> | <family>Pothana2000</family> | ||
</prefer> | </prefer> | ||
</alias> | </alias> | ||
<alias> | <alias> | ||
<family>monospace</family> | <family>monospace</family> | ||
<prefer> | <prefer> | ||
<family>Kedage</family> | <family>Kedage</family> | ||
<family>Pothana2000</family> | <family>Pothana2000</family> | ||
</prefer> | </prefer> | ||
</alias> | </alias> | ||
</fontconfig> | </fontconfig> | ||
</nowiki></pre> | </nowiki></pre> |
2007年12月6日 (四) 10:35的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/HowtoFixIndicFontRendering }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/af | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|Afrikaans| [[::HowtoFixIndicFontRendering/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/ar | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|العربية| [[::HowtoFixIndicFontRendering/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/az | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|azərbaycanca| [[::HowtoFixIndicFontRendering/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/bcc | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|جهلسری بلوچی| [[::HowtoFixIndicFontRendering/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/bg | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|български| [[::HowtoFixIndicFontRendering/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/br | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|brezhoneg| [[::HowtoFixIndicFontRendering/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/ca | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|català| [[::HowtoFixIndicFontRendering/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/cs | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|čeština| [[::HowtoFixIndicFontRendering/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/de | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|Deutsch| [[::HowtoFixIndicFontRendering/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/el | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|Ελληνικά| [[::HowtoFixIndicFontRendering/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/es | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|español| [[::HowtoFixIndicFontRendering/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/fa | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|فارسی| [[::HowtoFixIndicFontRendering/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/fi | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|suomi| [[::HowtoFixIndicFontRendering/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/fr | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|français| [[::HowtoFixIndicFontRendering/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/gu | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|ગુજરાતી| [[::HowtoFixIndicFontRendering/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/he | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|עברית| [[::HowtoFixIndicFontRendering/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/hu | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|magyar| [[::HowtoFixIndicFontRendering/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/id | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|Bahasa Indonesia| [[::HowtoFixIndicFontRendering/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/it | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|italiano| [[::HowtoFixIndicFontRendering/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/ja | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|日本語| [[::HowtoFixIndicFontRendering/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/ko | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|한국어| [[::HowtoFixIndicFontRendering/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/ksh | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|Ripoarisch| [[::HowtoFixIndicFontRendering/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/mr | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|मराठी| [[::HowtoFixIndicFontRendering/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/ms | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|Bahasa Melayu| [[::HowtoFixIndicFontRendering/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/nl | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|Nederlands| [[::HowtoFixIndicFontRendering/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/no | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|norsk| [[::HowtoFixIndicFontRendering/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/oc | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|occitan| [[::HowtoFixIndicFontRendering/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/pl | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|polski| [[::HowtoFixIndicFontRendering/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/pt | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|português| [[::HowtoFixIndicFontRendering/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/ro | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|română| [[::HowtoFixIndicFontRendering/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/ru | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|русский| [[::HowtoFixIndicFontRendering/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/si | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|සිංහල| [[::HowtoFixIndicFontRendering/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/sq | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|shqip| [[::HowtoFixIndicFontRendering/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/sr | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|српски / srpski| [[::HowtoFixIndicFontRendering/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/sv | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|svenska| [[::HowtoFixIndicFontRendering/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/th | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|ไทย| [[::HowtoFixIndicFontRendering/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/tr | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|Türkçe| [[::HowtoFixIndicFontRendering/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/vi | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|Tiếng Việt| [[::HowtoFixIndicFontRendering/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/yue | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|粵語| [[::HowtoFixIndicFontRendering/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/zh | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|中文| [[::HowtoFixIndicFontRendering/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/zh-hans | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|中文(简体)| [[::HowtoFixIndicFontRendering/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:HowtoFixIndicFontRendering | UbuntuHelp:HowtoFixIndicFontRendering | {{#if: | :}}HowtoFixIndicFontRendering}}/zh-hant | • {{#if: UbuntuHelp:HowtoFixIndicFontRendering|中文(繁體)| [[::HowtoFixIndicFontRendering/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:HowtoFixIndicFontRendering|:HowtoFixIndicFontRendering|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :HowtoFixIndicFontRendering/zh | | {{#ifexist: HowtoFixIndicFontRendering/zh | | {{#ifeq: {{#titleparts:HowtoFixIndicFontRendering|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:HowtoFixIndicFontRendering|1|-1|}} | zh | | }}
Problem
The rendering of Indic fonts in Ubuntu Breezy and Ubuntu Dapper is incorrect. The following bug reports are related to this problem:
- Prevents correct rendering of Unicode text in Indian languages
- ttf-telugu-fonts and ttf-kannada-fonts ignored due to missing lang field in fonts.cache-1
- (firefox in Ubuntu Dapper only) Incorrectly rendered Telugu, Kannada, and Hindi text, even with MOZ_ENABLE_PANGO=1
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.
For Ubuntu Dapper, here is a screenshot of:
- incorrectly rendered Telugu text
- incorrectly rendered Kannada text
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.
For Ubuntu Dapper, here is a screenshot of:
- correctly rendered Telugu text
- correctly rendered Kannada text
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.
- 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