FS#48550 - [fontconfig] Fontconfig confuses Demilight (350) with Regular (400)
Attached to Project:
Arch Linux
Opened by Mingye Wang (arthur2e5) - Saturday, 12 March 2016, 19:10 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 28 March 2016, 14:40 GMT
Opened by Mingye Wang (arthur2e5) - Saturday, 12 March 2016, 19:10 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 28 March 2016, 14:40 GMT
|
Details
Fontconfig <= 2.11.1 uses a segmented approach to map
font weights. This breaks on fonts like Noto Sans CJK, where
Demilight (OS/2 weight=350) and Regular (OS/2 weight=400)
are both treated as Regular (fontconfig weight=80).
This bug is fixed upstream in Aug 2014 but is only available in developer snapshots. I have flagged this package previously, but I then realized I requested for a devel snapshot which doesn't sound good. (One can argue that fontconfig is somehow like wine now though). The attachment contains rebased versions of upstream fixes (commits be6506c, bf9df5a, ffda7c0, 01bb697, 80edacc). See https://bugs.freedesktop.org/show_bug.cgi?id=81453 for the upstream report. |
This task depends upon
[liushuyu@liushuyu ~]$ fc-match -V
fontconfig version 2.11.94
[liushuyu@liushuyu ~]$ fc-match -a 'Noto Sans CJK SC' | head
NotoSansCJK-Regular.ttc: "Noto Sans CJK SC" "Regular"
NotoSansCJK-Medium.ttc: "Noto Sans CJK SC" "Medium"
NotoSansCJK-DemiLight.ttc: "Noto Sans CJK SC" "DemiLight"
NotoSansCJK-Light.ttc: "Noto Sans CJK SC" "Light"
NotoSansCJK-Thin.ttc: "Noto Sans CJK SC" "Thin"
NotoSansCJK-Bold.ttc: "Noto Sans CJK SC" "Bold"
NotoSansCJK-Black.ttc: "Noto Sans CJK SC" "Black"
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSansCondensed.ttf: "DejaVu Sans" "Condensed"
DejaVuSans-ExtraLight.ttf: "DejaVu Sans" "ExtraLight"
I don't have Arch available on my system, but the results should be the same anyway (fc 2.11.1 with zero patches applied):
{{{
root [ ~ ] # fc-match -V
fontconfig version 2.11.1
root [ ~ ] # fc-match -a 'Noto Sans CJK SC' | head -n 2
NotoSansCJK-DemiLight.ttc: "Noto Sans CJK SC" "DemiLight"
NotoSansCJK-Regular.ttc: "Noto Sans CJK SC" "Regular"
}}}
As you can see, 2.11.1 mixed up. (How do you specify <pre> in Flyspray?)
2.11.94 yields the exactly same result (except for the shell PS1) as liushuyu's output, so I am not pasting it.