Re: noto-sans-cjk-fonts' config replaces "serif" with "Noto Sans CJK *" (sans)
Fuminobu TAKEYAMA <[email protected]> Sun, 11 Sep 2016 23:12:04 +0900
| Newsgroups | gmane.linux.suse.m17n |
|---|---|
| Message-ID | <[email protected]> |
Hi
I move the config file from noto-sans-cjk-fonts to fonts-config
https://build.opensuse.org/package/view_file/home:ftake:branches:M17N/
fonts-config/59-family-prefer-locale-specific.conf
As far as I read 60-family-prefer.conf, the preferred serif font for Chinese
is not clear. (There are some sans font in preference list.)
After some investigation, I set following fonts
zh-cn: AR PL UMing CN
zh-sg: AR PL UMing CN
zh-tw: AR PL CMEXSong UMing TW
zh-hk: AR PL CMEXSong UMing HK
zh-mo: AR PL CMEXSong UMing HK
ko: NanumMyeongjo
Chinese maintainers, is this configuration appropriate?
> I _guess_ that the consequence would be that, if e. g. IPA PMincho
> contains latin characters, then that ones will be used for given
> locale instead of that ones in 60-family-prefer.conf.
Well, before the problematic conf file is not installed,
IPA PMincho has been used for latin characters.
However, IPA* fonts does not provide good glyphs (suitable for FreeType).
So following this approach:
> 1. adding prefered latin fonts before that cjk ones to
> 59-family-prefer-cjk.conf
I put "Roboto Slab" before IPA* fonts.
Here, the binding="strong" is important. Without it, fc-match picks IPAMincho
before Roboto Slab.
<match target="pattern">
<test qual="any" name="family" compare="eq">
<string>serif</string>
</test>
<test name="lang" compare="eq">
<string>ja</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<!-- use latin font for non Japanese characters -->
<string>Roboto Slab</string>
<string>IPAPMincho</string>
<string>IPAexMincho</string>
</edit>
</match>
I am finding the best latin font used with IPA* fonts.
BTW, 60-family-prefer.conf is still important when CJK character is used
under non-CJK environment where LC_CTYPE is, for example, en.
Fuminobu TAKEYAMA
On 2016/09/07 16:41, Petr Gajdos wrote:
> Fuminobu,
>
> On Wed, Sep 07, 2016 at 02:13:17AM +0900, Fuminobu TAKEYAMA wrote:
>> Thank you for using your time for this help.
>> I am sorry. I just wanted to ask the intention (requirement) of the latest package,
>> which force to use Noto Sans as a serif font.
>
> You do not need to sorry, your mail was actally that one which
> kick me to understand.
>
> I vaguely remember there was a problem with overlapping unicode points
> in CJK. Perhaps Japanese variant of noto cjk ttc was chosen just
> because of alphabet order even for chinese text, or so. But I had not
> participated on the solution of the problem, so I do not know about it
> more.
>
>> As a quick fix for 42.2 and Tumbleweed, I will remove the following part from the
>> config file:
>> (1) appending Noto Sans CJK JP/SC/TC/KR to serif
>> (2) appending Noto Sans (Mono) CJK Japanese to sans-serif (monospace) respectively
>
> Just to be correct, _prepending_. Appending is also possible via
> append/<accept> alias.
>
>> About (2), we have discussed on the previous thread. We do not make it default
>> sans/monospace for Japanese for now when the package is manually installed.
>
> That is one option, as you say, quick. But let me propose a permanent
> solution and be critical.
>
> What about somewhat copy the idea of 59-noto-sans-cjk.conf and
> generalize it, say to 59-family-prefer-cjk.conf, or maybe even
> 59-family-prefer-lang.conf for matter of future requests. I. e.
> introduce language specific variants of default preference lists and
> prepend them to that in 60-family-prefer.conf.
>
> <!-- Japanese -->
> <match target="pattern">
> <test qual="any" name="family" compare="eq">
> <string>sans-serif</string>
> </test>
> <test name="lang" compare="eq">
> <string>ja</string>
> </test>
> <edit name="family" mode="prepend">
> <string>IPA PGothic</string>
> [.. another families better then noto ..]
> <string>Noto Sans CJK JP</string>
> [.. another families worse then noto ..]
> </edit>
> </match>
> <match target="pattern">
> <test qual="any" name="family" compare="eq">
> <string>serif</string>
> </test>
> <test name="lang" compare="eq">
> <string>ja</string>
> </test>
> <edit name="family" mode="prepend">
> <string>IPA PMincho</string>
> [.. another families ..]
> </edit>
> </match>
> <match target="pattern">
> <test qual="any" name="family" compare="eq">
> <string>monospace</string>
> </test>
> <test name="lang" compare="eq">
> <string>ja</string>
> </test>
> <edit name="family" mode="prepend">
> <string>IPA Gothic</string>
> [.. another families better then noto ..]
> <string>Noto Sans Mono CJK JP</string>
> [.. another families worse then noto ..]
> </edit>
> </match>
>
> The same way for another languages, for now just Korean and Chinese.
>
> Of course, these families could be then removed from
> 60-family-prefer.conf and the rest of lists in there could be perhaps
> reviewed and lightened a bit.
>
> Because of 59- prefix it would be read after 56-user.conf (user
> conf from custom fonts.conf) and after 58-family-prefer-local.conf
> (fonts-config written configuration derived from
> /etc/sysconfig/fonts-config), it should not override the settings
> there.
>
> I _guess_ that the consequence would be that, if e. g. IPA PMincho
> contains latin characters, then that ones will be used for given
> locale instead of that ones in 60-family-prefer.conf. YOU, C J and K
> guys need to decide if it is wrong for you or not. If not, that can be
> perhaps easily solved by (not sure what would be better):
>
> 1. adding prefered latin fonts before that cjk ones to
> 59-family-prefer-cjk.conf
> 2. remove surely all fonts from 60-family-prefer.conf that contains
> CJK characters and exchange order of 59-family-prefer-lang.conf and
> 60-family-prefer.conf, i. e. 59-family-prefer.conf and
> 60-family-prefer-lang.conf.
>
> I would prefer the first variant slightly, when there would not be
> high duplication of 60-family-prefer.conf for each locale (one or two
> fonts at maximum). Each lang would have a freedom to decide which
> latin font match best in addition to their CJK-font-preference.
>
> DISCLAIMER: all of this I wrote from top of my head, so sorry when I
> talk rubbish. Needs to be tested for sure.
>
>> Maybe I misunderstood some current situation. I will do more investigation
>> e.g. fonts-config really works with the Noto's config file or not.
>
> I do not think you misunderstood something. I recently unsubscribed as
> maintainer/bugowner of fontconfig/fonts-config for openSUSE because of
> the reasons I have already wrote in my previous email.
>
> If you would like to take partly over, I will return myself as
> comaintainer with you.
>
> Thanks,
> Petr
>
--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]