Comment 14 for bug 659280

Revision history for this message
Aron Xu (happyaron) wrote : Re: subject: Remove the string tags include Bitstream Vera态DejaVu inside in the setting file /etc/fonts/conf.avail/69-language-selector-zh-xy.conf where xy represents cn, hk, mo, sg and tw individually.

Hello, thanks for your efforts and happy new year! Let's make a summary of discussions till now so we can probably move on ;-)

The facts (and problems):
1. The special case in those PDF files is they does not have Chinese fonts embedded. Many daily used files fall in this kind (such as research papers on CNKI which is very widely used in China's academic interests).
2. The problem does not only exist in Chinese PDF rendering, but also some other random applications which hard code to use "sans-serif" fonts.
3. With current 69-language-selector-zh-xy.conf, and with poppler-data installed, the Chinese text in those PDF files are shown as squares.
4. xpdf with xpdf-chinese-* installed can render those PDF files correctly, Adobe Reader can do it as well.
5. Cannot reproduce this problem on Debian when we change the font settings manually in gnome-appearance-properties to make the user experience just like Ubuntu.

More on technical details:

Programs cannot handle fontconfig configurations correctly when it needs to show Chinese contents. Fontconfig assumes applications will find font faces in the list order, if it fails in the former ones, then move and find it in latter ones, but those buggy applications only find font faces in the first font listed.

Ubuntu's approach to font settings is to have an English font (commonly Dejavu or Bitstream Vera) with higher priority, and Chinese fonts with lower priority. Users benefit from such settings because English typefaces in Chinese fonts are usually not that good-looking. Most of the desktop applications work well.

Proposed solutions, with pros and cons:

1. Remove English fonts from /etc/fonts/conf.avail/69-language-selector-zh-xy.conf.
    This one would make it able to show those PDF files correctly, but forces people to use English typefaces provided by Chinese fonts, which lower the user experience so it is a regression. This is a quick bug ugly solution.

2. Fix poppler-data and all relevant applications so they can honor fontconfig settings correctly.
    This one is not a quick-and-dirty fixed that can be applied by users themselves as previous one. But this should be the correct way - xpdf and Adobe Reader can do well, so their is no reason that poppler can't by fixing relevant codes. This is technically a "better" solution, but takes longer time to achieve.