aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2021-07-04 14:01:10 +0000
committerTobias C. Berner <tcberner@FreeBSD.org>2021-07-04 14:03:16 +0000
commit4b4126ceba9b8adf8d7b6a6af421923ebba86118 (patch)
tree604b56713e6c8623b014fa64e7149d742357c99a
parenta890e5f89fc231a7b3ea460a637a612f840a078b (diff)
downloadports-4b4126ceba9b8adf8d7b6a6af421923ebba86118.tar.gz
ports-4b4126ceba9b8adf8d7b6a6af421923ebba86118.zip
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
-rw-r--r--x11-fonts/fontconfig/Makefile1
-rw-r--r--x11-fonts/fontconfig/files/patch-src_fccfg.c42
2 files changed, 43 insertions, 0 deletions
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@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))