Created attachment 226209 [details] Fix 49-sansserif.conf for fontconfig 2.13.93 After updating fontconfig 2.13.93, the configuration file '49-sansserif.conf' shipped with fontconfig itself stops working. This means if some glyphs cannot be found in the given font, fontconfig will pick fallback fonts randomly instead of honoring what the user sets as sans-serif. For example, I set sans-serif to 'Noto Sans CJK TC', but it is not guaranteed that I will see 'Noto Sans CJK TC' when fontconfig needs a fallback font. It sometimes picks 'Noto Sans CJK SC', 'Noto Sans CJK HK' and 'Noto Sans CJK KR' as fallback fonts for glyphs which are also supported by 'Noto Sans CJK TC'. https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/267 We can fix the issue by applying this upstream patch. https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/142
Committed. Thanks! mfg Tobias
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4b4126ceba9b8adf8d7b6a6af421923ebba86118 commit 4b4126ceba9b8adf8d7b6a6af421923ebba86118 Author: Ting-Wei Lan <lantw44@gmail.com> AuthorDate: 2021-07-04 14:01:10 +0000 Commit: Tobias C. Berner <tcberner@FreeBSD.org> CommitDate: 2021-07-04 14:03:16 +0000 x11-fonts/fontconfig: add upstream fix 49-sansserif.conf After updating fontconfig 2.13.93, the configuration file '49-sansserif.conf' shipped with fontconfig itself stops working. This means if some glyphs cannot be found in the given font, fontconfig will pick fallback fonts randomly instead of honoring what the user sets as sans-serif. This commit pulls in upstreams fix for this issue from https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/142 See also upstreams PR: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/267 PR: 256969 x11-fonts/fontconfig/Makefile | 1 + x11-fonts/fontconfig/files/patch-src_fccfg.c (new) | 42 ++++++++++++++++++++++ 2 files changed, 43 insertions(+)
A commit in branch 2021Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=34f81fdd20db75df534b18ae173cc58e15789ab4 commit 34f81fdd20db75df534b18ae173cc58e15789ab4 Author: Ting-Wei Lan <lantw44@gmail.com> AuthorDate: 2021-07-04 14:01:10 +0000 Commit: Tobias C. Berner <tcberner@FreeBSD.org> CommitDate: 2021-07-04 14:07:40 +0000 x11-fonts/fontconfig: add upstream fix 49-sansserif.conf After updating fontconfig 2.13.93, the configuration file '49-sansserif.conf' shipped with fontconfig itself stops working. This means if some glyphs cannot be found in the given font, fontconfig will pick fallback fonts randomly instead of honoring what the user sets as sans-serif. This commit pulls in upstreams fix for this issue from https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/142 See also upstreams PR: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/267 PR: 256969 (cherry picked from commit 4b4126ceba9b8adf8d7b6a6af421923ebba86118) x11-fonts/fontconfig/Makefile | 1 + x11-fonts/fontconfig/files/patch-src_fccfg.c (new) | 42 ++++++++++++++++++++++ 2 files changed, 43 insertions(+)