Recently Adobe & Google released a open-source pan-CJK font, Source Han Sans from Adobe or Noto Sans CJK from Google. This font family features 7 font weights: ExtraLight, Light, Normal, Regular, Meidum, Bold, Heavy and their os2 weight are: 100, 300, 350, 400, 500, 700, 900 respectively. However, in fontconfig, os2 weight class 350 and 400 both maps to weight 80 and I think this makes fontconfig or pango confuse about how to choose the default font. In particular in the GktFontChooser user can't choose one of these fonts. To fix this we probably also have to fix Pango. This issue is also reported to the source-han-sans project: https://github.com/adobe-fonts/source-han-sans/issues/5
I believe this is a Pango limitation, not fontconfig. I'll take a look.
My bad, this *is* a fontconfig issue. Investigating.
Fontconfig part fixed. Pango fix needed. commit ffda7c0e8130eb107ecbb3bdc48043093b12dff9 Author: Behdad Esfahbod <behdad@behdad.org> Date: Fri Jul 25 17:59:26 2014 -0400 Linearly interpolate weight values Rest of Part of https://bugs.freedesktop.org/show_bug.cgi?id=81453 Adds new API: FcWeightFromOpenType() FcWeightToOpenType() commit bf9df5ada77469f57101851f6b4e279a4a5ea087 Author: Behdad Esfahbod <behdad@behdad.org> Date: Fri Jul 25 18:07:10 2014 -0400 Change DemiLight from 65 to 55 Such that Regular is closer to Medium than to DemiLight commit be6506ca04ccce10868a8cd51d89e586284d149b Author: Behdad Esfahbod <behdad@behdad.org> Date: Fri Jul 25 16:24:26 2014 -0400 Add FC_WEIGHT_DEMILIGHT Part of https://bugs.freedesktop.org/show_bug.cgi?id=81453 Also hooks up FC_WEIGHT_BOOK to fcfreetype.c.
Tracking pango issue here: https://bugzilla.gnome.org/show_bug.cgi?id=733764
Pango fixed. See screenshots here: https://bugzilla.gnome.org/show_bug.cgi?id=733764
(In reply to comment #3) > Fontconfig part fixed. Pango fix needed. > > commit ffda7c0e8130eb107ecbb3bdc48043093b12dff9 > Author: Behdad Esfahbod <behdad@behdad.org> > Date: Fri Jul 25 17:59:26 2014 -0400 > > Linearly interpolate weight values > > Rest of Part of https://bugs.freedesktop.org/show_bug.cgi?id=81453 > > Adds new API: > > FcWeightFromOpenType() > FcWeightToOpenType() Note that this fix introduced bug 82228 as lerp doesn't handle dy == 0.
*** Bug 94505 has been marked as a duplicate of this bug. ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.