[opensuse-m17n] Re: noto-sans-cjk-fonts' config replaces "serif" with "Noto Sans CJK *" (sans)

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?
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:
-- To unsubscribe, e-mail: opensuse-m17n+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-m17n+owner@opensuse.org

Hi I noticed that using latin font under Japanese environment is difficult as system default settings. (as user's custom setting, it's possible.) The configuration below in 59-faimily-prefer-by-locale.conf disables the preference list defined in 58-family-prefer-local.conf.
Suppose that 58-family-prefer-local.conf have <alias><family>serif</family><prefer><family>FooBar Mincho</family></prefer></alias> The resulting family list will be FooBar Mincho, Robot Slab, IPAPMincho, IPAexMincho, ..., serif However, the font fontconfig selects Robot Slab. This is because the selected font is not the one of the top of the family list but the family that have highest score. The scoring rule of fontconfig is not clear. It seems that its factor might be (a) The position of the family in the family list (b) The character sets provided by the family (c) The strength of binding The rule (b) precedes (a). This is why the CJK font is selected even though there are many latin families before the CJK family. For example, when we have a family list like: Roboto Slab, IPA Mincho, ..., serif (defined without strong binding) $ fc-match serif returns "IPA Mincho" under Japanese environment. To use "Robot Slab" for latin character under Japanese env., we need to use (c) "strong" binding as I mentioned before, which gives much higher score than (a) and (b). This enables us to use latin font for alphabets and Arabic numbers but the binding breaks other preference rules. I will give up using latin font for Japanese environment and revert to use always Japanese fonts as before. -- Fuminobu TAKEYAMA On 2016/09/11 23:12, Fuminobu TAKEYAMA wrote:

Hi I noticed that using latin font under Japanese environment is difficult as system default settings. (as user's custom setting, it's possible.) The configuration below in 59-faimily-prefer-by-locale.conf disables the preference list defined in 58-family-prefer-local.conf.
Suppose that 58-family-prefer-local.conf have <alias><family>serif</family><prefer><family>FooBar Mincho</family></prefer></alias> The resulting family list will be FooBar Mincho, Robot Slab, IPAPMincho, IPAexMincho, ..., serif However, the font fontconfig selects Robot Slab. This is because the selected font is not the one of the top of the family list but the family that have highest score. The scoring rule of fontconfig is not clear. It seems that its factor might be (a) The position of the family in the family list (b) The character sets provided by the family (c) The strength of binding The rule (b) precedes (a). This is why the CJK font is selected even though there are many latin families before the CJK family. For example, when we have a family list like: Roboto Slab, IPA Mincho, ..., serif (defined without strong binding) $ fc-match serif returns "IPA Mincho" under Japanese environment. To use "Robot Slab" for latin character under Japanese env., we need to use (c) "strong" binding as I mentioned before, which gives much higher score than (a) and (b). This enables us to use latin font for alphabets and Arabic numbers but the binding breaks other preference rules. I will give up using latin font for Japanese environment and revert to use always Japanese fonts as before. -- Fuminobu TAKEYAMA On 2016/09/11 23:12, Fuminobu TAKEYAMA wrote:
participants (1)
-
Fuminobu TAKEYAMA