Bug 256969 - x11-fonts/fontconfig: 49-sansserif.conf doesn't work with fontconfig 2.13.93
Summary: x11-fonts/fontconfig: 49-sansserif.conf doesn't work with fontconfig 2.13.93
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-desktop (Team)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-04 09:56 UTC by Ting-Wei Lan
Modified: 2021-07-04 14:08 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (desktop)


Attachments
Fix 49-sansserif.conf for fontconfig 2.13.93 (2.02 KB, patch)
2021-07-04 09:56 UTC, Ting-Wei Lan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ting-Wei Lan 2021-07-04 09:56:04 UTC
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
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2021-07-04 14:03:53 UTC
Committed. Thanks!

mfg Tobias
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-07-04 14:04:00 UTC
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(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-07-04 14:08:02 UTC
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(+)