Bug 62804 - Font dialog should have per-language font settings (like mozilla)
Summary: Font dialog should have per-language font settings (like mozilla)
Status: RESOLVED DUPLICATE of bug 39185
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-17 01:30 UTC by Ken Deeter
Modified: 2003-11-07 15:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Deeter 2003-08-17 01:30:16 UTC
Version:            (using KDE KDE 3.1.2)
Installed from:    Gentoo Packages
OS:          Linux

Re-iteration of bug 14496 with some detail.

The current font settings mechanism (for browsing webpages) relies on Qt's font substitution scheme to do the right thing when encountering pages of different languages. It works in many cases, but it also doesn't work in enough cases that this problem really should be addressed.

The reasons for the problem are as follows:

Qt's font substitution mechanism is somewhat flawed. It does not seem to check character by character which glyphs are contained in a font. For example, say there are two fonts A and B. Say both fonts cover a glyph range R, except that A does not cover R completely. In the current font dialog for webpages, if we set the default font to font A, then when a character in R that is not provided by font A, it will show up as a blank square, even though it may be provided by font B. (Qt doesn't seem to check each character individually, only ranges, so if A claims to cover R, then it will never look at B).

This causes huge problems especially for CJK text. The unicode code points for Han-derived characters are unified across all of Japanese, Chinese, Korean, Chinese/traditional. However, each character can look different (and indeed should look different) based on which language it is being used in. It is not the case like with western languages where the character "a" looks the same in all languages.

Furthermore, say a japanese font claims to cover a range of han characters. This typically means it covers only those characters that are used in Japanese. Indeed, there are many characters in the cjk range that are used only in one of the cjk languages. Thus, if one sets a Japanese font and loads a chinese page, then a large number of characters come up as blank boxes, because they are not implemented in the Japanese font. Likewise, if one sets a Chinese font, a Japanese page may not load correctly.

Ideally, all of this is supposed to be solved using language codes in unicode text. However, it seems Qt is nowhere near to supporting this, so the simple solution is to take a mozilla-like approach: change the default font based on the "language" or encoding.

For a quick example of how bad it can be, set the font preference to "kochi gothic" and then load "http://www.people.com.cn" Every square character is a character that is used in Chinese (therefore falls in the CJK range) but is not provided for by the Kochi gothic font. The only real solution (besides using embedded language codes and seriously upgrading QT's font handling) is to use a chinese font for this page. However, this would require a user to go into the font preferences and change the setting just for this page (highly undesirable).

The font preference page should really look like mozilla's,
with a "language" selection at the top, and the language specific font settings underneath (including per-language serif/sans-serif fonts as well as max/min sizes)

This problem really makes konqueror virutally impossible to use for reading different cjk pages. It works somewhat if one assumes a japanese user reads only japanese pages, for example, but in many many cases, this is not the case, and the software should not ignore the other cases.
Comment 1 Bernd Paysan 2003-08-29 13:53:48 UTC
I just wanted to submit the same wish, and found it already well formulated. Note that even 
cjk users might want to have a language-specific setting, especially when they browse 
western (e.g. english) pages. Most CJK fonts contain quite ugly ASCII characters (usually 
monospaced, and certainly not comparable to the readability of Helvetica/Arial or Times). 
SuSE Linux e.g. contains nice TTFs for CJK (more than one per language, e.g. four chinese 
(two encodings, two shapes, which could be translated to "serif/non-serif")), so font rendering 
could be a lot better when choosing the *right* font. 
 
Note also that minimum and typical size of a font can depend on the language. A 7pt chinese 
font is basically unreadable, while a 7pt Arial is still good. So the suggestion is to have a 
language+encoding chooser (with "default" sets the fallback for all) for 
language/encoding-dependent settings in the font dialog. 
 
This sort of stuff cannot be done automatically (that's what Qt tries), since the right font for a 
specific CJK language is also a matter of taste. 
Comment 2 Ken Deeter 2003-09-03 10:51:59 UTC
It almost seems to me that one day we are gonna need the same dialog for the 
global KDE font settings, even if QT does end up supporting unicode more 
properly. 
 
Perhaps KDE could get ahead of the game in this area.. as not even windows 
supports this kind of m17n-ized setting. 
Comment 3 Ken Deeter 2003-11-07 10:42:51 UTC
This is actually a duplicate of bug 56338 . Transferring my votes, but the explanation here might be more useful.
Comment 4 Maksim Orlovich 2003-11-07 15:22:21 UTC
Thank you for point this out. I agree, BTW

*** This bug has been marked as a duplicate of 39185 ***