#627939 fontconfig-config: CJK han-unification problem workaround

Package:
fontconfig-config
Source:
fontconfig
Description:
generic font configuration library - configuration
Submitter:
Osamu Aoki
Date:
2011-12-17 16:24:10 UTC
Severity:
wishlist
#627939#5
Date:
2011-05-25 17:25:52 UTC
From:
To:
Here is a request to please Japanese and Chinese without fight for the
default preferences :-)

One of the most annoying national preference collision happens at

 U+3001 IDEOGRAPHIC COMMA
 U+3002 IDEOGRAPHIC FULL STOP

Almost every line has these.

zh_TW put them center, while ja and zh_CN put them at corner.

So depending on which style you like, font choice order should be
different.  But for better codepoint coverage, we want many packages to
be loaded.

Currently, 60-latin.conf is in a sane situation.  But 65-nonlatin.conf
is a mess.  Even if we order them, there is no single solution to meet
all tastes.

Realistic solution is to make sorted and nice looking 65-nonlatin.conf
per language association.  Some font claims multiple coverage but their
core identities can be identified easily using U+3001 and U+3002 and few
other glyph choice as listed in
http://en.wikipedia.org/wiki/Han_unification

Let's make followings in /etc/fonts/conf.avail/ from 65-nonlatin.conf
and 65-fonts-persian.conf each by their association:
 68-nonlatin-ja.conf (Japanese centered)
 68-nonlatin-ko.conf (Korean centered)
 68-nonlatin-zh_CN.conf
 68-nonlatin-zh_TW.conf
 68-nonlatin-persian.conf

In default, each /etc/fonts/conf.d/68-nonlatin-*.conf links to
corresponding  /etc/fonts/conf.avail/68-nonlatin-*.conf.

Since these needs to be ordered between 60-latin.conf and
69-unifont.conf, 61 62 63 64 65 66 67 68 are the choice.

The package should provide simple shell program to change this linking.

 $ sudo fontconfig-locale-choice ja persian zh_CN zh_TW

This should make links from
 62-nonlatin-ja.conf
 68-nonlatin-ko.conf (default number = 68)
 64-nonlatin-zh_CN.conf
 65-nonlatin-zh_TW.conf
 63-nonlatin-persian.conf

(Any overflowing choice can be bunched and left at 68, the lowest
priority.)

For Debian installation, if they are run under applicable locale,
default choice should be made:
 ja_JP.UTF-8 -> fontconfig-locale-choice ja
 zh_CN.UTF-8 -> fontconfig-locale-choice zh_CN
 ...

Otherwise, there should be priority medium or low dialogue for
dpkg-reconfigure.  This ensures consistent choice.

Issues like http://bugs.freedesktop.org/show_bug.cgi?id=20911 and many
bug reports there may be solved by this.

I noticed many font packages installs their font in higher position.
This uncoordinated fight is not good.  There should be some coordinated
system for default.

Oh, I also see some Chinese fonts are declared for both San-serif and
serif.  This should be stopped if we make nice updated list.
 HEI        = GOTHIC = SAN-SERIF
 SO  = MING = MINCHO = SERIF

Do you agree on this idea as whole?  Should we make such script and
patch?  Or will you do it?

Regards,

Osamu

PS: If you know where to find method to write fonfconfig rule limited
to the particular codepoints, let me know.

#627939#10
Date:
2011-07-10 18:04:00 UTC
From:
To:
forcemerge 627939 498909
thanks

Actually #627939 and #498909 is talking about the same thing: CJK users
need special cares about their fonts configurations, and currently there
is no ideal solution to fit all the three languages. So we concluded
that we should provide some default configurations for different CJK
users, and let them to choose to enable which one in a user friendly way.

I'll try to see if I have the chance implement this by merging some
Ubuntu efforts.

#627939#17
Date:
2011-07-10 18:15:51 UTC
From:
To:
And yes, I am aware of that #627939 is not only for several
configuration files, but also issuing the appearance of comma and full
stop in different fonts and languages. This is a separated issue, if you
think the merge is not suitable then feel free to unmerge it.

#627939#22
Date:
2011-12-17 16:17:44 UTC
From:
To:
Hi,

I realized this can be solved by providing a set of packages for each
nonlatin fonts.

 For nonlatin font bar, create 2 packages

 * fonts-bar
   normal font package
   install 66-bar.conf (current 64-wqy-zenhei.conf equivalent)
   Recommends: fonts-bar-priority

 * fonts-bar-priority
   Installing this package put it on the top of choice for nonlatin
   fonts.
   install 64-bar.conf (the same content as 66-bar.conf)
   Provides: fonts-priority
   Conflicts: fonts-priority

 This way, no normal font package is aggressive.
 When fonts-*-priority is installed, it becomes choice for nonlatin
 range.  Always one of them are installed to ensure user selected taste
 for the font.

 Once this is done properly for all font packages including we can
 remove 65-nonlatin.conf. (We loose MS Micho but that is not supported
 and whoever smart enough ti add it manually should have no problem
 configuring it.)

I will work with fonts team.
http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2011-December/thread.html

Osamu