-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add patched fontconfig package until F40
- Loading branch information
Showing
10 changed files
with
1,891 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> | ||
<fontconfig> | ||
<description>Enable sub-pixel rendering with the RGB stripes layout for KDE only</description> | ||
<!-- Enable sub-pixel rendering --> | ||
<match target="font"> | ||
<!-- | ||
This sort of configuration is available on the major desktop environments | ||
and we don't have to break it with "assign" unconditionally. however, we | ||
want to set something for others. So we use "append" here to get this working | ||
in both cases so that most clients would takes a look at the first place only. | ||
--> | ||
<test name="desktop" compare="contains"> | ||
<string>KDE</string> | ||
</test> | ||
<edit name="rgba" mode="append"><const>rgb</const></edit> | ||
</match> | ||
</fontconfig> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | ||
<fontconfig> | ||
<match target="font"> | ||
<test name="family" compare="eq"> | ||
<string>Kochi Mincho</string> | ||
</test> | ||
<edit name="embeddedbitmap" mode="assign"> | ||
<bool>false</bool> | ||
</edit> | ||
</match> | ||
<match target="font"> | ||
<test name="family" compare="eq"> | ||
<string>Kochi Gothic</string> | ||
</test> | ||
<edit name="embeddedbitmap" mode="assign"> | ||
<bool>false</bool> | ||
</edit> | ||
</match> | ||
<match target="font"> | ||
<test name="family" compare="eq"> | ||
<string>Sazanami Mincho</string> | ||
</test> | ||
<edit name="embeddedbitmap" mode="assign"> | ||
<bool>false</bool> | ||
</edit> | ||
</match> | ||
<match target="font"> | ||
<test name="family" compare="eq"> | ||
<string>Sazanami Gothic</string> | ||
</test> | ||
<edit name="embeddedbitmap" mode="assign"> | ||
<bool>false</bool> | ||
</edit> | ||
</match> | ||
<match target="font"> | ||
<test name="family" compare="eq"> | ||
<string>AR PL ShanHeiSun Uni</string> | ||
</test> | ||
<edit name="embeddedbitmap" mode="assign"> | ||
<bool>true</bool> | ||
</edit> | ||
</match> | ||
</fontconfig> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#! /bin/sh | ||
|
||
[ -x /usr/bin/fc-cache-32 ] && /usr/bin/fc-cache-32 "$@" || : | ||
[ -x /usr/bin/fc-cache-64 ] && /usr/bin/fc-cache-64 "$@" || : |
33 changes: 33 additions & 0 deletions
33
staging/fontconfig/fontconfig-disable-network-required-test.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
diff -pruN fontconfig-2.13.93.orig/test/run-test.sh fontconfig-2.13.93/test/run-test.sh | ||
--- fontconfig-2.13.93.orig/test/run-test.sh 2020-11-28 10:56:42.000000000 +0900 | ||
+++ fontconfig-2.13.93/test/run-test.sh 2020-11-28 12:39:57.345644527 +0900 | ||
@@ -421,18 +421,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" my- | ||
|
||
fi # if [ "x$EXEEXT" = "x" ] | ||
|
||
-if [ -x "$BUILDTESTDIR"/test-crbug1004254 ]; then | ||
- dotest "MT-safe global config" | ||
- prep | ||
- curl -s -o "$FONTDIR"/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip | ||
- (cd "$FONTDIR"; unzip noto.zip) | ||
- if [ -n "${SOURCE_DATE_EPOCH:-}" ] && [ ${#SOURCE_DATE_EPOCH} -gt 0 ]; then | ||
- touch -m -t "$(date -d @"${SOURCE_DATE_EPOCH}" +%y%m%d%H%M.%S)" "$FONTDIR" | ||
- fi | ||
- "$BUILDTESTDIR"/test-crbug1004254 | ||
-else | ||
+#if [ -x "$BUILDTESTDIR"/test-crbug1004254 ]; then | ||
+# dotest "MT-safe global config" | ||
+# prep | ||
+# curl -s -o "$FONTDIR"/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip | ||
+# (cd "$FONTDIR"; unzip noto.zip) | ||
+# if [ -n "${SOURCE_DATE_EPOCH:-}" ] && [ ${#SOURCE_DATE_EPOCH} -gt 0 ]; then | ||
+# touch -m -t "$(date -d @"${SOURCE_DATE_EPOCH}" +%y%m%d%H%M.%S)" "$FONTDIR" | ||
+# fi | ||
+# "$BUILDTESTDIR"/test-crbug1004254 | ||
+#else | ||
echo "No test-crbug1004254: skipped" | ||
-fi | ||
+#fi | ||
|
||
if [ "x$EXEEXT" = "x" ]; then | ||
|
12 changes: 12 additions & 0 deletions
12
staging/fontconfig/fontconfig-drop-lang-from-pkgkit-format.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff -pruN fontconfig-2.13.92.orig/src/fcformat.c fontconfig-2.13.92/src/fcformat.c | ||
--- fontconfig-2.13.92.orig/src/fcformat.c 2018-07-19 12:14:39.000000000 +0900 | ||
+++ fontconfig-2.13.92/src/fcformat.c 2020-01-20 13:05:33.626227767 +0900 | ||
@@ -78,7 +78,7 @@ | ||
#define FCCAT_FORMAT "\"%{file|basename|cescape}\" %{index} \"%{-file{%{=unparse|cescape}}}\"" | ||
#define FCMATCH_FORMAT "%{file:-<unknown filename>|basename}: \"%{family[0]:-<unknown family>}\" \"%{style[0]:-<unknown style>}\"" | ||
#define FCLIST_FORMAT "%{?file{%{file}: }}%{-file{%{=unparse}}}" | ||
-#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}%{[]lang{font(:lang=%{lang|downcase|translate(_,-)})\n}}" | ||
+#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}" | ||
|
||
|
||
static void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
From fc0e9a78d2fe3b26f0b93c2a99b160e75e2a9f89 Mon Sep 17 00:00:00 2001 | ||
From: Akira TAGOH <[email protected]> | ||
Date: Wed, 28 Sep 2022 21:39:09 +0900 | ||
Subject: [PATCH 1/3] Real fix of 91114d18c | ||
|
||
The change in 91114d18c broke remapping font paths. | ||
|
||
Patch from Mattias Clasen | ||
|
||
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/331 | ||
--- | ||
src/fcstr.c | 6 +----- | ||
1 file changed, 1 insertion(+), 5 deletions(-) | ||
|
||
diff --git a/src/fcstr.c b/src/fcstr.c | ||
index 3fe518f..5ce65da 100644 | ||
--- a/src/fcstr.c | ||
+++ b/src/fcstr.c | ||
@@ -1467,7 +1467,6 @@ FcStrSetAddFilenamePairWithSalt (FcStrSet *set, const FcChar8 *a, const FcChar8 | ||
{ | ||
FcChar8 *new_a = NULL; | ||
FcChar8 *new_b = NULL; | ||
- FcChar8 *rs = NULL; | ||
FcBool ret; | ||
|
||
if (a) | ||
@@ -1487,10 +1486,7 @@ FcStrSetAddFilenamePairWithSalt (FcStrSet *set, const FcChar8 *a, const FcChar8 | ||
} | ||
} | ||
/* Override maps with new one if exists */ | ||
- if (FcStrSetMemberAB (set, new_a, new_b, &rs)) | ||
- { | ||
- FcStrSetDel (set, rs); | ||
- } | ||
+ FcStrSetDel (set, new_a); | ||
ret = FcStrSetAddTriple (set, new_a, new_b, salt); | ||
if (new_a) | ||
FcStrFree (new_a); | ||
-- | ||
2.37.3 | ||
|
||
From a10d07682a09ce5effbd121920b119618f4b7775 Mon Sep 17 00:00:00 2001 | ||
From: Akira TAGOH <[email protected]> | ||
Date: Wed, 28 Sep 2022 23:30:06 +0900 | ||
Subject: [PATCH 2/3] Fix test cases for wrong use of remap-dir | ||
|
||
--- | ||
test/run-test.sh | 12 +++++++++--- | ||
1 file changed, 9 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/test/run-test.sh b/test/run-test.sh | ||
index 1cedb8d..2b8a412 100644 | ||
--- a/test/run-test.sh | ||
+++ b/test/run-test.sh | ||
@@ -177,7 +177,10 @@ $FCCACHE "$FONTDIR" | ||
sleep 1 | ||
ls -l "$CACHEDIR" > out1 | ||
TESTTMPDIR=$(mktemp -d "$TMPDIR"/fontconfig.XXXXXXXX) | ||
-sed "s!@FONTDIR@!$TESTTMPDIR/fonts! | ||
+# Once font dir is remapped, we could use $FONTDIR as different one in theory. | ||
+# but we don't use it here and to avoid duplicate entries, set the non-existing | ||
+# directory here. | ||
+sed "s!@FONTDIR@!$FONTDIR/a! | ||
s!@REMAPDIR@!<remap-dir as-path="'"'"$FONTDIR"'"'">$TESTTMPDIR/fonts</remap-dir>! | ||
s!@CACHEDIR@!$TESTTMPDIR/cache.dir!" < "$TESTDIR"/fonts.conf.in > bind-fonts.conf | ||
echo "$BWRAP --bind / / --bind \"$CACHEDIR\" \"$TESTTMPDIR\"/cache.dir --bind \"$FONTDIR\" \"$TESTTMPDIR\"/fonts --bind .. \"$TESTTMPDIR\"/build --dev-bind /dev /dev --setenv FONTCONFIG_FILE \"$TESTTMPDIR\"/build/test/bind-fonts.conf \"$TESTTMPDIR\"/build/fc-match/fc-match\"$EXEEXT\" -f \"%{file}\n\" \":foundry=Misc\" > xxx" | ||
@@ -273,7 +276,10 @@ sleep 1 | ||
(cd "$CACHEDIR"; ls -1 --color=no ./*cache*) > out1 | ||
TESTTMPDIR=$(mktemp -d "$TMPDIR"/fontconfig.XXXXXXXX) | ||
mkdir -p "$TESTTMPDIR"/cache.dir | ||
-sed "s!@FONTDIR@!$TESTTMPDIR/fonts! | ||
+# Once font dir is remapped, we could use $FONTDIR as different one in theory. | ||
+# but we don't use it here and to avoid duplicate entries, set the non-existing | ||
+# directory here. | ||
+sed "s!@FONTDIR@!$FONTDIR/a! | ||
s!@REMAPDIR@!<remap-dir as-path="'"'"$FONTDIR"'"'">$TESTTMPDIR/fonts</remap-dir>! | ||
s!@CACHEDIR@!$TESTTMPDIR/cache.dir!" < "$TESTDIR"/fonts.conf.in > bind-fonts.conf | ||
$BWRAP --bind / / --bind "$FONTDIR" "$TESTTMPDIR"/fonts --bind .. "$TESTTMPDIR"/build --dev-bind /dev /dev --setenv FONTCONFIG_FILE "$TESTTMPDIR"/build/test/bind-fonts.conf "$TESTTMPDIR"/build/fc-cache/fc-cache"$EXEEXT" "$TESTTMPDIR"/fonts | ||
-- | ||
2.37.3 | ||
|
Oops, something went wrong.