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

Fuminobu TAKEYAMA <[email protected]> Thu, 1 Sep 2016 23:51:53 +0900
Newsgroups gmane.linux.suse.m17n
Message-ID <[email protected]>
Hi,

The problem is that even though we have serif Japanese fonts (maybe Chinese 
too), Noto Sans CJK * is selected as an alias of "Serif".

  > So, as long as Noto CJK has not serif shape, it should be ok, I think.
  > Font for e. g. latin text should be taken from the another (serif)
  > fonts, in our case 'BlaBla Serif' if it is installed on the system.

How does fontconfig understand a font provides serif glyphs?


What is strange, I cannot find IPA P Mincho (IPA P明朝), which has been the 
default alias of "Serif" for Japanese, if 59-noto-sans-cjk.conf exists.

$ fc-match -s "Serif"
NotoSansCJK.ttc: "Noto Sans CJK JP" "Regular"
RobotoSlab-Regular.ttf: "Roboto Slab" "Regular"
LiberationSerif-Regular.ttf: "Liberation Serif" "Regular"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
DejaVuSerif-Bold.ttf: "DejaVu Serif" "Bold"
DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic"
DejaVuSerif-BoldItalic.ttf: "DejaVu Serif" "Bold Italic"
luxirr.ttf: "Luxi Serif" "Regular"
FreeSerif.ttf: "FreeSerif" "Regular"
bsmiuee.pfb: "AR PL Mingti2L Big5" "ee"
bsmiuf6.pfb: "AR PL Mingti2L Big5" "f6"
bsmiuf7.pfb: "AR PL Mingti2L Big5" "f7"
bsmiuf8.pfb: "AR PL Mingti2L Big5" "f8"
(snip)

$ sudo rm 59-noto-sans-cjk.conf
$ fc-match -s "Serif"
ipamp.ttf: "IPA P明朝" "Regular"
RobotoSlab-Regular.ttf: "Roboto Slab" "Regular"
LiberationSerif-Regular.ttf: "Liberation Serif" "Regular"
DejaVuSerif.ttf: "DejaVu Serif" "Book"
DejaVuSerif-Bold.ttf: "DejaVu Serif" "Bold"
DejaVuSerif-Italic.ttf: "DejaVu Serif" "Italic"
DejaVuSerif-BoldItalic.ttf: "DejaVu Serif" "Bold Italic"
luxirr.ttf: "Luxi Serif" "Regular"
FreeSerif.ttf: "FreeSerif" "Regular"
ipaexm.ttf: "IPAex明朝" "Regular"
sazanami-mincho.ttf: "さざなみ明朝" "Mincho-Regular"
gbsnu24.pfb: "AR PL SungtiL GB" "24"
gbsnu31.pfb: "AR PL SungtiL GB" "31"
gbsnu4e.pfb: "AR PL SungtiL GB" "4e"
gbsnu4f.pfb: "AR PL SungtiL GB" "4f"
gbsnu50.pfb: "AR PL SungtiL GB" "50"
(snip)

On 2016/09/01 16:44, ZhaoQiang wrote:
  > Hi Dear TAKEYAMA:
  >
  > Maybe this email will answer the question.
  > I'm not sure if Petr already send this to you,
  > So I send it again.
  >
  > If there are any questions, please reply this email to openSUSE M17N mail list.
  >
  >
  >
  > Best Regards !
  >
  >
  >
  > 主题: Re: Fwd: [opensuse-m17n] noto-sans-cjk-fonts' config replaces "serif" 
with "Noto Sans CJK *"
  > (sans)
  > 日期: Wed, 31 Aug 2016 12:49:32 +0200
  > 发件人: Petr Gajdos <[email protected]>
  > 收件人: Qiang Zhao <[email protected]>
  >
  >
  > Hello Qiang,
  >
  > ccing Marguerite, the author of this file and Takashi.
  >
  > This is not really an assignment, this rule is _prepending_ serif
  > keyword whenever it appears in the family list (see also <prefer>
  > tag). So all families, that are prepended sooner, are in the list with
  > higher priority while creating a pattern. For example.
  >
  > BEFORE
  > family: 'BlaBla Serif' 'Liberation Serif' serif
  >
  > AFTER
  > family: 'BlaBla Serif' 'Liberation Serif' 'Noto Sans CJK JP' serif
  >
  > Now, when some asks for serif, then all fonconfig rules are applied to
  > the pattern including that one you specified.
  >
  > After that, according some metrics, the best font on the system is
  > chosen. Of course, it also depends on the text language (needed
  > characters).
  >
  > So, as long as Noto CJK has not serif shape, it should be ok, I think.
  > Font for e. g. latin text should be taken from the another (serif)
  > fonts, in our case 'BlaBla Serif' if it is installed on the system.
  >
  > Petr
  >
  >
  >>
  >>
  >> -------- 转发的消息 --------
  >> 主题: [opensuse-m17n] noto-sans-cjk-fonts' config replaces "serif" with
  >> "Noto Sans CJK *" (sans)
  >> 日期: Sun, 28 Aug 2016 16:16:07 +0900
  >> 发件人: Fuminobu TAKEYAMA <[email protected]>
  >> 收件人: [email protected]
  >>
  >> Hi all,
  >>
  >> I just noticed that 59-noto-sans-cjk.conf provided by noto-sans-cjk-fonts
  >> replaces "serif" with "Noto Sans CJK JP/TC/SC/KR".
  >>
  >> Is there any intention to assign sans-serif fonts to serif?
  >>
  >> <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>Noto Sans CJK JP</string>
  >>          </edit>
  >> </match>
  >>
  >> I also think changing overriding alias preference by a font config file
  >> in each font package.
  >>
  >> Installing noto-sans-cjk-fonts accidentally changes system fonts
  >> even though they want to use those fonts only for printing.
  >> This also breaks configuration by yast-fonts.
  >>
  >> We should update the fontsconfig package in order to change default family
  >> of "serif", "sans serif", "monospace"
  >>
  >> --
  >> Fuminobu TAKEYAMA
  >> --
  >> To unsubscribe, e-mail: [email protected]
  >> To contact the owner, e-mail: [email protected]
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]