git: 34f81fdd20db - 2021Q3 - x11-fonts/fontconfig: add upstream fix 49-sansserif.conf
Tobias C. Berner
tcberner at FreeBSD.org
Sun Jul 4 14:07:54 UTC 2021
The branch 2021Q3 has been updated by tcberner:
URL: https://cgit.FreeBSD.org/ports/commit/?id=34f81fdd20db75df534b18ae173cc58e15789ab4
commit 34f81fdd20db75df534b18ae173cc58e15789ab4
Author: Ting-Wei Lan <lantw44 at gmail.com>
AuthorDate: 2021-07-04 14:01:10 +0000
Commit: Tobias C. Berner <tcberner at 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 | 42 ++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
diff --git a/x11-fonts/fontconfig/Makefile b/x11-fonts/fontconfig/Makefile
index 2ae668106cf5..8aced7d414ae 100644
--- a/x11-fonts/fontconfig/Makefile
+++ b/x11-fonts/fontconfig/Makefile
@@ -2,6 +2,7 @@
PORTNAME= fontconfig
DISTVERSION= 2.13.93
+PORTREVISION?= 1
PORTEPOCH= 1
CATEGORIES= x11-fonts
MASTER_SITES= https://www.freedesktop.org/software/fontconfig/release/
diff --git a/x11-fonts/fontconfig/files/patch-src_fccfg.c b/x11-fonts/fontconfig/files/patch-src_fccfg.c
new file mode 100644
index 000000000000..210815161b2b
--- /dev/null
+++ b/x11-fonts/fontconfig/files/patch-src_fccfg.c
@@ -0,0 +1,42 @@
+From df29933e1a06b7aa7af229bd7cd03c62d957f15f Mon Sep 17 00:00:00 2001
+From: Szunti <Szunti at users.noreply.github.com>
+Date: Sun, 6 Dec 2020 12:52:44 +0100
+Subject: [PATCH] Check qual and compare for family tests
+
+Fixes #267. Hash table lookups assumed qual="any" compare="eq".
+Add a test too.
+--- src/fccfg.c.orig 2020-11-28 01:56:42 UTC
++++ src/fccfg.c
+@@ -1714,6 +1714,7 @@ FcConfigMatchValueList (FcPattern *p,
+ FcExpr *e = t->expr;
+ FcValue value;
+ FcValueList *v;
++ FcOp op;
+
+ while (e)
+ {
+@@ -1731,10 +1732,23 @@ FcConfigMatchValueList (FcPattern *p,
+
+ if (t->object == FC_FAMILY_OBJECT && table)
+ {
+- if (!FamilyTableLookup (table, t->op, FcValueString (&value)))
++ op = FC_OP_GET_OP (t->op);
++ if (op == FcOpEqual || op == FcOpListing)
+ {
++ if (!FamilyTableLookup (table, t->op, FcValueString (&value)))
++ {
+ ret = 0;
+ goto done;
++ }
++ }
++ if (op == FcOpNotEqual && t->qual == FcQualAll)
++ {
++ ret = 0;
++ if (!FamilyTableLookup (table, t->op, FcValueString (&value)))
++ {
++ ret = values;
++ }
++ goto done;
+ }
+ }
+ for (v = values; v; v = FcValueListNext(v))
More information about the dev-commits-ports-all
mailing list