From 0add3463d19ae0fe91879f59890e0d8e42b3a868 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 28 Nov 2020 12:00:04 +0900 Subject: [PATCH 01/56] New upstream release. --- .gitignore | 1 + fontconfig.spec | 20 +++++--------------- sources | 2 +- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 807c56c..77b0370 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.13.1.tar.bz2 /fontconfig-2.13.91.tar.xz /fontconfig-2.13.92.tar.xz +/fontconfig-2.13.93.tar.xz diff --git a/fontconfig.spec b/fontconfig.spec index 11992ee..8ab88da 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.13.92 -Release: 12%{?dist} +Version: 2.13.93 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -15,22 +15,10 @@ Source: http://fontconfig.org/release/%{name}-%{version}.tar.xz URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf Source2: fc-cache -Source3: FcConfigGetFilename.3 # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch -Patch1: %{name}-required-freetype-version.patch -Patch2: %{name}-score-hint-on-match.patch -Patch3: %{name}-fix-1744377.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch -Patch5: %{name}-sysroot.patch -Patch6: %{name}-read-latest-cache.patch -Patch7: %{name}-mt.patch -Patch8: %{name}-fix-test.patch -Patch9: %{name}-fix-assertion.patch -Patch10: %{name}-fix-dtd.patch -Patch11: %{name}-fix-dtd-id.patch -Patch12: %{name}-0-timestamp-dir-on-sb.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -78,7 +66,6 @@ which is useful for developing applications that uses fontconfig. %prep %autosetup -p1 -cp %{SOURCE3} $RPM_BUILD_DIR/%{name}-%{version}/doc %build # We don't want to rebuild the docs, but we want to install the included ones. @@ -190,6 +177,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Sat Nov 28 2020 Akira TAGOH - 2.13.93-1 +- New upstream release. + * Mon Jul 27 2020 Fedora Release Engineering - 2.13.92-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 7eee036..564df99 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.13.92.tar.xz) = 3c8c75ac51cb45531aa02654ce6e32e6db2650679531d2c84df00dd38425c27344599484b2625983ec55b1ba7bab3be8464d7eb75286ea3a0e97a361d2ae91d4 +SHA512 (fontconfig-2.13.93.tar.xz) = 1ba119ea3faba662e108df6fce22f242eb2b7c5ec087159ca0cb76944991b19563f744c181263343941c50547bc0c73c6437d5380df09b5029facaab80465b58 From bea6e439c64c9c9021f016772cb1818f5de5bcde Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 28 Nov 2020 12:12:35 +0900 Subject: [PATCH 02/56] Add python3 to BR --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 8ab88da..2745f2e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -24,7 +24,7 @@ BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel BuildRequires: autoconf automake libtool gettext -BuildRequires: gperf +BuildRequires: gperf python3 Requires: fonts-filesystem freetype # Register DTD system-wide to make validation work by default From e1c4b435e6249c0075a4ba047e850958de646dae Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 28 Nov 2020 12:31:31 +0900 Subject: [PATCH 03/56] Trying to fix the build issue --- fontconfig.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 2745f2e..e89c52d 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -24,7 +24,8 @@ BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel BuildRequires: autoconf automake libtool gettext -BuildRequires: gperf python3 +BuildRequires: gperf +BuildRequires: docbook-utils docbook-utils-pdf Requires: fonts-filesystem freetype # Register DTD system-wide to make validation work by default @@ -68,9 +69,6 @@ which is useful for developing applications that uses fontconfig. %autosetup -p1 %build -# We don't want to rebuild the docs, but we want to install the included ones. -export HASDOCBOOK=no - autoreconf %configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ --enable-libxml2 \ From a7c1f3c46b84fea1c68387200b2d237da7460e84 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 28 Nov 2020 12:42:05 +0900 Subject: [PATCH 04/56] Disable a test case which requires network connectivity --- ...config-disable-network-required-test.patch | 33 +++++++++++++++++++ fontconfig.spec | 1 + 2 files changed, 34 insertions(+) create mode 100644 fontconfig-disable-network-required-test.patch diff --git a/fontconfig-disable-network-required-test.patch b/fontconfig-disable-network-required-test.patch new file mode 100644 index 0000000..8481f39 --- /dev/null +++ b/fontconfig-disable-network-required-test.patch @@ -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 + diff --git a/fontconfig.spec b/fontconfig.spec index e89c52d..cb4d4ae 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -19,6 +19,7 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch +Patch5: %{name}-disable-network-required-test.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} From 57609aa1db1f951e93d7a76730a6fcbb8978270a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 30 Nov 2020 17:58:12 +0900 Subject: [PATCH 05/56] Fix file conflicts. --- fontconfig.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index cb4d4ae..ed4128e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.93 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -70,6 +70,12 @@ which is useful for developing applications that uses fontconfig. %autosetup -p1 %build +# We don't want to rebuild the docs, but we want to install the included ones. +export HASDOCBOOK=no + +for i in doc/*.fncs; do + touch -r $i ${i//.fncs/.sgml} +done autoreconf %configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ --enable-libxml2 \ @@ -90,6 +96,10 @@ ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontc mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* . rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/ +# adjust the timestamp to avoid conflicts for multilib +touch -r doc/fontconfig-user.sgml fontconfig-user.txt +touch -r doc/fontconfig-user.sgml fontconfig-user.html + # rename fc-cache binary mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa_bits} @@ -176,6 +186,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Nov 30 2020 Akira TAGOH - 2.13.93-2 +- Fix file conflicts. + * Sat Nov 28 2020 Akira TAGOH - 2.13.93-1 - New upstream release. From df8fa2ceccadaa9ea16ef3869bfb2906a88ed6b7 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 4 Dec 2020 11:12:03 +0900 Subject: [PATCH 06/56] Add back fullname property at the scan matching phase for the backward compatibility. Resolves: rhbz#1902881 --- fontconfig-fix-fullname-prop.patch | 72 ++++++++++++++++++++++++++++++ fontconfig.spec | 7 ++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-fullname-prop.patch diff --git a/fontconfig-fix-fullname-prop.patch b/fontconfig-fix-fullname-prop.patch new file mode 100644 index 0000000..2650279 --- /dev/null +++ b/fontconfig-fix-fullname-prop.patch @@ -0,0 +1,72 @@ +diff --git a/src/fcfreetype.c b/src/fcfreetype.c +index a7809cbb..4b545bf2 100644 +--- a/src/fcfreetype.c ++++ b/src/fcfreetype.c +@@ -1087,6 +1087,8 @@ static const FT_UShort nameid_order[] = { + TT_NAME_ID_WWS_FAMILY, + TT_NAME_ID_TYPOGRAPHIC_FAMILY, + TT_NAME_ID_FONT_FAMILY, ++ TT_NAME_ID_MAC_FULL_NAME, ++ TT_NAME_ID_FULL_NAME, + TT_NAME_ID_WWS_SUBFAMILY, + TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY, + TT_NAME_ID_FONT_SUBFAMILY, +@@ -1222,6 +1224,8 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, + int nfamily_lang = 0; + int nstyle = 0; + int nstyle_lang = 0; ++ int nfullname = 0; ++ int nfullname_lang = 0; + unsigned int p, n; + + FcChar8 *style = 0; +@@ -1443,7 +1447,8 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, + * and treat the instance's nameid as FONT_SUBFAMILY. + * Postscript name is automatically handled by FreeType. */ + if (nameid == TT_NAME_ID_WWS_SUBFAMILY || +- nameid == TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY) ++ nameid == TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY || ++ nameid == TT_NAME_ID_FULL_NAME) + continue; + + if (nameid == TT_NAME_ID_FONT_SUBFAMILY) +@@ -1474,6 +1479,20 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, + np = &nfamily; + nlangp = &nfamily_lang; + break; ++ case TT_NAME_ID_MAC_FULL_NAME: ++ case TT_NAME_ID_FULL_NAME: ++ if (variable) ++ break; ++ if (FcDebug () & FC_DBG_SCANV) ++ printf ("found full (n %2d p %d e %d l 0x%04x)", ++ sname.name_id, sname.platform_id, ++ sname.encoding_id, sname.language_id); ++ ++ obj = FC_FULLNAME_OBJECT; ++ objlang = FC_FULLNAMELANG_OBJECT; ++ np = &nfullname; ++ nlangp = &nfullname_lang; ++ break; + case TT_NAME_ID_WWS_SUBFAMILY: + case TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY: + case TT_NAME_ID_FONT_SUBFAMILY: +diff --git a/src/fcopentype.c b/src/fcopentype.c +index 9382a1ba..59cce456 100644 +--- a/src/fcopentype.c ++++ b/src/fcopentype.c +@@ -76,12 +76,14 @@ FcPatternAddFullname (FcPattern *pat) + FcStrBufChar (&sbuf, ' '); + FcStrBufString (&sbuf, style); + } ++ FcPatternObjectDel (pat, FC_FULLNAME_OBJECT); + if (!FcPatternObjectAddString (pat, FC_FULLNAME_OBJECT, FcStrBufDoneStatic (&sbuf))) + { + FcStrBufDestroy (&sbuf); + return FcFalse; + } + FcStrBufDestroy (&sbuf); ++ FcPatternObjectDel (pat, FC_FULLNAMELANG_OBJECT); + if (!FcPatternObjectAddString (pat, FC_FULLNAMELANG_OBJECT, (const FcChar8 *) "en")) + return FcFalse; + } diff --git a/fontconfig.spec b/fontconfig.spec index ed4128e..60ff2d7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.93 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -20,6 +20,7 @@ Source2: fc-cache Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch +Patch6: %{name}-fix-fullname-prop.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -186,6 +187,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Dec 3 2020 Akira TAGOH - 2.13.93-3 +- Add back fullname property at the scan matching phase for the backward compatibility. + Resolves: rhbz#1902881 + * Mon Nov 30 2020 Akira TAGOH - 2.13.93-2 - Fix file conflicts. From 26105d265d1cae19670ba8037cb22471f6d1aedb Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 18 Dec 2020 22:47:43 +0000 Subject: [PATCH 07/56] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- fontconfig.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/fontconfig.spec b/fontconfig.spec index 60ff2d7..42bd073 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -28,6 +28,7 @@ BuildRequires: fontpackages-devel BuildRequires: autoconf automake libtool gettext BuildRequires: gperf BuildRequires: docbook-utils docbook-utils-pdf +BuildRequires: make Requires: fonts-filesystem freetype # Register DTD system-wide to make validation work by default From cec02510f826e9aa484f72cdfcbc32fc4fbe33ac Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 23 Dec 2020 22:12:12 +0900 Subject: [PATCH 08/56] cherry pick some upstream patches Skip leading white space in style. Remove abort from FcCompareSize. Fix memory leaks Check qual and compare for family tests. - --- fontconfig-fix-fullname-prop.patch | 72 --- fontconfig-hotfix.patch | 772 +++++++++++++++++++++++++++++ fontconfig.spec | 11 +- 3 files changed, 781 insertions(+), 74 deletions(-) delete mode 100644 fontconfig-fix-fullname-prop.patch create mode 100644 fontconfig-hotfix.patch diff --git a/fontconfig-fix-fullname-prop.patch b/fontconfig-fix-fullname-prop.patch deleted file mode 100644 index 2650279..0000000 --- a/fontconfig-fix-fullname-prop.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/src/fcfreetype.c b/src/fcfreetype.c -index a7809cbb..4b545bf2 100644 ---- a/src/fcfreetype.c -+++ b/src/fcfreetype.c -@@ -1087,6 +1087,8 @@ static const FT_UShort nameid_order[] = { - TT_NAME_ID_WWS_FAMILY, - TT_NAME_ID_TYPOGRAPHIC_FAMILY, - TT_NAME_ID_FONT_FAMILY, -+ TT_NAME_ID_MAC_FULL_NAME, -+ TT_NAME_ID_FULL_NAME, - TT_NAME_ID_WWS_SUBFAMILY, - TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY, - TT_NAME_ID_FONT_SUBFAMILY, -@@ -1222,6 +1224,8 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, - int nfamily_lang = 0; - int nstyle = 0; - int nstyle_lang = 0; -+ int nfullname = 0; -+ int nfullname_lang = 0; - unsigned int p, n; - - FcChar8 *style = 0; -@@ -1443,7 +1447,8 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, - * and treat the instance's nameid as FONT_SUBFAMILY. - * Postscript name is automatically handled by FreeType. */ - if (nameid == TT_NAME_ID_WWS_SUBFAMILY || -- nameid == TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY) -+ nameid == TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY || -+ nameid == TT_NAME_ID_FULL_NAME) - continue; - - if (nameid == TT_NAME_ID_FONT_SUBFAMILY) -@@ -1474,6 +1479,20 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, - np = &nfamily; - nlangp = &nfamily_lang; - break; -+ case TT_NAME_ID_MAC_FULL_NAME: -+ case TT_NAME_ID_FULL_NAME: -+ if (variable) -+ break; -+ if (FcDebug () & FC_DBG_SCANV) -+ printf ("found full (n %2d p %d e %d l 0x%04x)", -+ sname.name_id, sname.platform_id, -+ sname.encoding_id, sname.language_id); -+ -+ obj = FC_FULLNAME_OBJECT; -+ objlang = FC_FULLNAMELANG_OBJECT; -+ np = &nfullname; -+ nlangp = &nfullname_lang; -+ break; - case TT_NAME_ID_WWS_SUBFAMILY: - case TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY: - case TT_NAME_ID_FONT_SUBFAMILY: -diff --git a/src/fcopentype.c b/src/fcopentype.c -index 9382a1ba..59cce456 100644 ---- a/src/fcopentype.c -+++ b/src/fcopentype.c -@@ -76,12 +76,14 @@ FcPatternAddFullname (FcPattern *pat) - FcStrBufChar (&sbuf, ' '); - FcStrBufString (&sbuf, style); - } -+ FcPatternObjectDel (pat, FC_FULLNAME_OBJECT); - if (!FcPatternObjectAddString (pat, FC_FULLNAME_OBJECT, FcStrBufDoneStatic (&sbuf))) - { - FcStrBufDestroy (&sbuf); - return FcFalse; - } - FcStrBufDestroy (&sbuf); -+ FcPatternObjectDel (pat, FC_FULLNAMELANG_OBJECT); - if (!FcPatternObjectAddString (pat, FC_FULLNAMELANG_OBJECT, (const FcChar8 *) "en")) - return FcFalse; - } diff --git a/fontconfig-hotfix.patch b/fontconfig-hotfix.patch new file mode 100644 index 0000000..e506fde --- /dev/null +++ b/fontconfig-hotfix.patch @@ -0,0 +1,772 @@ +From 93c93689f5da4ceaa675e006df63283e25b91d49 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Fri, 4 Dec 2020 18:18:03 +0900 +Subject: [PATCH 01/12] Add back fullname property at scan matching phase + +There seems to be a lot of config files using fullname property in the world. +To keep the backward compatibility, fullname property is back to a cache at +the scan matching phase but will be rebuilt once it is done according to family +and style property in the pattern no matter what changes one made in fullname +property during that. + +Ref. https://bugzilla.redhat.com/show_bug.cgi?id=1902881 +--- + src/fcfreetype.c | 21 ++++++++++++++++++++- + src/fcopentype.c | 2 ++ + 2 files changed, 22 insertions(+), 1 deletion(-) + +diff --git a/src/fcfreetype.c b/src/fcfreetype.c +index a7809cb..4b545bf 100644 +--- a/src/fcfreetype.c ++++ b/src/fcfreetype.c +@@ -1087,6 +1087,8 @@ static const FT_UShort nameid_order[] = { + TT_NAME_ID_WWS_FAMILY, + TT_NAME_ID_TYPOGRAPHIC_FAMILY, + TT_NAME_ID_FONT_FAMILY, ++ TT_NAME_ID_MAC_FULL_NAME, ++ TT_NAME_ID_FULL_NAME, + TT_NAME_ID_WWS_SUBFAMILY, + TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY, + TT_NAME_ID_FONT_SUBFAMILY, +@@ -1222,6 +1224,8 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, + int nfamily_lang = 0; + int nstyle = 0; + int nstyle_lang = 0; ++ int nfullname = 0; ++ int nfullname_lang = 0; + unsigned int p, n; + + FcChar8 *style = 0; +@@ -1443,7 +1447,8 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, + * and treat the instance's nameid as FONT_SUBFAMILY. + * Postscript name is automatically handled by FreeType. */ + if (nameid == TT_NAME_ID_WWS_SUBFAMILY || +- nameid == TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY) ++ nameid == TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY || ++ nameid == TT_NAME_ID_FULL_NAME) + continue; + + if (nameid == TT_NAME_ID_FONT_SUBFAMILY) +@@ -1474,6 +1479,20 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, + np = &nfamily; + nlangp = &nfamily_lang; + break; ++ case TT_NAME_ID_MAC_FULL_NAME: ++ case TT_NAME_ID_FULL_NAME: ++ if (variable) ++ break; ++ if (FcDebug () & FC_DBG_SCANV) ++ printf ("found full (n %2d p %d e %d l 0x%04x)", ++ sname.name_id, sname.platform_id, ++ sname.encoding_id, sname.language_id); ++ ++ obj = FC_FULLNAME_OBJECT; ++ objlang = FC_FULLNAMELANG_OBJECT; ++ np = &nfullname; ++ nlangp = &nfullname_lang; ++ break; + case TT_NAME_ID_WWS_SUBFAMILY: + case TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY: + case TT_NAME_ID_FONT_SUBFAMILY: +diff --git a/src/fcopentype.c b/src/fcopentype.c +index 9382a1b..59cce45 100644 +--- a/src/fcopentype.c ++++ b/src/fcopentype.c +@@ -76,12 +76,14 @@ FcPatternAddFullname (FcPattern *pat) + FcStrBufChar (&sbuf, ' '); + FcStrBufString (&sbuf, style); + } ++ FcPatternObjectDel (pat, FC_FULLNAME_OBJECT); + if (!FcPatternObjectAddString (pat, FC_FULLNAME_OBJECT, FcStrBufDoneStatic (&sbuf))) + { + FcStrBufDestroy (&sbuf); + return FcFalse; + } + FcStrBufDestroy (&sbuf); ++ FcPatternObjectDel (pat, FC_FULLNAMELANG_OBJECT); + if (!FcPatternObjectAddString (pat, FC_FULLNAMELANG_OBJECT, (const FcChar8 *) "en")) + return FcFalse; + } +-- +2.29.2 + +From 3d6926380dc3c8597dc2fd9d34087da9b39dfdd9 Mon Sep 17 00:00:00 2001 +From: Ben Wagner +Date: Fri, 4 Dec 2020 15:00:08 -0500 +Subject: [PATCH 02/12] Skip leading whitespace in style name. + +Found by Clang-Tidy. The intent seems to have been to skip all leading +whitespace in the 'style' string, but instead this loop was an odd +looking no-op. Remove the 'break' from the loop so that it will +continue until end of string or a non-space character is found. +--- + src/fcopentype.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/fcopentype.c b/src/fcopentype.c +index 59cce45..39c05e9 100644 +--- a/src/fcopentype.c ++++ b/src/fcopentype.c +@@ -66,8 +66,7 @@ FcPatternAddFullname (FcPattern *pat) + if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch) + return FcFalse; + len = strlen ((const char *) style); +- for (i = 0; style[i] != 0 && isspace (style[i]); i++) +- break; ++ for (i = 0; style[i] != 0 && isspace (style[i]); i++); + memcpy (style, &style[i], len - i); + FcStrBufInit (&sbuf, NULL, 0); + FcStrBufString (&sbuf, family); +-- +2.29.2 + +From 97d541855429629f40a0accdd2b06b7dce7ba2db Mon Sep 17 00:00:00 2001 +From: Ben Wagner +Date: Fri, 4 Dec 2020 15:42:28 -0500 +Subject: [PATCH 03/12] Remove abort from FcCompareSize. + +There doesn't appear to be a good reason to abort when 'v1' has type +FcTypeRange. If there does turn out to be a good reason for this then it +should be better documented and the code for handling this case removed. +At worst it seems -1 should be returned as it is for other unknown +types. It is possible this is left over debug code from the initial +implementation. +--- + src/fcmatch.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/fcmatch.c b/src/fcmatch.c +index df6db71..53c3b0e 100644 +--- a/src/fcmatch.c ++++ b/src/fcmatch.c +@@ -235,7 +235,6 @@ FcCompareSize (const FcValue *v1, const FcValue *v2, FcValue *bestValue) + b1 = e1 = value1.u.d; + break; + case FcTypeRange: +- abort(); + b1 = value1.u.r->begin; + e1 = value1.u.r->end; + break; +-- +2.29.2 + +From d55eaa6b3148691f32ec19c5c36dfc8818a6385f Mon Sep 17 00:00:00 2001 +From: Ben Wagner +Date: Fri, 11 Dec 2020 11:54:43 -0500 +Subject: [PATCH 07/12] Fix leaks in fcxml.c, fc-match.c, and tests. + +Fix leaks reported by AddressSanitizer when running 'make check'. +--- + fc-match/fc-match.c | 8 +++++++- + src/fcxml.c | 4 +++- + test/test-bz106632.c | 8 ++++++++ + test/test-issue180.c | 4 +++- + 4 files changed, 21 insertions(+), 3 deletions(-) + +diff --git a/fc-match/fc-match.c b/fc-match/fc-match.c +index 4362ec1..f31047e 100644 +--- a/fc-match/fc-match.c ++++ b/fc-match/fc-match.c +@@ -117,6 +117,7 @@ main (int argc, char **argv) + int brief = 0; + int sort = 0, all = 0; + const FcChar8 *format = NULL; ++ const FcChar8 *format_optarg = NULL; + int i; + FcObjectSet *os = 0; + FcFontSet *fs; +@@ -146,7 +147,7 @@ main (int argc, char **argv) + brief = 1; + break; + case 'f': +- format = (FcChar8 *) strdup (optarg); ++ format = format_optarg = (FcChar8 *) strdup (optarg); + break; + case 'V': + fprintf (stderr, "fontconfig version %d.%d.%d\n", +@@ -269,5 +270,10 @@ main (int argc, char **argv) + + FcFini (); + ++ if (format_optarg) { ++ free ((void*)format_optarg); ++ format_optarg = NULL; ++ } ++ + return 0; + } +diff --git a/src/fcxml.c b/src/fcxml.c +index 3f22581..9efe157 100644 +--- a/src/fcxml.c ++++ b/src/fcxml.c +@@ -2307,7 +2307,9 @@ FcParseCacheDir (FcConfigParse *parse) + if (data[0] == 0) + { + FcConfigMessage (parse, FcSevereWarning, "empty cache directory name ignored"); +- return; ++ FcStrFree (data); ++ data = prefix; ++ goto bail; + } + if (prefix) + { +diff --git a/test/test-bz106632.c b/test/test-bz106632.c +index 0f37b9c..c610d73 100644 +--- a/test/test-bz106632.c ++++ b/test/test-bz106632.c +@@ -221,6 +221,7 @@ main (void) + ret = 1; + goto bail; + } ++ FcFontSetDestroy (fs); + fprintf (stderr, "D: Removing %s\n", fontdir); + snprintf (cmd, 512, "sleep 1; rm -f %s%s*; sleep 1", fontdir, FC_DIR_SEPARATOR_S); + (void) system (cmd); +@@ -243,6 +244,8 @@ main (void) + ret = 3; + goto bail; + } ++ FcConfigDestroy (config); ++ + config = FcConfigCreate (); + if (!FcConfigParseAndLoadFromMemory (config, (const FcChar8 *) conf, FcTrue)) + { +@@ -266,6 +269,7 @@ main (void) + ret = 1; + goto bail; + } ++ FcFontSetDestroy (fs); + fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir); + snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir); + (void) system (cmd); +@@ -288,6 +292,8 @@ main (void) + ret = 3; + goto bail; + } ++ FcConfigDestroy (config); ++ + config = FcConfigCreate (); + if (!FcConfigParseAndLoadFromMemory (config, (const FcChar8 *) conf, FcTrue)) + { +@@ -311,6 +317,8 @@ main (void) + ret = 1; + goto bail; + } ++ FcFontSetDestroy (fs); ++ FcConfigDestroy (config); + + bail: + fprintf (stderr, "Cleaning up\n"); +diff --git a/test/test-issue180.c b/test/test-issue180.c +index 2832d3b..9d0795e 100644 +--- a/test/test-issue180.c ++++ b/test/test-issue180.c +@@ -53,7 +53,9 @@ main (void) + fprintf (stderr, "There was one or more cachedirs\n"); + return 1; + } ++ FcStrListDone (l); + FcConfigDestroy (cfg); ++ + cfg = FcConfigCreate (); + if (!FcConfigParseAndLoadFromMemory (cfg, doc2, FcTrue)) + { +@@ -66,7 +68,7 @@ main (void) + fprintf (stderr, "There was one or more cachedirs (with prefix)\n"); + return 1; + } +- ++ FcStrListDone (l); + FcConfigDestroy (cfg); + + return 0; +-- +2.29.2 + +From 5cd11d19dfb2d901e1f6b690ae504d3bf5f5ff69 Mon Sep 17 00:00:00 2001 +From: Ben Wagner +Date: Thu, 10 Dec 2020 14:12:05 -0500 +Subject: [PATCH 08/12] Fix wild frees and leak of fs in test-conf. + +Reported by AddressSanitizer when running test-conf. The `query`, +`result`, and `result_fs` were not initialized to NULL so could result +in a wild free when first initialized. + +The `method` was also not initialized to NULL so comparisons could be +made against random data if it had not yet been assigned. + +The outer `fs` was never destroyed, but is also not used, so remove. +--- + test/test-conf.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/test/test-conf.c b/test/test-conf.c +index d4de21a..6097983 100644 +--- a/test/test-conf.c ++++ b/test/test-conf.c +@@ -158,7 +158,6 @@ static FcBool + run_test (FcConfig *config, json_object *root) + { + json_object *tests; +- FcFontSet *fs; + int i, n, fail = 0; + + if (!json_object_object_get_ex (root, "tests", &tests) || +@@ -167,15 +166,15 @@ run_test (FcConfig *config, json_object *root) + fprintf (stderr, "W: No test cases defined\n"); + return FcFalse; + } +- fs = FcFontSetCreate (); + n = json_object_array_length (tests); + for (i = 0; i < n; i++) + { + json_object *obj = json_object_array_get_idx (tests, i); + json_object_iter iter; +- FcPattern *query, *result; +- FcFontSet *result_fs; +- const char *method; ++ FcPattern *query = NULL; ++ FcPattern *result = NULL; ++ FcFontSet *result_fs = NULL; ++ const char *method = NULL; + + if (json_object_get_type (obj) != json_type_object) + continue; +-- +2.29.2 + +From b35c72dbc7da5b61a84766cfa431c95c1d1b35bd Mon Sep 17 00:00:00 2001 +From: Ben Wagner +Date: Tue, 15 Dec 2020 17:39:05 -0500 +Subject: [PATCH 09/12] Always run-test-conf, but skip if not built. + +The test-conf test requires libjson-c to be available in order to be +built. However, there has been no user indication that additional tests +could be built if the json-c development files were available. + +Continue to not build test-conf if json-c is not available, but do run +the test harness. The test harness is updated to SKIP the test if the +test-conf binary is unavailable. +--- + test/Makefile.am | 2 +- + test/run-test-conf.sh | 6 ++++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/test/Makefile.am b/test/Makefile.am +index 5a998b3..1a9b293 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -101,8 +101,8 @@ if ENABLE_JSONC + check_PROGRAMS += test-conf + test_conf_CFLAGS = $(JSONC_CFLAGS) + test_conf_LDADD = $(top_builddir)/src/libfontconfig.la $(JSONC_LIBS) +-TESTS += run-test-conf.sh + endif ++TESTS += run-test-conf.sh + + check_PROGRAMS += test-bz106618 + test_bz106618_LDADD = $(top_builddir)/src/libfontconfig.la +diff --git a/test/run-test-conf.sh b/test/run-test-conf.sh +index 437bafa..e085e82 100644 +--- a/test/run-test-conf.sh ++++ b/test/run-test-conf.sh +@@ -33,6 +33,12 @@ BUILDTESTDIR=${builddir-"$MyPWD"} + + RUNNER=../test/test-conf$EXEEXT + ++if [ ! -f ${RUNNER} ]; then ++ echo "${RUNNER} not found!\n" ++ echo "Building this test requires libjson-c development files to be available." ++ exit 77 # SKIP ++fi ++ + for i in \ + 60-generic.conf \ + 90-synthetic.conf \ +-- +2.29.2 + +From 921ede9f460fb661146182809557a1da2dd7afd7 Mon Sep 17 00:00:00 2001 +From: Ben Wagner +Date: Tue, 15 Dec 2020 16:30:14 -0500 +Subject: [PATCH 10/12] Fix test-conf string to integer conversion. + +The test-conf build_pattern attempted to convert known constant strings +into integer values. However, it did so by always converting the string +value to an integer if possible and then complaining if the key wasn't +of the expected type. This lead to error messages on "style": "Regular" +since "Regular" was recognized as "weight". + +Instead, only attempt conversion from string to integer if the key is +the name of an object which can take an integer type. This eliminates +the spurious non-fatal errors reported when parsing +test-90-synthetic.json. + +This also fixes an issue where the created value was given the type of +the object found, but the integer field was assigned. Instead, check +that the object type can take an integer and always set the value type +to integer. +--- + test/test-conf.c | 25 ++++++++++++++----------- + 1 file changed, 14 insertions(+), 11 deletions(-) + +diff --git a/test/test-conf.c b/test/test-conf.c +index 6097983..288bb5b 100644 +--- a/test/test-conf.c ++++ b/test/test-conf.c +@@ -69,22 +69,25 @@ build_pattern (json_object *obj) + } + else if (json_object_get_type (iter.val) == json_type_string) + { +- const FcConstant *c = FcNameGetConstant ((const FcChar8 *) json_object_get_string (iter.val)); +- FcBool b; +- +- if (c) ++ const FcObjectType *o = FcNameGetObjectType (iter.key); ++ if (o && (o->type == FcTypeRange || o->type == FcTypeDouble || o->type == FcTypeInteger)) + { +- const FcObjectType *o; +- ++ const FcConstant *c = FcNameGetConstant ((const FcChar8 *) json_object_get_string (iter.val)); ++ if (!c) { ++ fprintf (stderr, "E: value is not a known constant\n"); ++ fprintf (stderr, " key: %s\n", iter.key); ++ fprintf (stderr, " val: %s\n", json_object_get_string (iter.val)); ++ continue; ++ } + if (strcmp (c->object, iter.key) != 0) + { +- fprintf (stderr, "E: invalid object type for const\n"); +- fprintf (stderr, " actual result: %s\n", iter.key); +- fprintf (stderr, " expected result: %s\n", c->object); ++ fprintf (stderr, "E: value is a constant of different object\n"); ++ fprintf (stderr, " key: %s\n", iter.key); ++ fprintf (stderr, " val: %s\n", json_object_get_string (iter.val)); ++ fprintf (stderr, " key implied by value: %s\n", c->object); + continue; + } +- o = FcNameGetObjectType (c->object); +- v.type = o->type; ++ v.type = FcTypeInteger; + v.u.i = c->value; + } + else if (strcmp (json_object_get_string (iter.val), "DontCare") == 0) +-- +2.29.2 + +From df29933e1a06b7aa7af229bd7cd03c62d957f15f Mon Sep 17 00:00:00 2001 +From: Szunti +Date: Sun, 6 Dec 2020 12:52:44 +0100 +Subject: [PATCH 11/12] Check qual and compare for family tests + +Fixes #267. Hash table lookups assumed qual="any" compare="eq". +Add a test too. +--- + src/fccfg.c | 16 ++- + test/Makefile.am | 4 + + test/meson.build | 1 + + test/test-family-matching.c | 228 ++++++++++++++++++++++++++++++++++++ + 4 files changed, 248 insertions(+), 1 deletion(-) + create mode 100644 test/test-family-matching.c + +diff --git a/src/fccfg.c b/src/fccfg.c +index 7b857bf..00a94e5 100644 +--- a/src/fccfg.c ++++ b/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)) +diff --git a/test/Makefile.am b/test/Makefile.am +index 1a9b293..30d8c2a 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -167,6 +167,10 @@ check_PROGRAMS += test-issue180 + test_issue180_LDADD = $(top_builddir)/src/libfontconfig.la + TESTS += test-issue180 + ++check_PROGRAMS += test-family-matching ++test_family_matching_LDADD = $(top_builddir)/src/libfontconfig.la ++TESTS += test-family-matching ++ + EXTRA_DIST=run-test.sh run-test-conf.sh $(LOG_COMPILER) $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names + + CLEANFILES = \ +diff --git a/test/meson.build b/test/meson.build +index 96b30a9..59de427 100644 +--- a/test/meson.build ++++ b/test/meson.build +@@ -6,6 +6,7 @@ tests = [ + ['test-bz106618.c'], + ['test-bz1744377.c'], + ['test-issue180.c'], ++ ['test-family-matching.c'], + ] + + if host_machine.system() != 'windows' +diff --git a/test/test-family-matching.c b/test/test-family-matching.c +new file mode 100644 +index 0000000..9fab36c +--- /dev/null ++++ b/test/test-family-matching.c +@@ -0,0 +1,228 @@ ++/* ++ * fontconfig/test/test-family-matching.c ++ * ++ * Copyright © 2020 Zoltan Vandrus ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of the author(s) not be used in ++ * advertising or publicity pertaining to distribution of the software without ++ * specific, written prior permission. The authors make no ++ * representations about the suitability of this software for any purpose. It ++ * is provided "as is" without express or implied warranty. ++ * ++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO ++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR ++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, ++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ++ * PERFORMANCE OF THIS SOFTWARE. ++ */ ++#include ++#include ++#include ++ ++#define FC_TEST_RESULT "testresult" ++ ++typedef enum _TestMatchResult { ++ TestMatch, ++ TestNoMatch, ++ TestMatchError ++} TestMatchResult; ++ ++typedef enum _TestResult { ++ TestPassed, ++ TestFailed, ++ TestError ++} TestResult; ++ ++static TestMatchResult ++TestMatchPattern (const char *test, FcPattern *p) ++{ ++ const FcChar8 *xml_pre = (const FcChar8 *) "" ++ "\n" ++ " \n" ++ ""; ++ ++ const FcChar8 *xml_post = (const FcChar8 *) "" ++ " \n" ++ " true\n" ++ " \n" ++ " \n" ++ "\n" ++ ""; ++ ++ FcChar8 *xml, *concat; ++ FcConfig *cfg; ++ FcResult result; ++ FcBool dummy; ++ TestResult ret = TestMatchError; ++ ++ FcPattern *pat = FcPatternDuplicate (p); ++ if (!pat) ++ { ++ fprintf (stderr, "Unable to duplicate pattern.\n"); ++ goto bail0; ++ } ++ ++ concat = FcStrPlus (xml_pre, (const FcChar8 *) test); ++ if (!concat) ++ { ++ fprintf (stderr, "Concatenation failed.\n"); ++ goto bail0; ++ } ++ ++ xml = FcStrPlus (concat, xml_post); ++ FcStrFree (concat); ++ if (!xml) ++ { ++ fprintf (stderr, "Concatenation failed.\n"); ++ goto bail0; ++ } ++ ++ cfg = FcConfigCreate (); ++ if (!cfg) ++ { ++ fprintf (stderr, "Unable to create a new empty config.\n"); ++ return TestMatchError; ++ } ++ ++ if (!FcConfigParseAndLoadFromMemory (cfg, xml, FcTrue)) ++ { ++ fprintf (stderr, "Unable to load a config from memory.\n"); ++ goto bail1; ++ } ++ ++ if (!FcConfigSubstitute (cfg, pat, FcMatchPattern)) ++ { ++ fprintf (stderr, "Unable to substitute config.\n"); ++ goto bail1; ++ } ++ ++ result = FcPatternGetBool (pat, FC_TEST_RESULT, 0, &dummy); ++ switch (result) { ++ case FcResultMatch: ++ ret = TestMatch; ++ break; ++ case FcResultNoMatch: ++ ret = TestNoMatch; ++ break; ++ default: ++ fprintf (stderr, "Unable to check pattern.\n"); ++ break; ++ } ++ ++bail1: ++ FcConfigDestroy (cfg); ++bail0: ++ FcPatternDestroy (pat); ++ return ret; ++} ++ ++static TestResult ++TestShouldMatchPattern(const char* test, FcPattern *pat, int negate) ++{ ++ switch (TestMatchPattern (test, pat)) { ++ case TestMatch: ++ if (!negate) { ++ return TestPassed; ++ } ++ else ++ { ++ printf ("Following test unexpectedly matched:\n%s", test); ++ printf ("on\n"); ++ FcPatternPrint (pat); ++ return TestFailed; ++ } ++ break; ++ case TestNoMatch: ++ if (!negate) { ++ printf ("Following test should have matched:\n%s", test); ++ printf ("on\n"); ++ FcPatternPrint (pat); ++ return TestFailed; ++ } ++ else ++ { ++ return TestPassed; ++ } ++ break; ++ case TestMatchError: ++ return TestError; ++ break; ++ default: ++ fprintf (stderr, "This shouldn't have been reached.\n"); ++ return TestError; ++ } ++} ++ ++#define MAX(a,b) ((a) > (b) ? (a) : (b)) ++ ++static TestResult ++UpdateResult (TestResult* res, TestResult resNew) ++{ ++ *res = MAX(*res, resNew); ++ return *res; ++} ++ ++static TestResult ++TestFamily (void) ++{ ++ const char *test; ++ TestResult res = TestPassed; ++ ++ FcPattern *pat = FcPatternBuild (NULL, ++ FC_FAMILY, FcTypeString, "family1", ++ FC_FAMILY, FcTypeString, "family2", ++ FC_FAMILY, FcTypeString, "family3", ++ NULL); ++ ++ if (!pat) ++ { ++ fprintf (stderr, "Unable to build pattern.\n"); ++ return TestError; ++ } ++ ++ #define SHOULD_MATCH(p,t) \ ++ UpdateResult (&res, TestShouldMatchPattern (t, p, 0)) ++ #define SHOULD_NOT_MATCH(p,t) \ ++ UpdateResult (&res, TestShouldMatchPattern (t, p, 1)) ++ ++ test = "\n" ++ " foo\n" ++ "\n" ++ ""; ++ SHOULD_MATCH(pat, test); ++ ++ test = "" ++ "\n" ++ " family2\n" ++ "\n" ++ ""; ++ SHOULD_NOT_MATCH(pat, test); ++ ++ test = "" ++ "\n" ++ " family3\n" ++ "\n" ++ ""; ++ SHOULD_MATCH(pat, test); ++ ++ test = "" ++ "\n" ++ " foo\n" ++ "\n" ++ ""; ++ SHOULD_NOT_MATCH(pat, test); ++ ++ return res; ++} ++ ++int ++main (void) ++{ ++ return (TestFamily ()); ++} +-- +2.29.2 + diff --git a/fontconfig.spec b/fontconfig.spec index 42bd073..9928dc6 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.93 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -20,7 +20,7 @@ Source2: fc-cache Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch -Patch6: %{name}-fix-fullname-prop.patch +Patch6: %{name}-hotfix.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -188,6 +188,13 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Dec 23 2020 Akira TAGOH - 2.13.93-4 +- cherry pick some upstream patches + - Skip leading white space in style. + - Remove abort from FcCompareSize. + - Fix memory leaks + - Check qual and compare for family tests. +- * Thu Dec 3 2020 Akira TAGOH - 2.13.93-3 - Add back fullname property at the scan matching phase for the backward compatibility. Resolves: rhbz#1902881 From 20ec3d803f4df6a0676329424259ffc235154e8a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 05:46:44 +0000 Subject: [PATCH 09/56] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 9928dc6..3b876eb 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.93 -Release: 4%{?dist} +Release: 5%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -188,6 +188,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 2.13.93-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Dec 23 2020 Akira TAGOH - 2.13.93-4 - cherry pick some upstream patches - Skip leading white space in style. From 5eb83f78c30bebf513d2e4ddb769761381066b75 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 25 Mar 2021 12:54:23 +0900 Subject: [PATCH 10/56] Fix postun scriptlet to remove the entry from xml catalog. --- fontconfig.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 3b876eb..38a5d9e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.93 -Release: 5%{?dist} +Release: 6%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -148,7 +148,7 @@ fi %postun if [ $1 == 0 ] && [ -e %{_sysconfdir}/xml/catalog ]; then - %{_bindir}/xmlcatalog --noout --del "urn:fontconfig:fonts.dtd" + %{_bindir}/xmlcatalog --noout --del "urn:fontconfig:fonts.dtd" %{_sysconfdir}/xml/catalog fi %files -f %{name}.lang @@ -188,6 +188,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Mar 25 2021 Akira TAGOH - 2.13.93-6 +- Fix postun scriptlet to remove the entry from xml catalog. + * Tue Jan 26 2021 Fedora Release Engineering - 2.13.93-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 565d0e4aa3a1abe7ba7f06e1de97390f4c8fa728 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 29 Jun 2021 00:44:07 +0900 Subject: [PATCH 11/56] New upstream release. --- .gitignore | 1 + FcConfigGetFilename.3 | 25 - fontconfig-0-timestamp-dir-on-sb.patch | 55 - fontconfig-fix-1744377.patch | 122 -- fontconfig-fix-assertion.patch | 144 -- fontconfig-fix-dtd-id.patch | 490 ------- fontconfig-fix-dtd.patch | 26 - fontconfig-fix-test.patch | 41 - fontconfig-hotfix.patch | 772 ----------- fontconfig-mt.patch | 1439 -------------------- fontconfig-read-latest-cache.patch | 228 ---- fontconfig-required-freetype-version.patch | 14 - fontconfig-score-hint-on-match.patch | 36 - fontconfig-sysroot.patch | 285 ---- fontconfig.spec | 8 +- sources | 1 + 16 files changed, 7 insertions(+), 3680 deletions(-) delete mode 100644 FcConfigGetFilename.3 delete mode 100644 fontconfig-0-timestamp-dir-on-sb.patch delete mode 100644 fontconfig-fix-1744377.patch delete mode 100644 fontconfig-fix-assertion.patch delete mode 100644 fontconfig-fix-dtd-id.patch delete mode 100644 fontconfig-fix-dtd.patch delete mode 100644 fontconfig-fix-test.patch delete mode 100644 fontconfig-hotfix.patch delete mode 100644 fontconfig-mt.patch delete mode 100644 fontconfig-read-latest-cache.patch delete mode 100644 fontconfig-required-freetype-version.patch delete mode 100644 fontconfig-score-hint-on-match.patch delete mode 100644 fontconfig-sysroot.patch diff --git a/.gitignore b/.gitignore index 77b0370..d3540f6 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.13.91.tar.xz /fontconfig-2.13.92.tar.xz /fontconfig-2.13.93.tar.xz +/fontconfig-2.13.94.tar.xz diff --git a/FcConfigGetFilename.3 b/FcConfigGetFilename.3 deleted file mode 100644 index 9450199..0000000 --- a/FcConfigGetFilename.3 +++ /dev/null @@ -1,25 +0,0 @@ -.\" auto-generated by docbook2man-spec from docbook-utils package -.TH "FcConfigGetFilename" "3" "27 1月 2020" "Fontconfig 2.13.91" "" -.SH NAME -FcConfigGetFilename \- Find a config file -.SH SYNOPSIS -.nf -\fB#include -.sp -FcChar8 * FcConfigGetFilename (FcConfig *\fIconfig\fB, const FcChar8 *\fIname\fB); -.fi\fR -.SH "DESCRIPTION" -.PP -Given the specified external entity name, return the associated filename. -This provides applications a way to convert various configuration file -references into filename form. -.PP -A null or empty \fIname\fR indicates that the default configuration file should -be used; which file this references can be overridden with the -FONTCONFIG_FILE environment variable. Next, if the name starts with \fI~\fR, it -refers to a file in the current users home directory. Otherwise if the name -doesn't start with '/', it refers to a file in the default configuration -directory; the built-in default directory can be overridden with the -FONTCONFIG_PATH environment variable. -.PP -The result of this function is affected by the FONTCONFIG_SYSROOT environment variable or equivalent functionality. diff --git a/fontconfig-0-timestamp-dir-on-sb.patch b/fontconfig-0-timestamp-dir-on-sb.patch deleted file mode 100644 index cfbc206..0000000 --- a/fontconfig-0-timestamp-dir-on-sb.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff --git a/src/fccache.c b/src/fccache.c -index 2d398c73..7139b082 100644 ---- a/src/fccache.c -+++ b/src/fccache.c -@@ -845,7 +845,7 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat) - FcCacheDir (cache), cache->checksum, (int) dir_stat->st_mtime); - #endif - -- return cache->checksum == (int) dir_stat->st_mtime && fnano; -+ return dir_stat->st_mtime == 0 || (cache->checksum == (int) dir_stat->st_mtime && fnano); - } - - static FcBool -@@ -1041,17 +1041,39 @@ static FcBool - FcDirCacheMapHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *latest_cache_mtime, void *closure) - { - FcCache *cache = FcDirCacheMapFd (config, fd, fd_stat, dir_stat); -- struct timeval cache_mtime; -+ struct timeval cache_mtime, zero_mtime = { 0, 0}, dir_mtime; - - if (!cache) - return FcFalse; - cache_mtime.tv_sec = fd_stat->st_mtime; -+ dir_mtime.tv_sec = dir_stat->st_mtime; - #ifdef HAVE_STRUCT_STAT_ST_MTIM - cache_mtime.tv_usec = fd_stat->st_mtim.tv_nsec / 1000; -+ dir_mtime.tv_usec = dir_stat->st_mtim.tv_nsec / 1000; - #else - cache_mtime.tv_usec = 0; -+ dir_mtime.tv_usec = 0; - #endif -- if (timercmp (latest_cache_mtime, &cache_mtime, <)) -+ /* special take care of OSTree */ -+ if (!timercmp (&zero_mtime, &dir_mtime, !=)) -+ { -+ if (!timercmp (&zero_mtime, &cache_mtime, !=)) -+ { -+ if (*((FcCache **) closure)) -+ FcDirCacheUnload (*((FcCache **) closure)); -+ } -+ else if (*((FcCache **) closure) && !timercmp (&zero_mtime, latest_cache_mtime, !=)) -+ { -+ FcDirCacheUnload (cache); -+ return FcFalse; -+ } -+ else if (timercmp (latest_cache_mtime, &cache_mtime, <)) -+ { -+ if (*((FcCache **) closure)) -+ FcDirCacheUnload (*((FcCache **) closure)); -+ } -+ } -+ else if (timercmp (latest_cache_mtime, &cache_mtime, <)) - { - if (*((FcCache **) closure)) - FcDirCacheUnload (*((FcCache **) closure)); diff --git a/fontconfig-fix-1744377.patch b/fontconfig-fix-1744377.patch deleted file mode 100644 index fda5c2d..0000000 --- a/fontconfig-fix-1744377.patch +++ /dev/null @@ -1,122 +0,0 @@ -From fcada522913e5e07efa6367eff87ace9f06d24c8 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 28 Aug 2019 17:46:03 +0900 -Subject: [PATCH] Do not return FcFalse from FcConfigParseAndLoad*() if - complain is set to false - -https://bugzilla.redhat.com/show_bug.cgi?id=1744377 ---- - src/fcxml.c | 8 ++++--- - test/Makefile.am | 4 ++++ - test/test-bz1744377.c | 51 +++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 60 insertions(+), 3 deletions(-) - create mode 100644 test/test-bz1744377.c - -diff --git a/src/fcxml.c b/src/fcxml.c -index 2e26e77a..076fa301 100644 ---- a/src/fcxml.c -+++ b/src/fcxml.c -@@ -3526,7 +3526,7 @@ _FcConfigParse (FcConfig *config, - int len; - FcStrBuf sbuf; - char buf[BUFSIZ]; -- FcBool ret = FcFalse; -+ FcBool ret = FcFalse, complain_again = complain; - - #ifdef _WIN32 - if (!pGetSystemWindowsDirectory) -@@ -3605,7 +3605,7 @@ _FcConfigParse (FcConfig *config, - close (fd); - - ret = FcConfigParseAndLoadFromMemoryInternal (config, filename, FcStrBufDoneStatic (&sbuf), complain, load); -- complain = FcFalse; /* no need to reclaim here */ -+ complain_again = FcFalse; /* no need to reclaim here */ - bail1: - FcStrBufDestroy (&sbuf); - bail0: -@@ -3613,7 +3613,9 @@ bail0: - FcStrFree (filename); - if (realfilename) - FcStrFree (realfilename); -- if (!ret && complain) -+ if (!complain) -+ return FcTrue; -+ if (!ret && complain_again) - { - if (name) - FcConfigMessage (0, FcSevereError, "Cannot %s config file \"%s\"", load ? "load" : "scan", name); -diff --git a/test/Makefile.am b/test/Makefile.am -index f9c21581..a9fa089a 100644 ---- a/test/Makefile.am -+++ b/test/Makefile.am -@@ -131,6 +131,10 @@ TESTS += test-d1f48f11 - endif - endif - -+check_PROGRAMS += test-bz1744377 -+test_bz1744377_LDADD = $(top_builddir)/src/libfontconfig.la -+TESTS += test-bz1744377 -+ - EXTRA_DIST=run-test.sh run-test-conf.sh $(LOG_COMPILER) $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names - - CLEANFILES=out out1 out2 fonts.conf out.expected -diff --git a/test/test-bz1744377.c b/test/test-bz1744377.c -new file mode 100644 -index 00000000..d7f10535 ---- /dev/null -+++ b/test/test-bz1744377.c -@@ -0,0 +1,51 @@ -+/* -+ * fontconfig/test/test-bz1744377.c -+ * -+ * Copyright © 2000 Keith Packard -+ * -+ * Permission to use, copy, modify, distribute, and sell this software and its -+ * documentation for any purpose is hereby granted without fee, provided that -+ * the above copyright notice appear in all copies and that both that -+ * copyright notice and this permission notice appear in supporting -+ * documentation, and that the name of the author(s) not be used in -+ * advertising or publicity pertaining to distribution of the software without -+ * specific, written prior permission. The authors make no -+ * representations about the suitability of this software for any purpose. It -+ * is provided "as is" without express or implied warranty. -+ * -+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -+ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR -+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -+ * PERFORMANCE OF THIS SOFTWARE. -+ */ -+#include -+ -+int -+main (void) -+{ -+ const FcChar8 *doc = "" -+ "\n" -+ " blahblahblah\n" -+ "\n" -+ ""; -+ const FcChar8 *doc2 = "" -+ "\n" -+ " blahblahblah\n" -+ "\n" -+ ""; -+ FcConfig *cfg = FcConfigCreate (); -+ -+ if (!FcConfigParseAndLoadFromMemory (cfg, doc, FcTrue)) -+ return 1; -+ if (FcConfigParseAndLoadFromMemory (cfg, doc2, FcTrue)) -+ return 1; -+ if (!FcConfigParseAndLoadFromMemory (cfg, doc2, FcFalse)) -+ return 1; -+ -+ FcConfigDestroy (cfg); -+ -+ return 0; -+} --- -2.23.0 - diff --git a/fontconfig-fix-assertion.patch b/fontconfig-fix-assertion.patch deleted file mode 100644 index 2e33736..0000000 --- a/fontconfig-fix-assertion.patch +++ /dev/null @@ -1,144 +0,0 @@ -From fbc05949ef52c8a8d69233eed77f6636dffec280 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 26 Feb 2020 15:42:21 +0900 -Subject: [PATCH] Fix assertion in FcFini() - -Due to the unproper initialization of `latest_mtime', the duplicate caches -was still in fcCacheChains with no references. which means no one frees -them. thus, the memory leak was happened. - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/227 ---- - src/fccache.c | 9 +++++---- - src/fcinit.c | 4 ++-- - 2 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/src/fccache.c b/src/fccache.c -index 4744a84..035458e 100644 ---- a/src/fccache.c -+++ b/src/fccache.c -@@ -365,7 +365,6 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, - struct stat file_stat, dir_stat; - FcBool ret = FcFalse; - const FcChar8 *sysroot = FcConfigGetSysRoot (config); -- struct timeval latest_mtime = (struct timeval){ 0 }; - - if (sysroot) - d = FcStrBuildFilename (sysroot, dir, NULL); -@@ -390,6 +389,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, - #ifndef _WIN32 - FcBool retried = FcFalse; - #endif -+ struct timeval latest_mtime = (struct timeval){ 0 }; -+ - if (sysroot) - cache_hashed = FcStrBuildFilename (sysroot, cache_dir, cache_base, NULL); - else -@@ -1081,12 +1082,12 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat) - - if (!file_stat) - file_stat = &my_file_stat; -- fd = FcDirCacheOpenFile (cache_file, file_stat); -- if (fd < 0) -- return NULL; - config = FcConfigReference (NULL); - if (!config) - return NULL; -+ fd = FcDirCacheOpenFile (cache_file, file_stat); -+ if (fd < 0) -+ return NULL; - cache = FcDirCacheMapFd (config, fd, file_stat, NULL); - FcConfigDestroy (config); - close (fd); -diff --git a/src/fcinit.c b/src/fcinit.c -index 6f82ebd..0e1421e 100644 ---- a/src/fcinit.c -+++ b/src/fcinit.c -@@ -199,10 +199,10 @@ void - FcFini (void) - { - FcConfigFini (); -- FcCacheFini (); -+ FcConfigPathFini (); - FcDefaultFini (); - FcObjectFini (); -- FcConfigPathFini (); -+ FcCacheFini (); - } - - /* --- -2.24.1 - -From 6f6b39780215714386606ca1c5457a7106639ff4 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Mon, 23 Mar 2020 14:03:47 +0900 -Subject: [PATCH] Fix assertion in FcCacheFini() again - -The previous fix in fbc05949ef52c8a8d69233eed77f6636dffec280 was wrong. reverting. - -When reading older caches, FcDirCacheMapHelper() returns FcFalse and -it became the return value from FcDirCacheProcess() too, which is wrong. -Actually one of calls for FcDirCacheMapHelper() should be successfully -finished and closure should have a valid pointer for cache. - -Due to this, the proper finalization process wasn't running against -cache in closure. - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/227 ---- - src/fccache.c | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) - -diff --git a/src/fccache.c b/src/fccache.c -index 035458e..2d398c7 100644 ---- a/src/fccache.c -+++ b/src/fccache.c -@@ -365,6 +365,7 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, - struct stat file_stat, dir_stat; - FcBool ret = FcFalse; - const FcChar8 *sysroot = FcConfigGetSysRoot (config); -+ struct timeval latest_mtime = (struct timeval){ 0 }; - - if (sysroot) - d = FcStrBuildFilename (sysroot, dir, NULL); -@@ -389,7 +390,6 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, - #ifndef _WIN32 - FcBool retried = FcFalse; - #endif -- struct timeval latest_mtime = (struct timeval){ 0 }; - - if (sysroot) - cache_hashed = FcStrBuildFilename (sysroot, cache_dir, cache_base, NULL); -@@ -445,6 +445,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, - } - FcStrListDone (list); - -+ if (closure) -+ return !!(*((FcCache **)closure) != NULL); - return ret; - } - -@@ -792,7 +794,18 @@ FcCacheFini (void) - int i; - - for (i = 0; i < FC_CACHE_MAX_LEVEL; i++) -- assert (fcCacheChains[i] == NULL); -+ { -+ if (FcDebug() & FC_DBG_CACHE) -+ { -+ if (fcCacheChains[i] != NULL) -+ { -+ FcCacheSkip *s = fcCacheChains[i]; -+ printf("Fontconfig error: not freed %p (dir: %s, refcount %d)\n", s->cache, FcCacheDir(s->cache), s->ref.count); -+ } -+ } -+ else -+ assert (fcCacheChains[i] == NULL); -+ } - assert (fcCacheMaxLevel == 0); - - free_lock (); --- -2.24.1 - diff --git a/fontconfig-fix-dtd-id.patch b/fontconfig-fix-dtd-id.patch deleted file mode 100644 index 9045fc0..0000000 --- a/fontconfig-fix-dtd-id.patch +++ /dev/null @@ -1,490 +0,0 @@ -diff -uNr fontconfig-2.13.92.orig/conf.d/05-reset-dirs-sample.conf fontconfig-2.13.92/conf.d/05-reset-dirs-sample.conf ---- fontconfig-2.13.92.orig/conf.d/05-reset-dirs-sample.conf 2019-05-08 10:22:25.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/05-reset-dirs-sample.conf 2020-03-28 15:53:41.792757065 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - Re-define fonts dirs sample - -diff -uNr fontconfig-2.13.92.orig/conf.d/09-autohint-if-no-hinting.conf fontconfig-2.13.92/conf.d/09-autohint-if-no-hinting.conf ---- fontconfig-2.13.92.orig/conf.d/09-autohint-if-no-hinting.conf 2019-07-30 13:03:27.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/09-autohint-if-no-hinting.conf 2020-03-28 15:53:41.764757635 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-autohint.conf fontconfig-2.13.92/conf.d/10-autohint.conf ---- fontconfig-2.13.92.orig/conf.d/10-autohint.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-autohint.conf 2020-03-28 15:53:41.829756312 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-hinting-full.conf fontconfig-2.13.92/conf.d/10-hinting-full.conf ---- fontconfig-2.13.92.orig/conf.d/10-hinting-full.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-hinting-full.conf 2020-03-28 15:53:41.714758653 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-hinting-medium.conf fontconfig-2.13.92/conf.d/10-hinting-medium.conf ---- fontconfig-2.13.92.orig/conf.d/10-hinting-medium.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-hinting-medium.conf 2020-03-28 15:53:41.809756719 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-hinting-none.conf fontconfig-2.13.92/conf.d/10-hinting-none.conf ---- fontconfig-2.13.92.orig/conf.d/10-hinting-none.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-hinting-none.conf 2020-03-28 15:53:41.796756984 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-hinting-slight.conf fontconfig-2.13.92/conf.d/10-hinting-slight.conf ---- fontconfig-2.13.92.orig/conf.d/10-hinting-slight.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-hinting-slight.conf 2020-03-28 15:53:41.760757717 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-no-sub-pixel.conf fontconfig-2.13.92/conf.d/10-no-sub-pixel.conf ---- fontconfig-2.13.92.orig/conf.d/10-no-sub-pixel.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-no-sub-pixel.conf 2020-03-28 15:53:41.743758063 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-scale-bitmap-fonts.conf fontconfig-2.13.92/conf.d/10-scale-bitmap-fonts.conf ---- fontconfig-2.13.92.orig/conf.d/10-scale-bitmap-fonts.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-scale-bitmap-fonts.conf 2020-03-28 15:53:41.727758389 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-sub-pixel-bgr.conf fontconfig-2.13.92/conf.d/10-sub-pixel-bgr.conf ---- fontconfig-2.13.92.orig/conf.d/10-sub-pixel-bgr.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-sub-pixel-bgr.conf 2020-03-28 15:53:41.841756068 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-sub-pixel-rgb.conf fontconfig-2.13.92/conf.d/10-sub-pixel-rgb.conf ---- fontconfig-2.13.92.orig/conf.d/10-sub-pixel-rgb.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-sub-pixel-rgb.conf 2020-03-28 15:53:41.723758470 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-sub-pixel-vbgr.conf fontconfig-2.13.92/conf.d/10-sub-pixel-vbgr.conf ---- fontconfig-2.13.92.orig/conf.d/10-sub-pixel-vbgr.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-sub-pixel-vbgr.conf 2020-03-28 15:53:41.772757472 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-sub-pixel-vrgb.conf fontconfig-2.13.92/conf.d/10-sub-pixel-vrgb.conf ---- fontconfig-2.13.92.orig/conf.d/10-sub-pixel-vrgb.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-sub-pixel-vrgb.conf 2020-03-28 15:53:41.706758816 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/10-unhinted.conf fontconfig-2.13.92/conf.d/10-unhinted.conf ---- fontconfig-2.13.92.orig/conf.d/10-unhinted.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/10-unhinted.conf 2020-03-28 15:53:41.739758145 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/11-lcdfilter-default.conf fontconfig-2.13.92/conf.d/11-lcdfilter-default.conf ---- fontconfig-2.13.92.orig/conf.d/11-lcdfilter-default.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/11-lcdfilter-default.conf 2020-03-28 15:53:41.731758307 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/11-lcdfilter-legacy.conf fontconfig-2.13.92/conf.d/11-lcdfilter-legacy.conf ---- fontconfig-2.13.92.orig/conf.d/11-lcdfilter-legacy.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/11-lcdfilter-legacy.conf 2020-03-28 15:53:41.837756149 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/11-lcdfilter-light.conf fontconfig-2.13.92/conf.d/11-lcdfilter-light.conf ---- fontconfig-2.13.92.orig/conf.d/11-lcdfilter-light.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/11-lcdfilter-light.conf 2020-03-28 15:53:41.768757554 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/20-unhint-small-vera.conf fontconfig-2.13.92/conf.d/20-unhint-small-vera.conf ---- fontconfig-2.13.92.orig/conf.d/20-unhint-small-vera.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/20-unhint-small-vera.conf 2020-03-28 15:53:41.784757228 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/25-unhint-nonlatin.conf fontconfig-2.13.92/conf.d/25-unhint-nonlatin.conf ---- fontconfig-2.13.92.orig/conf.d/25-unhint-nonlatin.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/25-unhint-nonlatin.conf 2020-03-28 15:53:41.817756556 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/30-metric-aliases.conf fontconfig-2.13.92/conf.d/30-metric-aliases.conf ---- fontconfig-2.13.92.orig/conf.d/30-metric-aliases.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/30-metric-aliases.conf 2020-03-28 15:53:41.718758572 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/40-nonlatin.conf fontconfig-2.13.92/conf.d/40-nonlatin.conf ---- fontconfig-2.13.92.orig/conf.d/40-nonlatin.conf 2019-05-08 10:22:25.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/40-nonlatin.conf 2020-03-28 15:53:41.735758226 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/45-generic.conf fontconfig-2.13.92/conf.d/45-generic.conf ---- fontconfig-2.13.92.orig/conf.d/45-generic.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/45-generic.conf 2020-03-28 15:53:41.833756231 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/45-latin.conf fontconfig-2.13.92/conf.d/45-latin.conf ---- fontconfig-2.13.92.orig/conf.d/45-latin.conf 2019-05-08 10:22:25.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/45-latin.conf 2020-03-28 15:53:41.756757798 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/49-sansserif.conf fontconfig-2.13.92/conf.d/49-sansserif.conf ---- fontconfig-2.13.92.orig/conf.d/49-sansserif.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/49-sansserif.conf 2020-03-28 15:53:41.845755987 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/50-user.conf fontconfig-2.13.92/conf.d/50-user.conf ---- fontconfig-2.13.92.orig/conf.d/50-user.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/50-user.conf 2020-03-28 15:53:41.710758735 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/51-local.conf fontconfig-2.13.92/conf.d/51-local.conf ---- fontconfig-2.13.92.orig/conf.d/51-local.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/51-local.conf 2020-03-28 15:53:41.805756801 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/60-generic.conf fontconfig-2.13.92/conf.d/60-generic.conf ---- fontconfig-2.13.92.orig/conf.d/60-generic.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/60-generic.conf 2020-03-28 15:53:41.702758898 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/60-latin.conf fontconfig-2.13.92/conf.d/60-latin.conf ---- fontconfig-2.13.92.orig/conf.d/60-latin.conf 2019-05-08 10:22:25.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/60-latin.conf 2020-03-28 15:53:41.752757880 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - -diff -uNr fontconfig-2.13.92.orig/conf.d/65-fonts-persian.conf fontconfig-2.13.92/conf.d/65-fonts-persian.conf ---- fontconfig-2.13.92.orig/conf.d/65-fonts-persian.conf 2018-06-05 12:36:38.000000000 +0200 -+++ fontconfig-2.13.92/conf.d/65-fonts-persian.conf 2020-03-28 15:53:41.748757961 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - - - -diff -uNr fontconfig-2.13.92.orig/doc/fonts-conf.5 fontconfig-2.13.92/doc/fonts-conf.5 ---- fontconfig-2.13.92.orig/doc/fonts-conf.5 2019-08-09 13:12:20.000000000 +0200 -+++ fontconfig-2.13.92/doc/fonts-conf.5 2020-03-28 15:53:41.685759244 +0100 -@@ -264,7 +264,7 @@ - .sp - .nf - -- -+ - - \&... - -@@ -554,7 +554,7 @@ - .sp - .nf - -- -+ - - - - - -diff -uNr fontconfig-2.13.92.orig/fonts.conf.in fontconfig-2.13.92/fonts.conf.in ---- fontconfig-2.13.92.orig/fonts.conf.in 2019-05-08 10:22:25.000000000 +0200 -+++ fontconfig-2.13.92/fonts.conf.in 2020-03-28 15:53:41.698758979 +0100 -@@ -1,5 +1,5 @@ - -- -+ - - - diff --git a/fontconfig-fix-dtd.patch b/fontconfig-fix-dtd.patch deleted file mode 100644 index 5165589..0000000 --- a/fontconfig-fix-dtd.patch +++ /dev/null @@ -1,26 +0,0 @@ -From a4aa66a858f1ecd375c5efe5916398281f73f794 Mon Sep 17 00:00:00 2001 -From: Jan Tojnar -Date: Wed, 20 Nov 2019 02:13:58 +0000 -Subject: [PATCH] Correct reset-dirs in DTD - -Empty elements need to be declared as such in well-formed DTDs. ---- - fonts.dtd | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fonts.dtd b/fonts.dtd -index f8c9f2c..40ecb4e 100644 ---- a/fonts.dtd -+++ b/fonts.dtd -@@ -124,7 +124,7 @@ - -- -+ - - + + + + KDE + + rgb + + From 3d26dfea36a1436d57de7fa613ea6b6c0974498e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 03:43:11 +0000 Subject: [PATCH 24/56] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 008bd62..b15dee1 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.1 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -193,6 +193,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 2.14.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Nov 26 2022 Akira TAGOH - 2.14.1-2 - Enable RGB stripes layout for sub-pixel rendering on KDE only. Resolves: rhbz#2137825 From 03bbd6991df3f8b6c0dabd2e79c6d2b33b517df9 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 27 Jan 2023 18:01:51 +0900 Subject: [PATCH 25/56] New upstream release. --- .gitignore | 1 + fontconfig-desktop-property.patch | 337 ------------------------------ fontconfig.spec | 8 +- sources | 2 +- 4 files changed, 7 insertions(+), 341 deletions(-) delete mode 100644 fontconfig-desktop-property.patch diff --git a/.gitignore b/.gitignore index bc18404..95fbd70 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.13.96.tar.xz /fontconfig-2.14.0.tar.xz /fontconfig-2.14.1.tar.xz +/fontconfig-2.14.2.tar.xz diff --git a/fontconfig-desktop-property.patch b/fontconfig-desktop-property.patch deleted file mode 100644 index c7a81a3..0000000 --- a/fontconfig-desktop-property.patch +++ /dev/null @@ -1,337 +0,0 @@ -From 6715a14f138df01c11110488b7edbf514e4076b4 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Fri, 25 Nov 2022 21:15:32 +0900 -Subject: [PATCH] Add FC_DESKTOP_NAME property - -To allow users to have desktop-specific matching rule. ---- - fontconfig/fontconfig.h | 27 ++++++++++--------- - src/fcdefault.c | 58 ++++++++++++++++++++++++++++++++++++++--- - src/fcint.h | 7 +++-- - src/fcobjs.h | 1 + - src/fcxml.c | 14 +++++----- - 5 files changed, 82 insertions(+), 25 deletions(-) - -diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h -index 09292a3..ac5a0b0 100644 ---- a/fontconfig/fontconfig.h -+++ b/fontconfig/fontconfig.h -@@ -128,6 +128,7 @@ typedef int FcBool; - #define FC_POSTSCRIPT_NAME "postscriptname" /* String */ - #define FC_FONT_HAS_HINT "fonthashint" /* Bool - true if font has hinting */ - #define FC_ORDER "order" /* Integer */ -+#define FC_DESKTOP_NAME "desktop" /* String */ - - #define FC_CACHE_SUFFIX ".cache-" FC_CACHE_VERSION - #define FC_DIR_CACHE_FILE "fonts.cache-" FC_CACHE_VERSION -@@ -285,7 +286,7 @@ typedef struct _FcObjectSet { - int sobject; - const char **objects; - } FcObjectSet; -- -+ - typedef enum _FcMatchKind { - FcMatchPattern, FcMatchFont, FcMatchScan, - FcMatchKindEnd, -@@ -400,7 +401,7 @@ FcConfigGetFilename (FcConfig *config, - - FcPublic FcChar8 * - FcConfigFilename (const FcChar8 *url); -- -+ - FcPublic FcConfig * - FcConfigCreate (void); - -@@ -418,7 +419,7 @@ FcConfigGetCurrent (void); - - FcPublic FcBool - FcConfigUptoDate (FcConfig *config); -- -+ - FcPublic FcBool - FcConfigBuildFonts (FcConfig *config); - -@@ -548,12 +549,12 @@ FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b); - #define FC_CHARSET_DONE ((FcChar32) -1) - - FcPublic FcChar32 --FcCharSetFirstPage (const FcCharSet *a, -+FcCharSetFirstPage (const FcCharSet *a, - FcChar32 map[FC_CHARSET_MAP_SIZE], - FcChar32 *next); - - FcPublic FcChar32 --FcCharSetNextPage (const FcCharSet *a, -+FcCharSetNextPage (const FcCharSet *a, - FcChar32 map[FC_CHARSET_MAP_SIZE], - FcChar32 *next); - -@@ -609,7 +610,7 @@ FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file); - - FcPublic FcCache * - FcDirCacheRescan (const FcChar8 *dir, FcConfig *config); -- -+ - FcPublic FcCache * - FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config); - -@@ -772,7 +773,7 @@ FcFontSetMatch (FcConfig *config, - - FcPublic FcPattern * - FcFontMatch (FcConfig *config, -- FcPattern *p, -+ FcPattern *p, - FcResult *result); - - FcPublic FcPattern * -@@ -890,10 +891,10 @@ FcPatternHash (const FcPattern *p); - - FcPublic FcBool - FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append); -- -+ - FcPublic FcBool - FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append); -- -+ - FcPublic FcResult - FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v); - -@@ -956,7 +957,7 @@ FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r); - - FcPublic FcPattern * - FcPatternVaBuild (FcPattern *p, va_list va); -- -+ - FcPublic FcPattern * - FcPatternBuild (FcPattern *p, ...) FC_ATTRIBUTE_SENTINEL(0); - -@@ -1025,10 +1026,10 @@ FcStrCopy (const FcChar8 *s); - - FcPublic FcChar8 * - FcStrCopyFilename (const FcChar8 *s); -- -+ - FcPublic FcChar8 * - FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); -- -+ - FcPublic void - FcStrFree (FcChar8 *s); - -@@ -1145,7 +1146,7 @@ _FCFUNCPROTOEND - * Deprecated functions are placed here to help users fix their code without - * digging through documentation - */ -- -+ - #define FcConfigGetRescanInverval FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval - #define FcConfigSetRescanInverval FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval - -diff --git a/src/fcdefault.c b/src/fcdefault.c -index a9a3b72..6995216 100644 ---- a/src/fcdefault.c -+++ b/src/fcdefault.c -@@ -211,28 +211,73 @@ retry: - return prgname; - } - -+static FcChar8 *default_desktop_name; -+ -+FcChar8 * -+FcGetDesktopName (void) -+{ -+ FcChar8 *desktop_name; -+retry: -+ desktop_name = fc_atomic_ptr_get (&default_desktop_name); -+ if (!desktop_name) -+ { -+ char *s = getenv ("XDG_CURRENT_DESKTOP"); -+ -+ if (!s) -+ desktop_name = FcStrdup (""); -+ else -+ desktop_name = FcStrdup (s); -+ if (!desktop_name) -+ { -+ fprintf (stderr, "Fontconfig error: out of memory in %s\n", -+ __FUNCTION__); -+ return NULL; -+ } -+ -+ if (!fc_atomic_ptr_cmpexch(&default_desktop_name, NULL, desktop_name)) -+ { -+ free (desktop_name); -+ goto retry; -+ } -+ } -+ if (desktop_name && !desktop_name[0]) -+ return NULL; -+ -+ return desktop_name; -+} -+ - void - FcDefaultFini (void) - { - FcChar8 *lang; - FcStrSet *langs; - FcChar8 *prgname; -+ FcChar8 *desktop; - - lang = fc_atomic_ptr_get (&default_lang); -- if (lang && fc_atomic_ptr_cmpexch (&default_lang, lang, NULL)) { -+ if (lang && fc_atomic_ptr_cmpexch (&default_lang, lang, NULL)) -+ { - free (lang); - } - - langs = fc_atomic_ptr_get (&default_langs); -- if (langs && fc_atomic_ptr_cmpexch (&default_langs, langs, NULL)) { -+ if (langs && fc_atomic_ptr_cmpexch (&default_langs, langs, NULL)) -+ { - FcRefInit (&langs->ref, 1); - FcStrSetDestroy (langs); - } - - prgname = fc_atomic_ptr_get (&default_prgname); -- if (prgname && fc_atomic_ptr_cmpexch (&default_prgname, prgname, NULL)) { -+ if (prgname && fc_atomic_ptr_cmpexch (&default_prgname, prgname, NULL)) -+ { - free (prgname); - } -+ -+ desktop = fc_atomic_ptr_get (&default_desktop_name); -+ if (desktop && fc_atomic_ptr_cmpexch(&default_desktop_name, desktop, NULL)) -+ { -+ free (desktop); -+ } - } - - void -@@ -336,6 +381,13 @@ FcDefaultSubstitute (FcPattern *pattern) - FcPatternObjectAddString (pattern, FC_PRGNAME_OBJECT, prgname); - } - -+ if (FcPatternObjectGet (pattern, FC_DESKTOP_NAME_OBJECT, 0, &v) == FcResultNoMatch) -+ { -+ FcChar8 *desktop = FcGetDesktopName (); -+ if (desktop) -+ FcPatternObjectAddString (pattern, FC_DESKTOP_NAME_OBJECT, desktop); -+ } -+ - if (!FcPatternFindObjectIter (pattern, &iter, FC_ORDER_OBJECT)) - FcPatternObjectAddInteger (pattern, FC_ORDER_OBJECT, 0); - } -diff --git a/src/fcint.h b/src/fcint.h -index c615b66..78cee54 100644 ---- a/src/fcint.h -+++ b/src/fcint.h -@@ -199,7 +199,7 @@ typedef struct _FcValueList { - } FcValueList; - - #define FcValueListNext(vl) FcPointerMember(vl,next,FcValueList) -- -+ - typedef int FcObject; - - /* The 1024 is to leave some room for future added internal objects, such -@@ -238,7 +238,7 @@ struct _FcPattern { - FcFontSetFonts(fs)[i], \ - FcPattern) : \ - fs->fonts[i]) -- -+ - typedef enum _FcOp { - FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpRange, FcOpBool, FcOpCharSet, FcOpLangSet, - FcOpNil, -@@ -909,6 +909,9 @@ FcGetDefaultLang (void); - FcPrivate FcChar8 * - FcGetPrgname (void); - -+FcPrivate FcChar8 * -+FcGetDesktopName (void); -+ - FcPrivate void - FcDefaultFini (void); - -diff --git a/src/fcobjs.h b/src/fcobjs.h -index acc0471..1cd8ed3 100644 ---- a/src/fcobjs.h -+++ b/src/fcobjs.h -@@ -74,4 +74,5 @@ FC_OBJECT (FONT_VARIATIONS, FcTypeString, NULL) - FC_OBJECT (VARIABLE, FcTypeBool, FcCompareBool) - FC_OBJECT (FONT_HAS_HINT, FcTypeBool, FcCompareBool) - FC_OBJECT (ORDER, FcTypeInteger, FcCompareNumber) -+FC_OBJECT (DESKTOP_NAME, FcTypeString, NULL) - /* ^-------------- Add new objects here. */ -diff --git a/src/fcxml.c b/src/fcxml.c -index 82a46f2..74c892d 100644 ---- a/src/fcxml.c -+++ b/src/fcxml.c -@@ -367,7 +367,7 @@ typedef enum _FcElement { - FcElementDescription, - FcElementRemapDir, - FcElementResetDirs, -- -+ - FcElementRescan, - - FcElementPrefer, -@@ -731,7 +731,7 @@ FcTypecheckExpr (FcConfigParse *parse, FcExpr *expr, FcType type) - if (o) - FcTypecheckValue (parse, o->type, type); - } -- else -+ else - FcConfigMessage (parse, FcSevereWarning, - "invalid constant used : %s", - expr->u.constant); -@@ -794,7 +794,7 @@ FcTestCreate (FcConfigParse *parse, - if (test) - { - const FcObjectType *o; -- -+ - test->kind = kind; - test->qual = qual; - test->object = FcObjectFromName ((const char *) field); -@@ -1533,7 +1533,7 @@ FcStrtod (char *s, char **end) - { - char buf[128]; - int slen = strlen (s); -- -+ - if (slen + dlen > (int) sizeof (buf)) - { - if (end) -@@ -3101,7 +3101,7 @@ FcParsePattern (FcConfigParse *parse) - FcConfigMessage (parse, FcSevereError, "out of memory"); - return; - } -- -+ - while ((vstack = FcVStackPeek (parse))) - { - switch ((int) vstack->tag) { -@@ -3176,7 +3176,7 @@ FcEndElement(void *userData, const XML_Char *name FC_UNUSED) - case FcElementRescan: - FcParseRescan (parse); - break; -- -+ - case FcElementPrefer: - FcParseFamilies (parse, FcVStackPrefer); - break; -@@ -3512,7 +3512,7 @@ FcConfigParseAndLoadFromMemoryInternal (FcConfig *config, - XML_SetDoctypeDeclHandler (p, FcStartDoctypeDecl, FcEndDoctypeDecl); - XML_SetElementHandler (p, FcStartElement, FcEndElement); - XML_SetCharacterDataHandler (p, FcCharacterData); -- -+ - #endif /* ENABLE_LIBXML2 */ - - #ifndef ENABLE_LIBXML2 --- -2.38.1 - diff --git a/fontconfig.spec b/fontconfig.spec index b15dee1..28999b7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.14.1 -Release: 3%{?dist} +Version: 2.14.2 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -21,7 +21,6 @@ Source3: 10-sub-pixel-rgb-for-kde.conf Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch -Patch6: %{name}-desktop-property.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -193,6 +192,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jan 27 2023 Akira TAGOH - 2.14.2-1 +- New upstream release. + * Thu Jan 19 2023 Fedora Release Engineering - 2.14.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/sources b/sources index 51a9e53..9884c80 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.14.1.tar.xz) = ba42e6f90ec92914895d2157c872c373adfc17be791b92253bcc40e85674a84e43c08ab2b37c3ae85b53b2e7bd2a7847abb479043f303b732c08eeac3ee733db +SHA512 (fontconfig-2.14.2.tar.xz) = 23483e0ae6aa7589fd37f9949a4cf951c5bff981739dbb446881e4cea86a208c0ab31e2358666eac724af1dc6a689a42733a7ce91cd3e76d8d91eacedb318085 From a71d8d0d33254c437ab10b88110a57fb8a78346b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 4 Apr 2023 14:54:59 +0900 Subject: [PATCH 26/56] Migrated license tag to SPDX. --- fontconfig.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 28999b7..537ac60 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,12 +5,13 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.2 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code +## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 # fc-case/CaseFolding.txt is in the UCD # otherwise MIT -License: MIT and Public Domain and UCD +License: HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016 Source: http://fontconfig.org/release/%{name}-%{version}.tar.xz URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf @@ -192,6 +193,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Tue Apr 4 2023 Akira TAGOH - 2.14.2-2 +- Migrated license tag to SPDX. + * Fri Jan 27 2023 Akira TAGOH - 2.14.2-1 - New upstream release. From b1ee7ffdbdf3d8ab16b9259507d8218be4ad94ca Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 16 Jun 2023 18:14:18 +0900 Subject: [PATCH 27/56] Drop 10-sub-pixel-rgb-for-kde.conf Resolves: rhbz#2212512 --- fontconfig.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fontconfig.spec b/fontconfig.spec index 537ac60..3dc1f61 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.2 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -16,7 +16,6 @@ Source: http://fontconfig.org/release/%{name}-%{version}.tar.xz URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf Source2: fc-cache -Source3: 10-sub-pixel-rgb-for-kde.conf # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch @@ -94,9 +93,8 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ -# Use conditional conf instead +# Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf -install -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d # move installed doc files back to build directory to package them # in the right place @@ -193,6 +191,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jun 16 2023 Akira TAGOH - 2.14.2-3 +- Drop 10-sub-pixel-rgb-for-kde.conf + Resolves: rhbz#2212512 + * Tue Apr 4 2023 Akira TAGOH - 2.14.2-2 - Migrated license tag to SPDX. From 7450f4c8e92c46a74eeff0ef876d106ae4443a44 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 20:01:44 +0000 Subject: [PATCH 28/56] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 3dc1f61..f5d7668 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.2 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -191,6 +191,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 2.14.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jun 16 2023 Akira TAGOH - 2.14.2-3 - Drop 10-sub-pixel-rgb-for-kde.conf Resolves: rhbz#2212512 From 353020918ca14302545b32dc36d76bf21a6b2960 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 17 Aug 2023 17:25:57 +0900 Subject: [PATCH 29/56] Update 65-nonlatin.conf to 69-nonlatin.conf This basically provides substitutes for certain languages and is helpful to determine default behavior though, we have per-package config for similar purpose. Since 65 is mostly used for default fonts and this config prevents some behavior for packages named something coming later than "nonlatin" in the alphabetical order. So moving this to the safer priority. This would fixes an issue, particularly Lohit Marathi vs Lohit Devanagari after updating their priorities from 65 to 66. --- fontconfig-lower-nonlatin-conf.patch | 485 +++++++++++++++++++++++++++ fontconfig.spec | 11 + 2 files changed, 496 insertions(+) create mode 100644 fontconfig-lower-nonlatin-conf.patch diff --git a/fontconfig-lower-nonlatin-conf.patch b/fontconfig-lower-nonlatin-conf.patch new file mode 100644 index 0000000..6139992 --- /dev/null +++ b/fontconfig-lower-nonlatin-conf.patch @@ -0,0 +1,485 @@ +diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf.d/65-nonlatin.conf +--- fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf 2020-12-03 20:45:00.000000000 +0900 ++++ fontconfig-2.14.2/conf.d/65-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,228 +0,0 @@ +- +- +- +- Set preferable fonts for non-Latin +- +- serif +- +- Artsounk +- BPG UTF8 M +- Kinnari +- Norasi +- Frank Ruehl +- Dror +- JG LaoTimes +- Saysettha Unicode +- Pigiarniq +- B Davat +- B Compset +- Kacst-Qr +- Urdu Nastaliq Unicode +- Raghindi +- Mukti Narrow +- malayalam +- Sampige +- padmaa +- Hapax Berbère +- MS Mincho +- SimSun +- PMingLiu +- WenQuanYi Zen Hei +- WenQuanYi Bitmap Song +- AR PL ShanHeiSun Uni +- AR PL New Sung +- ZYSong18030 +- HanyiSong +- MgOpen Canonica +- Sazanami Mincho +- IPAMonaMincho +- IPAMincho +- Kochi Mincho +- AR PL SungtiL GB +- AR PL Mingti2L Big5 +- AR PL Zenkai Uni +- MS 明朝 +- ZYSong18030 +- NanumMyeongjo +- UnBatang +- Baekmuk Batang +- KacstQura +- Frank Ruehl CLM +- Lohit Bengali +- Lohit Gujarati +- Lohit Hindi +- Lohit Marathi +- Lohit Maithili +- Lohit Kashmiri +- Lohit Konkani +- Lohit Nepali +- Lohit Sindhi +- Lohit Punjabi +- Lohit Tamil +- Rachana +- Lohit Malayalam +- Lohit Kannada +- Lohit Telugu +- Lohit Oriya +- LKLUG +- +- +- +- sans-serif +- +- Nachlieli +- Lucida Sans Unicode +- Yudit Unicode +- Kerkis +- ArmNet Helvetica +- Artsounk +- BPG UTF8 M +- Waree +- Loma +- Garuda +- Umpush +- Saysettha Unicode +- JG Lao Old Arial +- GF Zemen Unicode +- Pigiarniq +- B Davat +- B Compset +- Kacst-Qr +- Urdu Nastaliq Unicode +- Raghindi +- Mukti Narrow +- malayalam +- Sampige +- padmaa +- Hapax Berbère +- MS Gothic +- UmePlus P Gothic +- Microsoft YaHei +- Microsoft JhengHei +- WenQuanYi Zen Hei +- WenQuanYi Bitmap Song +- AR PL ShanHeiSun Uni +- AR PL New Sung +- MgOpen Modata +- VL Gothic +- IPAMonaGothic +- IPAGothic +- Sazanami Gothic +- Kochi Gothic +- AR PL KaitiM GB +- AR PL KaitiM Big5 +- AR PL ShanHeiSun Uni +- AR PL SungtiL GB +- AR PL Mingti2L Big5 +- MS ゴシック +- ZYSong18030 +- TSCu_Paranar +- NanumGothic +- UnDotum +- Baekmuk Dotum +- Baekmuk Gulim +- KacstQura +- Lohit Bengali +- Lohit Gujarati +- Lohit Hindi +- Lohit Marathi +- Lohit Maithili +- Lohit Kashmiri +- Lohit Konkani +- Lohit Nepali +- Lohit Sindhi +- Lohit Punjabi +- Lohit Tamil +- Meera +- Lohit Malayalam +- Lohit Kannada +- Lohit Telugu +- Lohit Oriya +- LKLUG +- +- +- +- monospace +- +- Miriam Mono +- VL Gothic +- IPAMonaGothic +- IPAGothic +- Sazanami Gothic +- Kochi Gothic +- AR PL KaitiM GB +- MS Gothic +- UmePlus Gothic +- NSimSun +- MingLiu +- AR PL ShanHeiSun Uni +- AR PL New Sung Mono +- HanyiSong +- AR PL SungtiL GB +- AR PL Mingti2L Big5 +- ZYSong18030 +- NanumGothicCoding +- NanumGothic +- UnDotum +- Baekmuk Dotum +- Baekmuk Gulim +- TlwgTypo +- TlwgTypist +- TlwgTypewriter +- TlwgMono +- Hasida +- GF Zemen Unicode +- Hapax Berbère +- Lohit Bengali +- Lohit Gujarati +- Lohit Hindi +- Lohit Marathi +- Lohit Maithili +- Lohit Kashmiri +- Lohit Konkani +- Lohit Nepali +- Lohit Sindhi +- Lohit Punjabi +- Lohit Tamil +- Meera +- Lohit Malayalam +- Lohit Kannada +- Lohit Telugu +- Lohit Oriya +- LKLUG +- +- +- +- +- system-ui +- +- Noto Sans Arabic UI +- Noto Sans Bengali UI +- Noto Sans Devanagari UI +- Noto Sans Gujarati UI +- Noto Sans Gurmukhi UI +- Noto Sans Kannada UI +- Noto Sans Khmer UI +- Noto Sans Lao UI +- Noto Sans Malayalam UI +- Noto Sans Myanmar UI +- Noto Sans Oriya UI +- Noto Sans Sinhala UI +- Noto Sans Tamil UI +- Noto Sans Telugu UI +- Noto Sans Thai UI +- Leelawadee UI +- Nirmala UI +- Yu Gothic UI +- Meiryo UI +- MS UI Gothic +- Khmer UI +- Lao UI +- Microsoft YaHei UI +- Microsoft JhengHei UI +- +- +- +- +diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf.d/69-nonlatin.conf +--- fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 ++++ fontconfig-2.14.2/conf.d/69-nonlatin.conf 2020-12-03 20:45:00.000000000 +0900 +@@ -0,0 +1,228 @@ ++ ++ ++ ++ Set preferable fonts for non-Latin ++ ++ serif ++ ++ Artsounk ++ BPG UTF8 M ++ Kinnari ++ Norasi ++ Frank Ruehl ++ Dror ++ JG LaoTimes ++ Saysettha Unicode ++ Pigiarniq ++ B Davat ++ B Compset ++ Kacst-Qr ++ Urdu Nastaliq Unicode ++ Raghindi ++ Mukti Narrow ++ malayalam ++ Sampige ++ padmaa ++ Hapax Berbère ++ MS Mincho ++ SimSun ++ PMingLiu ++ WenQuanYi Zen Hei ++ WenQuanYi Bitmap Song ++ AR PL ShanHeiSun Uni ++ AR PL New Sung ++ ZYSong18030 ++ HanyiSong ++ MgOpen Canonica ++ Sazanami Mincho ++ IPAMonaMincho ++ IPAMincho ++ Kochi Mincho ++ AR PL SungtiL GB ++ AR PL Mingti2L Big5 ++ AR PL Zenkai Uni ++ MS 明朝 ++ ZYSong18030 ++ NanumMyeongjo ++ UnBatang ++ Baekmuk Batang ++ KacstQura ++ Frank Ruehl CLM ++ Lohit Bengali ++ Lohit Gujarati ++ Lohit Hindi ++ Lohit Marathi ++ Lohit Maithili ++ Lohit Kashmiri ++ Lohit Konkani ++ Lohit Nepali ++ Lohit Sindhi ++ Lohit Punjabi ++ Lohit Tamil ++ Rachana ++ Lohit Malayalam ++ Lohit Kannada ++ Lohit Telugu ++ Lohit Oriya ++ LKLUG ++ ++ ++ ++ sans-serif ++ ++ Nachlieli ++ Lucida Sans Unicode ++ Yudit Unicode ++ Kerkis ++ ArmNet Helvetica ++ Artsounk ++ BPG UTF8 M ++ Waree ++ Loma ++ Garuda ++ Umpush ++ Saysettha Unicode ++ JG Lao Old Arial ++ GF Zemen Unicode ++ Pigiarniq ++ B Davat ++ B Compset ++ Kacst-Qr ++ Urdu Nastaliq Unicode ++ Raghindi ++ Mukti Narrow ++ malayalam ++ Sampige ++ padmaa ++ Hapax Berbère ++ MS Gothic ++ UmePlus P Gothic ++ Microsoft YaHei ++ Microsoft JhengHei ++ WenQuanYi Zen Hei ++ WenQuanYi Bitmap Song ++ AR PL ShanHeiSun Uni ++ AR PL New Sung ++ MgOpen Modata ++ VL Gothic ++ IPAMonaGothic ++ IPAGothic ++ Sazanami Gothic ++ Kochi Gothic ++ AR PL KaitiM GB ++ AR PL KaitiM Big5 ++ AR PL ShanHeiSun Uni ++ AR PL SungtiL GB ++ AR PL Mingti2L Big5 ++ MS ゴシック ++ ZYSong18030 ++ TSCu_Paranar ++ NanumGothic ++ UnDotum ++ Baekmuk Dotum ++ Baekmuk Gulim ++ KacstQura ++ Lohit Bengali ++ Lohit Gujarati ++ Lohit Hindi ++ Lohit Marathi ++ Lohit Maithili ++ Lohit Kashmiri ++ Lohit Konkani ++ Lohit Nepali ++ Lohit Sindhi ++ Lohit Punjabi ++ Lohit Tamil ++ Meera ++ Lohit Malayalam ++ Lohit Kannada ++ Lohit Telugu ++ Lohit Oriya ++ LKLUG ++ ++ ++ ++ monospace ++ ++ Miriam Mono ++ VL Gothic ++ IPAMonaGothic ++ IPAGothic ++ Sazanami Gothic ++ Kochi Gothic ++ AR PL KaitiM GB ++ MS Gothic ++ UmePlus Gothic ++ NSimSun ++ MingLiu ++ AR PL ShanHeiSun Uni ++ AR PL New Sung Mono ++ HanyiSong ++ AR PL SungtiL GB ++ AR PL Mingti2L Big5 ++ ZYSong18030 ++ NanumGothicCoding ++ NanumGothic ++ UnDotum ++ Baekmuk Dotum ++ Baekmuk Gulim ++ TlwgTypo ++ TlwgTypist ++ TlwgTypewriter ++ TlwgMono ++ Hasida ++ GF Zemen Unicode ++ Hapax Berbère ++ Lohit Bengali ++ Lohit Gujarati ++ Lohit Hindi ++ Lohit Marathi ++ Lohit Maithili ++ Lohit Kashmiri ++ Lohit Konkani ++ Lohit Nepali ++ Lohit Sindhi ++ Lohit Punjabi ++ Lohit Tamil ++ Meera ++ Lohit Malayalam ++ Lohit Kannada ++ Lohit Telugu ++ Lohit Oriya ++ LKLUG ++ ++ ++ ++ ++ system-ui ++ ++ Noto Sans Arabic UI ++ Noto Sans Bengali UI ++ Noto Sans Devanagari UI ++ Noto Sans Gujarati UI ++ Noto Sans Gurmukhi UI ++ Noto Sans Kannada UI ++ Noto Sans Khmer UI ++ Noto Sans Lao UI ++ Noto Sans Malayalam UI ++ Noto Sans Myanmar UI ++ Noto Sans Oriya UI ++ Noto Sans Sinhala UI ++ Noto Sans Tamil UI ++ Noto Sans Telugu UI ++ Noto Sans Thai UI ++ Leelawadee UI ++ Nirmala UI ++ Yu Gothic UI ++ Meiryo UI ++ MS UI Gothic ++ Khmer UI ++ Lao UI ++ Microsoft YaHei UI ++ Microsoft JhengHei UI ++ ++ ++ ++ +diff -pruN fontconfig-2.14.2.orig/conf.d/Makefile.am fontconfig-2.14.2/conf.d/Makefile.am +--- fontconfig-2.14.2.orig/conf.d/Makefile.am 2022-11-28 18:17:51.000000000 +0900 ++++ fontconfig-2.14.2/conf.d/Makefile.am 2023-08-17 16:56:24.358848001 +0900 +@@ -47,7 +47,7 @@ CONF_LINKS = \ + 60-generic.conf \ + 60-latin.conf \ + 65-fonts-persian.conf \ +- 65-nonlatin.conf \ ++ 69-nonlatin.conf \ + 69-unifont.conf \ + 80-delicious.conf \ + 90-synthetic.conf +@@ -94,7 +94,7 @@ template_DATA = \ + 60-latin.conf \ + 65-fonts-persian.conf \ + 65-khmer.conf \ +- 65-nonlatin.conf \ ++ 69-nonlatin.conf \ + 69-unifont.conf \ + 70-no-bitmaps.conf \ + 70-yes-bitmaps.conf \ diff --git a/fontconfig.spec b/fontconfig.spec index f5d7668..4ae40d6 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -21,6 +21,7 @@ Source2: fc-cache Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch +Patch6: %{name}-lower-nonlatin-conf.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -191,6 +192,16 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Aug 17 2023 Akira TAGOH - 2.14.2-5 +- Update 65-nonlatin.conf to 69-nonlatin.conf + This basically provides substitutes for certain languages and is helpful + to determine default behavior though, we have per-package config for similar purpose. + Since 65 is mostly used for default fonts and this config prevents some behavior for + packages named something coming later than "nonlatin" in the alphabetical order. + So moving this to the safer priority. + This would fixes an issue, particularly Lohit Marathi vs Lohit Devanagari after + updating their priorities from 65 to 66. + * Wed Jul 19 2023 Fedora Release Engineering - 2.14.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 1b1dff013739b4acf986e080ffb2ed5157bcf896 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 17 Aug 2023 17:43:37 +0900 Subject: [PATCH 30/56] Bump a release --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 4ae40d6..d52502d 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.14.2 -Release: 4%{?dist} +Release: 5%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 From d72678cc75d7591c03a69a97a55f6452eb32fcfb Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 22 Dec 2023 23:12:42 +0900 Subject: [PATCH 31/56] New upstream release. Resolves: rhbz#2255623 --- .gitignore | 1 + fontconfig-lower-nonlatin-conf.patch | 48 +++++++++++++++++++++------- fontconfig.spec | 10 ++++-- sources | 1 + 4 files changed, 45 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 95fbd70..fab771d 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.14.0.tar.xz /fontconfig-2.14.1.tar.xz /fontconfig-2.14.2.tar.xz +/fontconfig-2.15.0.tar.xz diff --git a/fontconfig-lower-nonlatin-conf.patch b/fontconfig-lower-nonlatin-conf.patch index 6139992..2be984f 100644 --- a/fontconfig-lower-nonlatin-conf.patch +++ b/fontconfig-lower-nonlatin-conf.patch @@ -1,7 +1,7 @@ -diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf.d/65-nonlatin.conf ---- fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf 2020-12-03 20:45:00.000000000 +0900 -+++ fontconfig-2.14.2/conf.d/65-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 -@@ -1,228 +0,0 @@ +diff -pruN fontconfig-2.15.0.orig/conf.d/65-nonlatin.conf fontconfig-2.15.0/conf.d/65-nonlatin.conf +--- fontconfig-2.15.0.orig/conf.d/65-nonlatin.conf 2023-03-22 20:36:46.000000000 +0900 ++++ fontconfig-2.15.0/conf.d/65-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 +@@ -1,240 +0,0 @@ - - - @@ -37,6 +37,10 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - AR PL New Sung - ZYSong18030 - HanyiSong +- Hiragino Mincho ProN +- Songti SC +- Songti TC +- SimSong - MgOpen Canonica - Sazanami Mincho - IPAMonaMincho @@ -50,6 +54,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - NanumMyeongjo - UnBatang - Baekmuk Batang +- AppleMyungjo - KacstQura - Frank Ruehl CLM - Lohit Bengali @@ -107,6 +112,12 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - WenQuanYi Bitmap Song - AR PL ShanHeiSun Uni - AR PL New Sung +- Hiragino Sans +- PingFang SC +- PingFang TC +- PingFang HK +- Hiragino Sans CNS +- Hiragino Sans GB - MgOpen Modata - VL Gothic - IPAMonaGothic @@ -125,6 +136,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - UnDotum - Baekmuk Dotum - Baekmuk Gulim +- Apple SD Gothic Neo - KacstQura - Lohit Bengali - Lohit Gujarati @@ -230,10 +242,10 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/65-nonlatin.conf fontconfig-2.14.2/conf - - - -diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf.d/69-nonlatin.conf ---- fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 -+++ fontconfig-2.14.2/conf.d/69-nonlatin.conf 2020-12-03 20:45:00.000000000 +0900 -@@ -0,0 +1,228 @@ +diff -pruN fontconfig-2.15.0.orig/conf.d/69-nonlatin.conf fontconfig-2.15.0/conf.d/69-nonlatin.conf +--- fontconfig-2.15.0.orig/conf.d/69-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 ++++ fontconfig-2.15.0/conf.d/69-nonlatin.conf 2023-03-22 20:36:46.000000000 +0900 +@@ -0,0 +1,240 @@ + + + @@ -269,6 +281,10 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + AR PL New Sung + ZYSong18030 + HanyiSong ++ Hiragino Mincho ProN ++ Songti SC ++ Songti TC ++ SimSong + MgOpen Canonica + Sazanami Mincho + IPAMonaMincho @@ -282,6 +298,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + NanumMyeongjo + UnBatang + Baekmuk Batang ++ AppleMyungjo + KacstQura + Frank Ruehl CLM + Lohit Bengali @@ -339,6 +356,12 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + WenQuanYi Bitmap Song + AR PL ShanHeiSun Uni + AR PL New Sung ++ Hiragino Sans ++ PingFang SC ++ PingFang TC ++ PingFang HK ++ Hiragino Sans CNS ++ Hiragino Sans GB + MgOpen Modata + VL Gothic + IPAMonaGothic @@ -357,6 +380,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + UnDotum + Baekmuk Dotum + Baekmuk Gulim ++ Apple SD Gothic Neo + KacstQura + Lohit Bengali + Lohit Gujarati @@ -462,9 +486,9 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/69-nonlatin.conf fontconfig-2.14.2/conf + + + -diff -pruN fontconfig-2.14.2.orig/conf.d/Makefile.am fontconfig-2.14.2/conf.d/Makefile.am ---- fontconfig-2.14.2.orig/conf.d/Makefile.am 2022-11-28 18:17:51.000000000 +0900 -+++ fontconfig-2.14.2/conf.d/Makefile.am 2023-08-17 16:56:24.358848001 +0900 +diff -pruN fontconfig-2.15.0.orig/conf.d/Makefile.am fontconfig-2.15.0/conf.d/Makefile.am +--- fontconfig-2.15.0.orig/conf.d/Makefile.am 2023-08-24 14:14:15.000000000 +0900 ++++ fontconfig-2.15.0/conf.d/Makefile.am 2023-12-22 23:08:05.514969924 +0900 @@ -47,7 +47,7 @@ CONF_LINKS = \ 60-generic.conf \ 60-latin.conf \ @@ -474,7 +498,7 @@ diff -pruN fontconfig-2.14.2.orig/conf.d/Makefile.am fontconfig-2.14.2/conf.d/Ma 69-unifont.conf \ 80-delicious.conf \ 90-synthetic.conf -@@ -94,7 +94,7 @@ template_DATA = \ +@@ -95,7 +95,7 @@ template_DATA = \ 60-latin.conf \ 65-fonts-persian.conf \ 65-khmer.conf \ diff --git a/fontconfig.spec b/fontconfig.spec index d52502d..e5bd5b5 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.14.2 -Release: 5%{?dist} +Version: 2.15.0 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -156,7 +156,7 @@ if [ $1 == 0 ] && [ -e %{_sysconfdir}/xml/catalog ]; then fi %files -f %{name}.lang -%doc README AUTHORS +%doc README.md AUTHORS %doc fontconfig-user.txt fontconfig-user.html %doc %{_fontconfig_confdir}/README %license COPYING @@ -192,6 +192,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Dec 22 2023 Akira TAGOH - 2.15.0-1 +- New upstream release. + Resolves: rhbz#2255623 + * Thu Aug 17 2023 Akira TAGOH - 2.14.2-5 - Update 65-nonlatin.conf to 69-nonlatin.conf This basically provides substitutes for certain languages and is helpful diff --git a/sources b/sources index 9884c80..10b4abe 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (fontconfig-2.14.2.tar.xz) = 23483e0ae6aa7589fd37f9949a4cf951c5bff981739dbb446881e4cea86a208c0ab31e2358666eac724af1dc6a689a42733a7ce91cd3e76d8d91eacedb318085 +SHA512 (fontconfig-2.15.0.tar.xz) = 754cd5fffa198fc07a39cf7df683e9adfa7f54ab41fdff8c0eacc078fd35d3e01069ba343f2b045e0b40df88d9f1fc1ee0f7565799f9cb194a59cf95b64c4417 From bfd9218620b7da2315d310df2d9fcc35aab207bf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 19:36:21 +0000 Subject: [PATCH 32/56] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index e5bd5b5..0d6e0c5 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -192,6 +192,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 2.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Dec 22 2023 Akira TAGOH - 2.15.0-1 - New upstream release. Resolves: rhbz#2255623 From 50326b480810be2507507c99322995cc75663c98 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 11:51:39 +0000 Subject: [PATCH 33/56] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 0d6e0c5..a1d6e29 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -192,6 +192,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 2.15.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 2.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e200ccfc726f40f54e5695afbeb37efe2209f7e2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 10 Feb 2024 02:28:59 +0900 Subject: [PATCH 34/56] Delete .uuid with fc-cache -f. Resolves: rhbz#1761885 --- fontconfig-remove-uuid.patch | 67 ++++++++++++++++++++++++++++++++++++ fontconfig.spec | 7 +++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 fontconfig-remove-uuid.patch diff --git a/fontconfig-remove-uuid.patch b/fontconfig-remove-uuid.patch new file mode 100644 index 0000000..16c0d04 --- /dev/null +++ b/fontconfig-remove-uuid.patch @@ -0,0 +1,67 @@ +From c22908828fb2dbfdf38733d119adc1cf5fe00173 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Sat, 10 Feb 2024 00:20:54 +0900 +Subject: [PATCH 1/2] Clean up .uuid files with fc-cache -f too + +.uuid file was obsoleted >5 years ago and it was supposed to +be cleaned up by fc-cache -r but not -f. +This change tries to clean it up by fc-cache -f. + +https://bugzilla.redhat.com/show_bug.cgi?id=1761885 +--- + src/fcdir.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/fcdir.c b/src/fcdir.c +index 6f7b3835..2e4fdc69 100644 +--- a/src/fcdir.c ++++ b/src/fcdir.c +@@ -234,7 +234,7 @@ FcDirScanConfig (FcFontSet *set, + + if (FcDebug () & FC_DBG_SCAN) + printf ("\tScanning dir %s\n", s_dir); +- ++ + d = opendir ((char *) s_dir); + if (!d) + { +@@ -459,7 +459,10 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config) + + /* Not using existing cache file, construct new cache */ + if (!cache) ++ { ++ FcDirCacheDeleteUUID (dir, config); + cache = FcDirCacheScan (dir, config); ++ } + FcConfigDestroy (config); + + return cache; +-- +2.43.0 + +From a76b95105ca26c600279b2daf4bd43b37a918823 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Sat, 10 Feb 2024 02:15:45 +0900 +Subject: [PATCH 2/2] Fix undesired unref of FcConfig on Win32 + +--- + src/fccache.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fccache.c b/src/fccache.c +index cebbb810..54f76ac1 100644 +--- a/src/fccache.c ++++ b/src/fccache.c +@@ -106,8 +106,8 @@ FcDirCacheDeleteUUID (const FcChar8 *dir, + FcStrFree (target); + bail: + FcStrFree (d); +-#endif + FcConfigDestroy (config); ++#endif + + return ret; + } +-- +2.43.0 + diff --git a/fontconfig.spec b/fontconfig.spec index a1d6e29..6390590 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -22,6 +22,7 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch +Patch7: %{name}-remove-uuid.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -192,6 +193,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Sat Feb 10 2024 Akira TAGOH - 2.15.0-4 +- Delete .uuid with fc-cache -f. + Resolves: rhbz#1761885 + * Wed Jan 24 2024 Fedora Release Engineering - 2.15.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From be5b48f736a36bec35e6c112c0a646c6fbd29a82 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 30 Apr 2024 01:22:24 +0200 Subject: [PATCH 35/56] Fix emoji fonts being disabled when bitmap fonts were disabled --- fontconfig-fix-emojis.patch | 109 ++++++++++++++++++++++++++++++++++++ fontconfig.spec | 6 +- 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-emojis.patch diff --git a/fontconfig-fix-emojis.patch b/fontconfig-fix-emojis.patch new file mode 100644 index 0000000..ef4738b --- /dev/null +++ b/fontconfig-fix-emojis.patch @@ -0,0 +1,109 @@ +From 810a300398dc93b7becca4a7f286e8999adc09a5 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Fri, 8 Mar 2024 01:55:14 +0900 +Subject: [PATCH] Sort out bitmap related config files + +70-no-bitmaps-and-emoji.conf: reject bitmap fonts including bitmap emoji fonts. +70-no-bitmaps-except-emoji.conf: reject bitmap fonts except bitmap emoji fonts. +70-no-bitmaps.conf: same to 70-no-bitmaps-except-emoji.conf for backward compatibility +but deprecated. This will be dropped in the future. + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/409 +--- + conf.d/70-no-bitmaps-and-emoji.conf | 13 +++++++++++++ + conf.d/70-no-bitmaps-except-emoji.conf | 14 ++++++++++++++ + conf.d/70-no-bitmaps.conf | 11 ++--------- + conf.d/Makefile.am | 2 ++ + conf.d/meson.build | 2 ++ + 5 files changed, 33 insertions(+), 9 deletions(-) + create mode 100644 conf.d/70-no-bitmaps-and-emoji.conf + create mode 100644 conf.d/70-no-bitmaps-except-emoji.conf + +diff --git a/conf.d/70-no-bitmaps-and-emoji.conf b/conf.d/70-no-bitmaps-and-emoji.conf +new file mode 100644 +index 00000000..3e18a4cf +--- /dev/null ++++ b/conf.d/70-no-bitmaps-and-emoji.conf +@@ -0,0 +1,13 @@ ++ ++ ++ ++ Reject bitmap fonts, including bitmap emoji fonts ++ ++ ++ ++ ++ false ++ ++ ++ ++ +diff --git a/conf.d/70-no-bitmaps-except-emoji.conf b/conf.d/70-no-bitmaps-except-emoji.conf +new file mode 100644 +index 00000000..3170cd6f +--- /dev/null ++++ b/conf.d/70-no-bitmaps-except-emoji.conf +@@ -0,0 +1,14 @@ ++ ++ ++ ++ Reject bitmap fonts except bitmap emoji fonts ++ ++ ++ ++ ++ false ++ false ++ ++ ++ ++ +diff --git a/conf.d/70-no-bitmaps.conf b/conf.d/70-no-bitmaps.conf +index 10203acb..767e4115 100644 +--- a/conf.d/70-no-bitmaps.conf ++++ b/conf.d/70-no-bitmaps.conf +@@ -1,13 +1,6 @@ + + + +- Reject bitmap fonts +- +- +- +- +- false +- +- +- ++ Reject bitmap fonts except bitmap emoji fonts (deprecated; use 70-no-bitmaps-except-emoji.conf) ++ 70-no-bitmaps-except-emoji.conf + +diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am +index fd858348..737b4fb2 100644 +--- a/conf.d/Makefile.am ++++ b/conf.d/Makefile.am +@@ -98,6 +98,8 @@ template_DATA = \ + 69-nonlatin.conf \ + 69-unifont.conf \ + 70-no-bitmaps.conf \ ++ 70-no-bitmaps-and-emoji.conf \ ++ 70-no-bitmaps-except-emoji.conf \ + 70-yes-bitmaps.conf \ + 80-delicious.conf \ + 90-synthetic.conf +diff --git a/conf.d/meson.build b/conf.d/meson.build +index 8e896118..b6d07ee0 100644 +--- a/conf.d/meson.build ++++ b/conf.d/meson.build +@@ -36,6 +36,8 @@ conf_files = [ + '65-nonlatin.conf', + '69-unifont.conf', + '70-no-bitmaps.conf', ++ '70-no-bitmaps-and-emoji.conf', ++ '70-no-bitmaps-except-emoji.conf', + '70-yes-bitmaps.conf', + '80-delicious.conf', + '90-synthetic.conf', +-- +GitLab + diff --git a/fontconfig.spec b/fontconfig.spec index 6390590..85991f1 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 4%{?dist} +Release: 5%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -23,6 +23,7 @@ Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch Patch7: %{name}-remove-uuid.patch +Patch8: %{name}-fix-emojis.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -193,6 +194,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Mon Apr 29 2024 Michael Kuhn - 2.15.0-5 +- Fix emoji fonts being disabled when bitmap fonts were disabled + * Sat Feb 10 2024 Akira TAGOH - 2.15.0-4 - Delete .uuid with fc-cache -f. Resolves: rhbz#1761885 From 354394f0f41a6de0997c59d806ec524ab17e1cc3 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 7 Jun 2024 23:03:12 +0900 Subject: [PATCH 36/56] Own /usr/lib/fontconfig Resolves: rhbz#2284076 --- fontconfig.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 85991f1..856f352 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 5%{?dist} +Release: 6%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -178,6 +178,7 @@ fi # If you want to do so, you should use local.conf instead. %config %{_fontconfig_masterdir}/fonts.conf %config(noreplace) %{_fontconfig_confdir}/*.conf +%dir /usr/lib/fontconfig %dir /usr/lib/fontconfig/cache %{_mandir}/man1/* %{_mandir}/man5/* @@ -194,6 +195,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Fri Jun 7 2024 Akira TAGOH - 2.15.0-6 +- Own /usr/lib/fontconfig + Resolves: rhbz#2284076 + * Mon Apr 29 2024 Michael Kuhn - 2.15.0-5 - Fix emoji fonts being disabled when bitmap fonts were disabled From 067f5c6f8e55b7238501bf1470e792cfbb120ff6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 23:26:13 +0000 Subject: [PATCH 37/56] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 856f352..bfdb782 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 6%{?dist} +Release: 7%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -195,6 +195,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 2.15.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 7 2024 Akira TAGOH - 2.15.0-6 - Own /usr/lib/fontconfig Resolves: rhbz#2284076 From d3f982b32de573dd5d557e75fa0792e4a87fc25a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 18 Jul 2024 19:37:02 +0900 Subject: [PATCH 38/56] ci: Use tmt based test cases --- .fmf/version | 1 + tests/basic/main.fmf | 3 +++ tests/basic/test.sh | 22 ++++++++++++++++++++++ tests/tests.yml | 14 -------------- 4 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 .fmf/version create mode 100644 tests/basic/main.fmf create mode 100755 tests/basic/test.sh delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/basic/main.fmf b/tests/basic/main.fmf new file mode 100644 index 0000000..d6c06ec --- /dev/null +++ b/tests/basic/main.fmf @@ -0,0 +1,3 @@ +summary: Concise summary describing what the test does +test: ./test.sh +framework: beakerlib diff --git a/tests/basic/test.sh b/tests/basic/test.sh new file mode 100755 index 0000000..10de1b4 --- /dev/null +++ b/tests/basic/test.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "set -o pipefail" + rlPhaseEnd + + rlPhaseStartTest + rlRun "fc-match" 0 "Check fc-match" + rlRun "fc-list" 0 "Check fc-list" + rlRun "fc-scan /usr/share/fonts" 0 "Check fc-scan" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index d3fa1ed..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,14 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - required_packages: - - fontconfig - tests: - - fcmatch_test: - dir: . - run: fc-match - - fclist_test: - dir: . - run: fc-list From c400e27282f14ea8e6102529bf176cdcba501655 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 19 Jul 2024 20:09:47 +0900 Subject: [PATCH 39/56] ci: Add fmf plan file --- plans/basic.fmf | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 plans/basic.fmf diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt From c6712606928e77b5a59599e704cbf302296c03fe Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 1 Aug 2024 12:45:32 +0900 Subject: [PATCH 40/56] Fix a memory leak and potentially uninitialized values. --- fontconfig-fix-SAST.patch | 54 +++++++++++++++++++++++++++++++++++++++ fontconfig.spec | 6 ++++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 fontconfig-fix-SAST.patch diff --git a/fontconfig-fix-SAST.patch b/fontconfig-fix-SAST.patch new file mode 100644 index 0000000..6ef1b07 --- /dev/null +++ b/fontconfig-fix-SAST.patch @@ -0,0 +1,54 @@ +From eaa335e7c4686c622f31e691f8a41fdf30ea42b3 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 31 Jul 2024 17:31:36 +0900 +Subject: [PATCH 1/2] Fix a memory leak in _get_real_paths_from_prefix + +--- + src/fcxml.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/fcxml.c b/src/fcxml.c +index 9fe0674..083fc1f 100644 +--- a/src/fcxml.c ++++ b/src/fcxml.c +@@ -1327,11 +1327,9 @@ _get_real_paths_from_prefix(FcConfigParse *parse, const FcChar8 *path, const FcC + if (!p) + return NULL; + parent = FcStrDirname (p); ++ FcStrFree (p); + if (!parent) +- { +- free (p); + return NULL; +- } + } + } + #ifndef _WIN32 +-- +2.45.2 + +From ab765827101787d49c0a66b23addc1f68f99a455 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 31 Jul 2024 17:37:53 +0900 +Subject: [PATCH 2/2] Set FcTypeVoid if no valid types to convert + +--- + src/fcname.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/fcname.c b/src/fcname.c +index 566f0ef..b152bd9 100644 +--- a/src/fcname.c ++++ b/src/fcname.c +@@ -406,6 +406,8 @@ FcNameConvert (FcType type, const char *object, FcChar8 *string) + v.u.r = FcRangeCreateDouble (b, e); + break; + default: ++ /* No valid type to convert */ ++ v.type = FcTypeVoid; + break; + } + return v; +-- +2.45.2 + diff --git a/fontconfig.spec b/fontconfig.spec index bfdb782..8f32181 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 7%{?dist} +Release: 8%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -24,6 +24,7 @@ Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch Patch7: %{name}-remove-uuid.patch Patch8: %{name}-fix-emojis.patch +Patch9: %{name}-fix-SAST.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -195,6 +196,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Aug 1 2024 Akira TAGOH - 2.15.0-8 +- Fix a memory leak and potentially uninitialized values. + * Wed Jul 17 2024 Fedora Release Engineering - 2.15.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From e2bb04c6dbe8cda0add21fda01a23f0770bdd404 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 18:36:18 +0000 Subject: [PATCH 41/56] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 8f32181..c4a9476 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.15.0 -Release: 8%{?dist} +Release: 9%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -196,6 +196,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 2.15.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Aug 1 2024 Akira TAGOH - 2.15.0-8 - Fix a memory leak and potentially uninitialized values. From 39a7075dc3bf71fdb013926f31a29acc1324edc2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 18 Jan 2025 01:36:49 +0900 Subject: [PATCH 42/56] New upstream release. Use meson instead of autotools to build. --- .gitignore | 1 + ...config-disable-network-required-test.patch | 43 +- fontconfig-lower-nonlatin-conf.patch | 517 +----------------- fontconfig.spec | 63 ++- sources | 3 +- 5 files changed, 99 insertions(+), 528 deletions(-) diff --git a/.gitignore b/.gitignore index fab771d..b63773a 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.14.1.tar.xz /fontconfig-2.14.2.tar.xz /fontconfig-2.15.0.tar.xz +/fontconfig-2.16.0.tar.xz diff --git a/fontconfig-disable-network-required-test.patch b/fontconfig-disable-network-required-test.patch index 8481f39..b276aa5 100644 --- a/fontconfig-disable-network-required-test.patch +++ b/fontconfig-disable-network-required-test.patch @@ -1,7 +1,38 @@ -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- +diff -pruN fontconfig-2.16.0.orig/test/meson.build fontconfig-2.16.0/test/meson.build +--- fontconfig-2.16.0.orig/test/meson.build 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/test/meson.build 2025-01-18 01:07:12.893480441 +0900 +@@ -15,7 +15,7 @@ if host_machine.system() != 'windows' + ['test-bz106632.c', {'c_args': ['-DFONTFILE="@0@"'.format(join_paths(meson.current_source_dir(), '4x6.pcf'))]}], + ['test-issue107.c'], # FIXME: fails on mingw + # FIXME: this needs NotoSans-hinted.zip font downloaded and unpacked into test build directory! see run-test.sh +- ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread ++ #['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread + ] + + if get_option('default_library') == 'static' +@@ -62,12 +62,12 @@ if host_machine.system() != 'windows' + + test('run_test_sh', find_program('run-test.sh'), timeout: 600, env: ['srcdir=@0@'.format(meson.current_source_dir()), 'builddir=@0@'.format(meson.current_build_dir()), 'EXEEXT=@0@'.format(conf.get('EXEEXT')), 'VERBOSE=1']) + +- if pytest.found() +- test('pytest', pytest, args: ['--tap'], +- workdir: meson.current_source_dir(), +- env: ['builddir=@0@'.format(meson.current_build_dir())], +- protocol: 'tap') +- endif ++# if pytest.found() ++# test('pytest', pytest, args: ['--tap'], ++# workdir: meson.current_source_dir(), ++# env: ['builddir=@0@'.format(meson.current_build_dir())], ++# protocol: 'tap') ++# endif + endif + + if jsonc_dep.found() +diff -pruN fontconfig-2.16.0.orig/test/run-test.sh fontconfig-2.16.0/test/run-test.sh +--- fontconfig-2.16.0.orig/test/run-test.sh 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/test/run-test.sh 2025-01-18 01:06:54.310144693 +0900 +@@ -499,18 +499,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" "$B fi # if [ "x$EXEEXT" = "x" ] @@ -11,7 +42,7 @@ diff -pruN fontconfig-2.13.93.orig/test/run-test.sh fontconfig-2.13.93/test/run- - 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" +- touch -m -t "$(fdate ${SOURCE_DATE_EPOCH})" "$FONTDIR" - fi - "$BUILDTESTDIR"/test-crbug1004254 -else @@ -21,7 +52,7 @@ diff -pruN fontconfig-2.13.93.orig/test/run-test.sh fontconfig-2.13.93/test/run- +# 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" ++# touch -m -t "$(fdate ${SOURCE_DATE_EPOCH})" "$FONTDIR" +# fi +# "$BUILDTESTDIR"/test-crbug1004254 +#else diff --git a/fontconfig-lower-nonlatin-conf.patch b/fontconfig-lower-nonlatin-conf.patch index 2be984f..3ff373a 100644 --- a/fontconfig-lower-nonlatin-conf.patch +++ b/fontconfig-lower-nonlatin-conf.patch @@ -1,494 +1,6 @@ -diff -pruN fontconfig-2.15.0.orig/conf.d/65-nonlatin.conf fontconfig-2.15.0/conf.d/65-nonlatin.conf ---- fontconfig-2.15.0.orig/conf.d/65-nonlatin.conf 2023-03-22 20:36:46.000000000 +0900 -+++ fontconfig-2.15.0/conf.d/65-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 -@@ -1,240 +0,0 @@ -- -- -- -- Set preferable fonts for non-Latin -- -- serif -- -- Artsounk -- BPG UTF8 M -- Kinnari -- Norasi -- Frank Ruehl -- Dror -- JG LaoTimes -- Saysettha Unicode -- Pigiarniq -- B Davat -- B Compset -- Kacst-Qr -- Urdu Nastaliq Unicode -- Raghindi -- Mukti Narrow -- malayalam -- Sampige -- padmaa -- Hapax Berbère -- MS Mincho -- SimSun -- PMingLiu -- WenQuanYi Zen Hei -- WenQuanYi Bitmap Song -- AR PL ShanHeiSun Uni -- AR PL New Sung -- ZYSong18030 -- HanyiSong -- Hiragino Mincho ProN -- Songti SC -- Songti TC -- SimSong -- MgOpen Canonica -- Sazanami Mincho -- IPAMonaMincho -- IPAMincho -- Kochi Mincho -- AR PL SungtiL GB -- AR PL Mingti2L Big5 -- AR PL Zenkai Uni -- MS 明朝 -- ZYSong18030 -- NanumMyeongjo -- UnBatang -- Baekmuk Batang -- AppleMyungjo -- KacstQura -- Frank Ruehl CLM -- Lohit Bengali -- Lohit Gujarati -- Lohit Hindi -- Lohit Marathi -- Lohit Maithili -- Lohit Kashmiri -- Lohit Konkani -- Lohit Nepali -- Lohit Sindhi -- Lohit Punjabi -- Lohit Tamil -- Rachana -- Lohit Malayalam -- Lohit Kannada -- Lohit Telugu -- Lohit Oriya -- LKLUG -- -- -- -- sans-serif -- -- Nachlieli -- Lucida Sans Unicode -- Yudit Unicode -- Kerkis -- ArmNet Helvetica -- Artsounk -- BPG UTF8 M -- Waree -- Loma -- Garuda -- Umpush -- Saysettha Unicode -- JG Lao Old Arial -- GF Zemen Unicode -- Pigiarniq -- B Davat -- B Compset -- Kacst-Qr -- Urdu Nastaliq Unicode -- Raghindi -- Mukti Narrow -- malayalam -- Sampige -- padmaa -- Hapax Berbère -- MS Gothic -- UmePlus P Gothic -- Microsoft YaHei -- Microsoft JhengHei -- WenQuanYi Zen Hei -- WenQuanYi Bitmap Song -- AR PL ShanHeiSun Uni -- AR PL New Sung -- Hiragino Sans -- PingFang SC -- PingFang TC -- PingFang HK -- Hiragino Sans CNS -- Hiragino Sans GB -- MgOpen Modata -- VL Gothic -- IPAMonaGothic -- IPAGothic -- Sazanami Gothic -- Kochi Gothic -- AR PL KaitiM GB -- AR PL KaitiM Big5 -- AR PL ShanHeiSun Uni -- AR PL SungtiL GB -- AR PL Mingti2L Big5 -- MS ゴシック -- ZYSong18030 -- TSCu_Paranar -- NanumGothic -- UnDotum -- Baekmuk Dotum -- Baekmuk Gulim -- Apple SD Gothic Neo -- KacstQura -- Lohit Bengali -- Lohit Gujarati -- Lohit Hindi -- Lohit Marathi -- Lohit Maithili -- Lohit Kashmiri -- Lohit Konkani -- Lohit Nepali -- Lohit Sindhi -- Lohit Punjabi -- Lohit Tamil -- Meera -- Lohit Malayalam -- Lohit Kannada -- Lohit Telugu -- Lohit Oriya -- LKLUG -- -- -- -- monospace -- -- Miriam Mono -- VL Gothic -- IPAMonaGothic -- IPAGothic -- Sazanami Gothic -- Kochi Gothic -- AR PL KaitiM GB -- MS Gothic -- UmePlus Gothic -- NSimSun -- MingLiu -- AR PL ShanHeiSun Uni -- AR PL New Sung Mono -- HanyiSong -- AR PL SungtiL GB -- AR PL Mingti2L Big5 -- ZYSong18030 -- NanumGothicCoding -- NanumGothic -- UnDotum -- Baekmuk Dotum -- Baekmuk Gulim -- TlwgTypo -- TlwgTypist -- TlwgTypewriter -- TlwgMono -- Hasida -- GF Zemen Unicode -- Hapax Berbère -- Lohit Bengali -- Lohit Gujarati -- Lohit Hindi -- Lohit Marathi -- Lohit Maithili -- Lohit Kashmiri -- Lohit Konkani -- Lohit Nepali -- Lohit Sindhi -- Lohit Punjabi -- Lohit Tamil -- Meera -- Lohit Malayalam -- Lohit Kannada -- Lohit Telugu -- Lohit Oriya -- LKLUG -- -- -- -- -- system-ui -- -- Noto Sans Arabic UI -- Noto Sans Bengali UI -- Noto Sans Devanagari UI -- Noto Sans Gujarati UI -- Noto Sans Gurmukhi UI -- Noto Sans Kannada UI -- Noto Sans Khmer UI -- Noto Sans Lao UI -- Noto Sans Malayalam UI -- Noto Sans Myanmar UI -- Noto Sans Oriya UI -- Noto Sans Sinhala UI -- Noto Sans Tamil UI -- Noto Sans Telugu UI -- Noto Sans Thai UI -- Leelawadee UI -- Nirmala UI -- Yu Gothic UI -- Meiryo UI -- MS UI Gothic -- Khmer UI -- Lao UI -- Microsoft YaHei UI -- Microsoft JhengHei UI -- -- -- -- -diff -pruN fontconfig-2.15.0.orig/conf.d/69-nonlatin.conf fontconfig-2.15.0/conf.d/69-nonlatin.conf ---- fontconfig-2.15.0.orig/conf.d/69-nonlatin.conf 1970-01-01 09:00:00.000000000 +0900 -+++ fontconfig-2.15.0/conf.d/69-nonlatin.conf 2023-03-22 20:36:46.000000000 +0900 -@@ -0,0 +1,240 @@ -+ -+ -+ -+ Set preferable fonts for non-Latin -+ -+ serif -+ -+ Artsounk -+ BPG UTF8 M -+ Kinnari -+ Norasi -+ Frank Ruehl -+ Dror -+ JG LaoTimes -+ Saysettha Unicode -+ Pigiarniq -+ B Davat -+ B Compset -+ Kacst-Qr -+ Urdu Nastaliq Unicode -+ Raghindi -+ Mukti Narrow -+ malayalam -+ Sampige -+ padmaa -+ Hapax Berbère -+ MS Mincho -+ SimSun -+ PMingLiu -+ WenQuanYi Zen Hei -+ WenQuanYi Bitmap Song -+ AR PL ShanHeiSun Uni -+ AR PL New Sung -+ ZYSong18030 -+ HanyiSong -+ Hiragino Mincho ProN -+ Songti SC -+ Songti TC -+ SimSong -+ MgOpen Canonica -+ Sazanami Mincho -+ IPAMonaMincho -+ IPAMincho -+ Kochi Mincho -+ AR PL SungtiL GB -+ AR PL Mingti2L Big5 -+ AR PL Zenkai Uni -+ MS 明朝 -+ ZYSong18030 -+ NanumMyeongjo -+ UnBatang -+ Baekmuk Batang -+ AppleMyungjo -+ KacstQura -+ Frank Ruehl CLM -+ Lohit Bengali -+ Lohit Gujarati -+ Lohit Hindi -+ Lohit Marathi -+ Lohit Maithili -+ Lohit Kashmiri -+ Lohit Konkani -+ Lohit Nepali -+ Lohit Sindhi -+ Lohit Punjabi -+ Lohit Tamil -+ Rachana -+ Lohit Malayalam -+ Lohit Kannada -+ Lohit Telugu -+ Lohit Oriya -+ LKLUG -+ -+ -+ -+ sans-serif -+ -+ Nachlieli -+ Lucida Sans Unicode -+ Yudit Unicode -+ Kerkis -+ ArmNet Helvetica -+ Artsounk -+ BPG UTF8 M -+ Waree -+ Loma -+ Garuda -+ Umpush -+ Saysettha Unicode -+ JG Lao Old Arial -+ GF Zemen Unicode -+ Pigiarniq -+ B Davat -+ B Compset -+ Kacst-Qr -+ Urdu Nastaliq Unicode -+ Raghindi -+ Mukti Narrow -+ malayalam -+ Sampige -+ padmaa -+ Hapax Berbère -+ MS Gothic -+ UmePlus P Gothic -+ Microsoft YaHei -+ Microsoft JhengHei -+ WenQuanYi Zen Hei -+ WenQuanYi Bitmap Song -+ AR PL ShanHeiSun Uni -+ AR PL New Sung -+ Hiragino Sans -+ PingFang SC -+ PingFang TC -+ PingFang HK -+ Hiragino Sans CNS -+ Hiragino Sans GB -+ MgOpen Modata -+ VL Gothic -+ IPAMonaGothic -+ IPAGothic -+ Sazanami Gothic -+ Kochi Gothic -+ AR PL KaitiM GB -+ AR PL KaitiM Big5 -+ AR PL ShanHeiSun Uni -+ AR PL SungtiL GB -+ AR PL Mingti2L Big5 -+ MS ゴシック -+ ZYSong18030 -+ TSCu_Paranar -+ NanumGothic -+ UnDotum -+ Baekmuk Dotum -+ Baekmuk Gulim -+ Apple SD Gothic Neo -+ KacstQura -+ Lohit Bengali -+ Lohit Gujarati -+ Lohit Hindi -+ Lohit Marathi -+ Lohit Maithili -+ Lohit Kashmiri -+ Lohit Konkani -+ Lohit Nepali -+ Lohit Sindhi -+ Lohit Punjabi -+ Lohit Tamil -+ Meera -+ Lohit Malayalam -+ Lohit Kannada -+ Lohit Telugu -+ Lohit Oriya -+ LKLUG -+ -+ -+ -+ monospace -+ -+ Miriam Mono -+ VL Gothic -+ IPAMonaGothic -+ IPAGothic -+ Sazanami Gothic -+ Kochi Gothic -+ AR PL KaitiM GB -+ MS Gothic -+ UmePlus Gothic -+ NSimSun -+ MingLiu -+ AR PL ShanHeiSun Uni -+ AR PL New Sung Mono -+ HanyiSong -+ AR PL SungtiL GB -+ AR PL Mingti2L Big5 -+ ZYSong18030 -+ NanumGothicCoding -+ NanumGothic -+ UnDotum -+ Baekmuk Dotum -+ Baekmuk Gulim -+ TlwgTypo -+ TlwgTypist -+ TlwgTypewriter -+ TlwgMono -+ Hasida -+ GF Zemen Unicode -+ Hapax Berbère -+ Lohit Bengali -+ Lohit Gujarati -+ Lohit Hindi -+ Lohit Marathi -+ Lohit Maithili -+ Lohit Kashmiri -+ Lohit Konkani -+ Lohit Nepali -+ Lohit Sindhi -+ Lohit Punjabi -+ Lohit Tamil -+ Meera -+ Lohit Malayalam -+ Lohit Kannada -+ Lohit Telugu -+ Lohit Oriya -+ LKLUG -+ -+ -+ -+ -+ system-ui -+ -+ Noto Sans Arabic UI -+ Noto Sans Bengali UI -+ Noto Sans Devanagari UI -+ Noto Sans Gujarati UI -+ Noto Sans Gurmukhi UI -+ Noto Sans Kannada UI -+ Noto Sans Khmer UI -+ Noto Sans Lao UI -+ Noto Sans Malayalam UI -+ Noto Sans Myanmar UI -+ Noto Sans Oriya UI -+ Noto Sans Sinhala UI -+ Noto Sans Tamil UI -+ Noto Sans Telugu UI -+ Noto Sans Thai UI -+ Leelawadee UI -+ Nirmala UI -+ Yu Gothic UI -+ Meiryo UI -+ MS UI Gothic -+ Khmer UI -+ Lao UI -+ Microsoft YaHei UI -+ Microsoft JhengHei UI -+ -+ -+ -+ -diff -pruN fontconfig-2.15.0.orig/conf.d/Makefile.am fontconfig-2.15.0/conf.d/Makefile.am ---- fontconfig-2.15.0.orig/conf.d/Makefile.am 2023-08-24 14:14:15.000000000 +0900 -+++ fontconfig-2.15.0/conf.d/Makefile.am 2023-12-22 23:08:05.514969924 +0900 +diff -pruN fontconfig-2.16.0.orig/conf.d/Makefile.am fontconfig-2.16.0/conf.d/Makefile.am +--- fontconfig-2.16.0.orig/conf.d/Makefile.am 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/conf.d/Makefile.am 2025-01-18 00:38:32.245398277 +0900 @@ -47,7 +47,7 @@ CONF_LINKS = \ 60-generic.conf \ 60-latin.conf \ @@ -506,4 +18,25 @@ diff -pruN fontconfig-2.15.0.orig/conf.d/Makefile.am fontconfig-2.15.0/conf.d/Ma + 69-nonlatin.conf \ 69-unifont.conf \ 70-no-bitmaps.conf \ - 70-yes-bitmaps.conf \ + 70-no-bitmaps-and-emoji.conf \ +diff -pruN fontconfig-2.16.0.orig/conf.d/meson.build fontconfig-2.16.0/conf.d/meson.build +--- fontconfig-2.16.0.orig/conf.d/meson.build 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/conf.d/meson.build 2025-01-18 00:38:43.243595743 +0900 +@@ -33,7 +33,7 @@ conf_files = [ + '60-latin.conf', + '65-fonts-persian.conf', + '65-khmer.conf', +- '65-nonlatin.conf', ++ '69-nonlatin.conf', + '69-unifont.conf', + '70-no-bitmaps.conf', + '70-no-bitmaps-and-emoji.conf', +@@ -64,7 +64,7 @@ conf_links = [ + '60-generic.conf', + '60-latin.conf', + '65-fonts-persian.conf', +- '65-nonlatin.conf', ++ '69-nonlatin.conf', + '69-unifont.conf', + '80-delicious.conf', + '90-synthetic.conf', diff --git a/fontconfig.spec b/fontconfig.spec index c4a9476..77d4737 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.15.0 -Release: 9%{?dist} +Version: 2.16.0 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -22,17 +22,14 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch -Patch7: %{name}-remove-uuid.patch -Patch8: %{name}-fix-emojis.patch -Patch9: %{name}-fix-SAST.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel -BuildRequires: autoconf automake libtool gettext +BuildRequires: gettext BuildRequires: gperf BuildRequires: docbook-utils docbook-utils-pdf -BuildRequires: make +BuildRequires: meson ninja-build Requires: fonts-filesystem freetype # Register DTD system-wide to make validation work by default @@ -74,36 +71,42 @@ which is useful for developing applications that uses fontconfig. %prep %autosetup -p1 +# To reduce a maintenance cost of fontconfig-lower-nonlatin-conf.patch +mv conf.d/65-nonlatin.conf conf.d/69-nonlatin.conf %build -# We don't want to rebuild the docs, but we want to install the included ones. -export HASDOCBOOK=no - -for i in doc/*.fncs; do - touch -r $i ${i//.fncs/.sgml} -done -autoreconf -%configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ - --enable-libxml2 \ - --disable-static --with-cache-dir=/usr/lib/fontconfig/cache - -make %{?_smp_mflags} +%meson -Ddoc=disabled -Dcache-build=disabled -Dxml-backend=libxml2 \ + -Dadditional-fonts-dirs=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ + -Dcache-dir=/usr/lib/fontconfig/cache \ + --default-library=shared +%meson_build %install -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" - -find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +%meson_install +install -d $RPM_BUILD_ROOT/usr/lib/fontconfig/cache install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ # Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf -# move installed doc files back to build directory to package them -# in the right place -mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* . -rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/ +# Install docs manually +install -d $RPM_BUILD_ROOT%{_mandir}/man1 +install -d $RPM_BUILD_ROOT%{_mandir}/man3 +install -d $RPM_BUILD_ROOT%{_mandir}/man5 +for f in doc/*.1; do + install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man1 +done +for f in doc/*.3; do + install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man3 +done +for f in doc/*.5; do + install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man5 +done +for f in doc/*.txt doc/*.pdf doc/*.html; do + install -p -m 0644 $f . +done # adjust the timestamp to avoid conflicts for multilib touch -r doc/fontconfig-user.sgml fontconfig-user.txt @@ -122,7 +125,7 @@ install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache cat %{name}-conf.lang >> %{name}.lang %check -VERBOSE=1 make check +%meson_test %post umask 0022 @@ -193,9 +196,13 @@ fi %{_datadir}/gettext/its/fontconfig.loc %files devel-doc -%doc fontconfig-devel.txt fontconfig-devel +%doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Sat Jan 18 2025 Akira TAGOH - 2.16.0-1 +- New upstream release. +- Use meson instead of autotools to build. + * Thu Jan 16 2025 Fedora Release Engineering - 2.15.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index 10b4abe..5a758f7 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (fontconfig-2.14.2.tar.xz) = 23483e0ae6aa7589fd37f9949a4cf951c5bff981739dbb446881e4cea86a208c0ab31e2358666eac724af1dc6a689a42733a7ce91cd3e76d8d91eacedb318085 -SHA512 (fontconfig-2.15.0.tar.xz) = 754cd5fffa198fc07a39cf7df683e9adfa7f54ab41fdff8c0eacc078fd35d3e01069ba343f2b045e0b40df88d9f1fc1ee0f7565799f9cb194a59cf95b64c4417 +SHA512 (fontconfig-2.16.0.tar.xz) = 90b5c39e5eadc56a9fbddd69b2a6eaa6bf9ee5cda003091b0896e66f87f3c1be8ab4442f54d20fca7232d72f60d9578f5e5ba3f376e39b64b8a2aa7b8f13b062 From 4c49ef27c3036afc005493f796e9d6c48b0da19f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 18 Jan 2025 01:39:40 +0900 Subject: [PATCH 43/56] clean up patches --- 10-sub-pixel-rgb-for-kde.conf | 18 ------ fontconfig-fix-SAST.patch | 54 ----------------- fontconfig-fix-emojis.patch | 109 ---------------------------------- fontconfig-fix-remap.patch | 81 ------------------------- fontconfig-remove-uuid.patch | 67 --------------------- 5 files changed, 329 deletions(-) delete mode 100644 10-sub-pixel-rgb-for-kde.conf delete mode 100644 fontconfig-fix-SAST.patch delete mode 100644 fontconfig-fix-emojis.patch delete mode 100644 fontconfig-fix-remap.patch delete mode 100644 fontconfig-remove-uuid.patch diff --git a/10-sub-pixel-rgb-for-kde.conf b/10-sub-pixel-rgb-for-kde.conf deleted file mode 100644 index 63fd752..0000000 --- a/10-sub-pixel-rgb-for-kde.conf +++ /dev/null @@ -1,18 +0,0 @@ - - - - Enable sub-pixel rendering with the RGB stripes layout for KDE only - - - - - KDE - - rgb - - diff --git a/fontconfig-fix-SAST.patch b/fontconfig-fix-SAST.patch deleted file mode 100644 index 6ef1b07..0000000 --- a/fontconfig-fix-SAST.patch +++ /dev/null @@ -1,54 +0,0 @@ -From eaa335e7c4686c622f31e691f8a41fdf30ea42b3 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 31 Jul 2024 17:31:36 +0900 -Subject: [PATCH 1/2] Fix a memory leak in _get_real_paths_from_prefix - ---- - src/fcxml.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/fcxml.c b/src/fcxml.c -index 9fe0674..083fc1f 100644 ---- a/src/fcxml.c -+++ b/src/fcxml.c -@@ -1327,11 +1327,9 @@ _get_real_paths_from_prefix(FcConfigParse *parse, const FcChar8 *path, const FcC - if (!p) - return NULL; - parent = FcStrDirname (p); -+ FcStrFree (p); - if (!parent) -- { -- free (p); - return NULL; -- } - } - } - #ifndef _WIN32 --- -2.45.2 - -From ab765827101787d49c0a66b23addc1f68f99a455 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Wed, 31 Jul 2024 17:37:53 +0900 -Subject: [PATCH 2/2] Set FcTypeVoid if no valid types to convert - ---- - src/fcname.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/fcname.c b/src/fcname.c -index 566f0ef..b152bd9 100644 ---- a/src/fcname.c -+++ b/src/fcname.c -@@ -406,6 +406,8 @@ FcNameConvert (FcType type, const char *object, FcChar8 *string) - v.u.r = FcRangeCreateDouble (b, e); - break; - default: -+ /* No valid type to convert */ -+ v.type = FcTypeVoid; - break; - } - return v; --- -2.45.2 - diff --git a/fontconfig-fix-emojis.patch b/fontconfig-fix-emojis.patch deleted file mode 100644 index ef4738b..0000000 --- a/fontconfig-fix-emojis.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 810a300398dc93b7becca4a7f286e8999adc09a5 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Fri, 8 Mar 2024 01:55:14 +0900 -Subject: [PATCH] Sort out bitmap related config files - -70-no-bitmaps-and-emoji.conf: reject bitmap fonts including bitmap emoji fonts. -70-no-bitmaps-except-emoji.conf: reject bitmap fonts except bitmap emoji fonts. -70-no-bitmaps.conf: same to 70-no-bitmaps-except-emoji.conf for backward compatibility -but deprecated. This will be dropped in the future. - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/409 ---- - conf.d/70-no-bitmaps-and-emoji.conf | 13 +++++++++++++ - conf.d/70-no-bitmaps-except-emoji.conf | 14 ++++++++++++++ - conf.d/70-no-bitmaps.conf | 11 ++--------- - conf.d/Makefile.am | 2 ++ - conf.d/meson.build | 2 ++ - 5 files changed, 33 insertions(+), 9 deletions(-) - create mode 100644 conf.d/70-no-bitmaps-and-emoji.conf - create mode 100644 conf.d/70-no-bitmaps-except-emoji.conf - -diff --git a/conf.d/70-no-bitmaps-and-emoji.conf b/conf.d/70-no-bitmaps-and-emoji.conf -new file mode 100644 -index 00000000..3e18a4cf ---- /dev/null -+++ b/conf.d/70-no-bitmaps-and-emoji.conf -@@ -0,0 +1,13 @@ -+ -+ -+ -+ Reject bitmap fonts, including bitmap emoji fonts -+ -+ -+ -+ -+ false -+ -+ -+ -+ -diff --git a/conf.d/70-no-bitmaps-except-emoji.conf b/conf.d/70-no-bitmaps-except-emoji.conf -new file mode 100644 -index 00000000..3170cd6f ---- /dev/null -+++ b/conf.d/70-no-bitmaps-except-emoji.conf -@@ -0,0 +1,14 @@ -+ -+ -+ -+ Reject bitmap fonts except bitmap emoji fonts -+ -+ -+ -+ -+ false -+ false -+ -+ -+ -+ -diff --git a/conf.d/70-no-bitmaps.conf b/conf.d/70-no-bitmaps.conf -index 10203acb..767e4115 100644 ---- a/conf.d/70-no-bitmaps.conf -+++ b/conf.d/70-no-bitmaps.conf -@@ -1,13 +1,6 @@ - - - -- Reject bitmap fonts -- -- -- -- -- false -- -- -- -+ Reject bitmap fonts except bitmap emoji fonts (deprecated; use 70-no-bitmaps-except-emoji.conf) -+ 70-no-bitmaps-except-emoji.conf - -diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am -index fd858348..737b4fb2 100644 ---- a/conf.d/Makefile.am -+++ b/conf.d/Makefile.am -@@ -98,6 +98,8 @@ template_DATA = \ - 69-nonlatin.conf \ - 69-unifont.conf \ - 70-no-bitmaps.conf \ -+ 70-no-bitmaps-and-emoji.conf \ -+ 70-no-bitmaps-except-emoji.conf \ - 70-yes-bitmaps.conf \ - 80-delicious.conf \ - 90-synthetic.conf -diff --git a/conf.d/meson.build b/conf.d/meson.build -index 8e896118..b6d07ee0 100644 ---- a/conf.d/meson.build -+++ b/conf.d/meson.build -@@ -36,6 +36,8 @@ conf_files = [ - '65-nonlatin.conf', - '69-unifont.conf', - '70-no-bitmaps.conf', -+ '70-no-bitmaps-and-emoji.conf', -+ '70-no-bitmaps-except-emoji.conf', - '70-yes-bitmaps.conf', - '80-delicious.conf', - '90-synthetic.conf', --- -GitLab - diff --git a/fontconfig-fix-remap.patch b/fontconfig-fix-remap.patch deleted file mode 100644 index 5809a0b..0000000 --- a/fontconfig-fix-remap.patch +++ /dev/null @@ -1,81 +0,0 @@ -From fc0e9a78d2fe3b26f0b93c2a99b160e75e2a9f89 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -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 -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@!$TESTTMPDIR/fonts! - 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@!$TESTTMPDIR/fonts! - 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 - diff --git a/fontconfig-remove-uuid.patch b/fontconfig-remove-uuid.patch deleted file mode 100644 index 16c0d04..0000000 --- a/fontconfig-remove-uuid.patch +++ /dev/null @@ -1,67 +0,0 @@ -From c22908828fb2dbfdf38733d119adc1cf5fe00173 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Sat, 10 Feb 2024 00:20:54 +0900 -Subject: [PATCH 1/2] Clean up .uuid files with fc-cache -f too - -.uuid file was obsoleted >5 years ago and it was supposed to -be cleaned up by fc-cache -r but not -f. -This change tries to clean it up by fc-cache -f. - -https://bugzilla.redhat.com/show_bug.cgi?id=1761885 ---- - src/fcdir.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/fcdir.c b/src/fcdir.c -index 6f7b3835..2e4fdc69 100644 ---- a/src/fcdir.c -+++ b/src/fcdir.c -@@ -234,7 +234,7 @@ FcDirScanConfig (FcFontSet *set, - - if (FcDebug () & FC_DBG_SCAN) - printf ("\tScanning dir %s\n", s_dir); -- -+ - d = opendir ((char *) s_dir); - if (!d) - { -@@ -459,7 +459,10 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config) - - /* Not using existing cache file, construct new cache */ - if (!cache) -+ { -+ FcDirCacheDeleteUUID (dir, config); - cache = FcDirCacheScan (dir, config); -+ } - FcConfigDestroy (config); - - return cache; --- -2.43.0 - -From a76b95105ca26c600279b2daf4bd43b37a918823 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Sat, 10 Feb 2024 02:15:45 +0900 -Subject: [PATCH 2/2] Fix undesired unref of FcConfig on Win32 - ---- - src/fccache.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/fccache.c b/src/fccache.c -index cebbb810..54f76ac1 100644 ---- a/src/fccache.c -+++ b/src/fccache.c -@@ -106,8 +106,8 @@ FcDirCacheDeleteUUID (const FcChar8 *dir, - FcStrFree (target); - bail: - FcStrFree (d); --#endif - FcConfigDestroy (config); -+#endif - - return ret; - } --- -2.43.0 - From cab4ae8a7abc7f2ffaf75c85df04da5c1f039130 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 18 Jan 2025 01:40:36 +0900 Subject: [PATCH 44/56] Add a reference to bz --- fontconfig.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/fontconfig.spec b/fontconfig.spec index 77d4737..3ae94db 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -201,6 +201,7 @@ fi %changelog * Sat Jan 18 2025 Akira TAGOH - 2.16.0-1 - New upstream release. + Resolves: rhbz#2338618 - Use meson instead of autotools to build. * Thu Jan 16 2025 Fedora Release Engineering - 2.15.0-9 From 54b18701644f67c1ef6be4e400358e276c690374 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 20 Jan 2025 16:43:04 +0900 Subject: [PATCH 45/56] Patch meson.build instead of creating a cache dir --- fontconfig-meson-cachedir.patch | 29 +++++++++++++++++++++++++++++ fontconfig.spec | 4 +++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 fontconfig-meson-cachedir.patch diff --git a/fontconfig-meson-cachedir.patch b/fontconfig-meson-cachedir.patch new file mode 100644 index 0000000..e1313c9 --- /dev/null +++ b/fontconfig-meson-cachedir.patch @@ -0,0 +1,29 @@ +From 9b864e8ceb480c31cd76ce3fe1d6215f8655ec55 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Mon, 20 Jan 2025 12:08:36 +0900 +Subject: [PATCH] meson: create fc_cachedir at the installation time + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/445 +--- + meson.build | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/meson.build b/meson.build +index 4439758..85968b2 100644 +--- a/meson.build ++++ b/meson.build +@@ -550,6 +550,11 @@ if not meson.is_subproject() + meson.add_dist_script('build-aux/meson-dist-autotools.py') + endif + ++if host_machine.system() != 'windows' ++ install_emptydir(fc_cachedir, ++ install_tag: 'runtime') ++endif ++ + # Summary + doc_targets = get_variable('doc_targets', []) + +-- +2.48.1 + diff --git a/fontconfig.spec b/fontconfig.spec index 3ae94db..4aa9a9f 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -22,6 +22,7 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch +Patch7: %{name}-meson-cachedir.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -84,7 +85,6 @@ mv conf.d/65-nonlatin.conf conf.d/69-nonlatin.conf %install %meson_install -install -d $RPM_BUILD_ROOT/usr/lib/fontconfig/cache install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ @@ -111,6 +111,8 @@ done # adjust the timestamp to avoid conflicts for multilib touch -r doc/fontconfig-user.sgml fontconfig-user.txt touch -r doc/fontconfig-user.sgml fontconfig-user.html +touch -r doc/fontconfig-devel.sgml fontconfig-devel.txt +touch -r doc/fontconfig-devel.sgml fontconfig-devel.html # rename fc-cache binary mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa_bits} From d1acb38e3bebda20cd1c0d6e3e4a1b68cdaf9def Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 23 Jan 2025 22:44:43 +0900 Subject: [PATCH 46/56] Add gcc to BR --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 4aa9a9f..7ca4d3e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -30,7 +30,7 @@ BuildRequires: fontpackages-devel BuildRequires: gettext BuildRequires: gperf BuildRequires: docbook-utils docbook-utils-pdf -BuildRequires: meson ninja-build +BuildRequires: meson ninja-build gcc Requires: fonts-filesystem freetype # Register DTD system-wide to make validation work by default From 64359ad1d0b91eaa9444791a7fc531677848c0d6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 23 Jan 2025 23:32:46 +0900 Subject: [PATCH 47/56] Disable meson test on s390x temporarily --- fontconfig.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fontconfig.spec b/fontconfig.spec index 7ca4d3e..fe79d5e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -127,7 +127,10 @@ install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache cat %{name}-conf.lang >> %{name}.lang %check +# rhbz#2341757: md5 calculation seems wrong on s390x. unable to finish testcases properly +%ifnarch s390x %meson_test +%endif %post umask 0022 @@ -205,6 +208,7 @@ fi - New upstream release. Resolves: rhbz#2338618 - Use meson instead of autotools to build. +- Disable meson test on s390x temporarily. * Thu Jan 16 2025 Fedora Release Engineering - 2.15.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 7ee5fe699075534ca734e18039d8fdfd7ff83a82 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 27 Jan 2025 11:20:30 +0900 Subject: [PATCH 48/56] Fix endian detection. Resolves: rhbz#2341757 --- fontconfig-meson-endianness.patch | 25 +++++++++++++++++++++++++ fontconfig.spec | 8 +++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 fontconfig-meson-endianness.patch diff --git a/fontconfig-meson-endianness.patch b/fontconfig-meson-endianness.patch new file mode 100644 index 0000000..d880c4d --- /dev/null +++ b/fontconfig-meson-endianness.patch @@ -0,0 +1,25 @@ +diff --git a/meson.build b/meson.build +index 85968b29..b9501dfc 100644 +--- a/meson.build ++++ b/meson.build +@@ -181,6 +181,7 @@ conf.set_quoted('PACKAGE_VERSION', meson.project_version()) + conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_version())) + conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new') + conf.set_quoted('PACKAGE_URL', '') ++conf.set('WORDS_BIGENDIAN', (host_machine.endian() == 'big').to_int()) + + if host_machine.system() == 'windows' + conf.set('EXEEXT', '.exe') +diff --git a/src/fcmd5.h b/src/fcmd5.h +index 7e8a6e1e..bf507285 100644 +--- a/src/fcmd5.h ++++ b/src/fcmd5.h +@@ -27,7 +27,7 @@ static void MD5Update(struct MD5Context *ctx, const unsigned char *buf, unsigned + static void MD5Final(unsigned char digest[16], struct MD5Context *ctx); + static void MD5Transform(FcChar32 buf[4], FcChar32 in[16]); + +-#ifndef WORDS_BIGENDIAN ++#if !defined(WORDS_BIGENDIAN) || !WORDS_BIGENDIAN + #define byteReverse(buf, len) /* Nothing */ + #else + /* diff --git a/fontconfig.spec b/fontconfig.spec index fe79d5e..93ea1dd 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -23,6 +23,7 @@ Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch Patch7: %{name}-meson-cachedir.patch +Patch8: %{name}-meson-endianness.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -127,10 +128,7 @@ install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache cat %{name}-conf.lang >> %{name}.lang %check -# rhbz#2341757: md5 calculation seems wrong on s390x. unable to finish testcases properly -%ifnarch s390x %meson_test -%endif %post umask 0022 @@ -204,6 +202,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Mon Jan 27 2025 Akira TAGOH - 2.16.0-2 +- Fix endian detection. + Resolves: rhbz#2341757 + * Sat Jan 18 2025 Akira TAGOH - 2.16.0-1 - New upstream release. Resolves: rhbz#2338618 From 702de2a7ad716ed043810107d59855470691761a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 27 Jan 2025 11:46:26 +0900 Subject: [PATCH 49/56] Bump the release --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index 93ea1dd..10096f7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.16.0 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 From 97f5c4867adcb8c26ae2434f9a9d29cbbd09ca0e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 13 Mar 2025 20:46:19 +0900 Subject: [PATCH 50/56] New upstream release. --- .gitignore | 1 + fontconfig-drop-lang-from-pkgkit-format.patch | 20 +++++++++---------- fontconfig.spec | 11 ++++++---- sources | 1 + 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index b63773a..866d60a 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.14.2.tar.xz /fontconfig-2.15.0.tar.xz /fontconfig-2.16.0.tar.xz +/fontconfig-2.16.1.tar.xz diff --git a/fontconfig-drop-lang-from-pkgkit-format.patch b/fontconfig-drop-lang-from-pkgkit-format.patch index 8b77308..abece6d 100644 --- a/fontconfig-drop-lang-from-pkgkit-format.patch +++ b/fontconfig-drop-lang-from-pkgkit-format.patch @@ -1,12 +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:-|basename}: \"%{family[0]:-}\" \"%{style[0]:-}\"" - #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}}" - +diff -pruN fontconfig-2.16.1.orig/src/fcformat.c fontconfig-2.16.1/src/fcformat.c +--- fontconfig-2.16.1.orig/src/fcformat.c 2025-03-13 20:16:47.000000000 +0900 ++++ fontconfig-2.16.1/src/fcformat.c 2025-03-13 20:42:03.633324643 +0900 +@@ -77,7 +77,7 @@ + #define FCCAT_FORMAT "\"%{file|basename|cescape}\" %{index} \"%{-file{%{=unparse|cescape}}}\"" + #define FCMATCH_FORMAT "%{file:-|basename}: \"%{family[0]:-}\" \"%{style[0]:-}\"" + #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 + message (const char *fmt, ...) diff --git a/fontconfig.spec b/fontconfig.spec index 10096f7..0502868 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,8 +4,8 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.16.0 -Release: 2%{?dist} +Version: 2.16.1 +Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -22,8 +22,6 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch -Patch7: %{name}-meson-cachedir.patch -Patch8: %{name}-meson-endianness.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -89,6 +87,8 @@ mv conf.d/65-nonlatin.conf conf.d/69-nonlatin.conf install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ +rm $RPM_BUILD_ROOT/%{_libdir}/libfontconfig.a + # Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf @@ -202,6 +202,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Thu Mar 13 2025 Akira TAGOH - 2.16.1-1 +- New upstream release. + * Mon Jan 27 2025 Akira TAGOH - 2.16.0-2 - Fix endian detection. Resolves: rhbz#2341757 diff --git a/sources b/sources index 5a758f7..2efbd1f 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (fontconfig-2.16.0.tar.xz) = 90b5c39e5eadc56a9fbddd69b2a6eaa6bf9ee5cda003091b0896e66f87f3c1be8ab4442f54d20fca7232d72f60d9578f5e5ba3f376e39b64b8a2aa7b8f13b062 +SHA512 (fontconfig-2.16.1.tar.xz) = 50901593e7d3ae1727a9ae3861f2d4074e1f031f8a5ac0cb5ab8db90e35c2a12bd14e9f40185187035887a26c3aca054a751fcf97f5cff63484091aa386fec8b From 3a435a53cb482bd8c33827561775197548adcf3a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 11 Apr 2025 16:57:07 +0900 Subject: [PATCH 51/56] New upstream release. --- .gitignore | 1 + fontconfig.spec | 5 ++++- sources | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 866d60a..ef7450e 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.15.0.tar.xz /fontconfig-2.16.0.tar.xz /fontconfig-2.16.1.tar.xz +/fontconfig-2.16.2.tar.xz diff --git a/fontconfig.spec b/fontconfig.spec index 0502868..7e5818d 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,7 +4,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.16.1 +Version: 2.16.2 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -202,6 +202,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Fri Apr 11 2025 Akira TAGOH - 2.16.2-1 +- New upstream release. + * Thu Mar 13 2025 Akira TAGOH - 2.16.1-1 - New upstream release. diff --git a/sources b/sources index 2efbd1f..f17bc64 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (fontconfig-2.16.0.tar.xz) = 90b5c39e5eadc56a9fbddd69b2a6eaa6bf9ee5cda003091b0896e66f87f3c1be8ab4442f54d20fca7232d72f60d9578f5e5ba3f376e39b64b8a2aa7b8f13b062 -SHA512 (fontconfig-2.16.1.tar.xz) = 50901593e7d3ae1727a9ae3861f2d4074e1f031f8a5ac0cb5ab8db90e35c2a12bd14e9f40185187035887a26c3aca054a751fcf97f5cff63484091aa386fec8b +SHA512 (fontconfig-2.16.2.tar.xz) = b51ac822f00b41026d74b73aabcdb5ec766b68c478fdb0a50d5ec20c5ad4661ba38417aac088ee86ef097bd1ecda708f818636389acb34502444298a08701c12 From 518fc318a28bc4058a74a82a38c06112748f440e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 11 Apr 2025 17:14:41 +0900 Subject: [PATCH 52/56] Adjust patches and cleanup --- ...config-disable-network-required-test.patch | 26 +++++++++-------- fontconfig-meson-cachedir.patch | 29 ------------------- fontconfig-meson-endianness.patch | 25 ---------------- 3 files changed, 14 insertions(+), 66 deletions(-) delete mode 100644 fontconfig-meson-cachedir.patch delete mode 100644 fontconfig-meson-endianness.patch diff --git a/fontconfig-disable-network-required-test.patch b/fontconfig-disable-network-required-test.patch index b276aa5..d73f26a 100644 --- a/fontconfig-disable-network-required-test.patch +++ b/fontconfig-disable-network-required-test.patch @@ -1,16 +1,16 @@ -diff -pruN fontconfig-2.16.0.orig/test/meson.build fontconfig-2.16.0/test/meson.build ---- fontconfig-2.16.0.orig/test/meson.build 2025-01-18 00:15:05.000000000 +0900 -+++ fontconfig-2.16.0/test/meson.build 2025-01-18 01:07:12.893480441 +0900 -@@ -15,7 +15,7 @@ if host_machine.system() != 'windows' - ['test-bz106632.c', {'c_args': ['-DFONTFILE="@0@"'.format(join_paths(meson.current_source_dir(), '4x6.pcf'))]}], - ['test-issue107.c'], # FIXME: fails on mingw +diff -pruN fontconfig-2.16.2.orig/test/meson.build fontconfig-2.16.2/test/meson.build +--- fontconfig-2.16.2.orig/test/meson.build 2025-04-11 15:47:01.000000000 +0900 ++++ fontconfig-2.16.2/test/meson.build 2025-04-11 17:09:10.556195744 +0900 +@@ -18,7 +18,7 @@ if host_machine.system() != 'windows' + ] + tests_not_parallel += [ # FIXME: this needs NotoSans-hinted.zip font downloaded and unpacked into test build directory! see run-test.sh - ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread + #['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread ] if get_option('default_library') == 'static' -@@ -62,12 +62,12 @@ if host_machine.system() != 'windows' +@@ -70,13 +70,13 @@ if host_machine.system() != 'windows' test('run_test_sh', find_program('run-test.sh'), timeout: 600, env: ['srcdir=@0@'.format(meson.current_source_dir()), 'builddir=@0@'.format(meson.current_build_dir()), 'EXEEXT=@0@'.format(conf.get('EXEEXT')), 'VERBOSE=1']) @@ -18,20 +18,22 @@ diff -pruN fontconfig-2.16.0.orig/test/meson.build fontconfig-2.16.0/test/meson. - test('pytest', pytest, args: ['--tap'], - workdir: meson.current_source_dir(), - env: ['builddir=@0@'.format(meson.current_build_dir())], -- protocol: 'tap') +- protocol: 'tap', +- timeout: 600) - endif +# if pytest.found() +# test('pytest', pytest, args: ['--tap'], +# workdir: meson.current_source_dir(), +# env: ['builddir=@0@'.format(meson.current_build_dir())], -+# protocol: 'tap') ++# protocol: 'tap', ++# timeout: 600) +# endif endif if jsonc_dep.found() -diff -pruN fontconfig-2.16.0.orig/test/run-test.sh fontconfig-2.16.0/test/run-test.sh ---- fontconfig-2.16.0.orig/test/run-test.sh 2025-01-18 00:15:05.000000000 +0900 -+++ fontconfig-2.16.0/test/run-test.sh 2025-01-18 01:06:54.310144693 +0900 +diff -pruN fontconfig-2.16.2.orig/test/run-test.sh fontconfig-2.16.2/test/run-test.sh +--- fontconfig-2.16.2.orig/test/run-test.sh 2025-04-11 15:47:01.000000000 +0900 ++++ fontconfig-2.16.2/test/run-test.sh 2025-04-11 17:08:18.741839058 +0900 @@ -499,18 +499,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" "$B fi # if [ "x$EXEEXT" = "x" ] diff --git a/fontconfig-meson-cachedir.patch b/fontconfig-meson-cachedir.patch deleted file mode 100644 index e1313c9..0000000 --- a/fontconfig-meson-cachedir.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 9b864e8ceb480c31cd76ce3fe1d6215f8655ec55 Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Mon, 20 Jan 2025 12:08:36 +0900 -Subject: [PATCH] meson: create fc_cachedir at the installation time - -Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/445 ---- - meson.build | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/meson.build b/meson.build -index 4439758..85968b2 100644 ---- a/meson.build -+++ b/meson.build -@@ -550,6 +550,11 @@ if not meson.is_subproject() - meson.add_dist_script('build-aux/meson-dist-autotools.py') - endif - -+if host_machine.system() != 'windows' -+ install_emptydir(fc_cachedir, -+ install_tag: 'runtime') -+endif -+ - # Summary - doc_targets = get_variable('doc_targets', []) - --- -2.48.1 - diff --git a/fontconfig-meson-endianness.patch b/fontconfig-meson-endianness.patch deleted file mode 100644 index d880c4d..0000000 --- a/fontconfig-meson-endianness.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/meson.build b/meson.build -index 85968b29..b9501dfc 100644 ---- a/meson.build -+++ b/meson.build -@@ -181,6 +181,7 @@ conf.set_quoted('PACKAGE_VERSION', meson.project_version()) - conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_version())) - conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new') - conf.set_quoted('PACKAGE_URL', '') -+conf.set('WORDS_BIGENDIAN', (host_machine.endian() == 'big').to_int()) - - if host_machine.system() == 'windows' - conf.set('EXEEXT', '.exe') -diff --git a/src/fcmd5.h b/src/fcmd5.h -index 7e8a6e1e..bf507285 100644 ---- a/src/fcmd5.h -+++ b/src/fcmd5.h -@@ -27,7 +27,7 @@ static void MD5Update(struct MD5Context *ctx, const unsigned char *buf, unsigned - static void MD5Final(unsigned char digest[16], struct MD5Context *ctx); - static void MD5Transform(FcChar32 buf[4], FcChar32 in[16]); - --#ifndef WORDS_BIGENDIAN -+#if !defined(WORDS_BIGENDIAN) || !WORDS_BIGENDIAN - #define byteReverse(buf, len) /* Nothing */ - #else - /* From 9a1e8029b08ec413091ea00d11801700b8cd64bd Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 27 Jun 2025 14:48:43 +0900 Subject: [PATCH 53/56] New upstream release. Resolves: rhbz#2375126 --- .gitignore | 1 + ...config-disable-network-required-test.patch | 77 +++++++++++++++---- fontconfig.spec | 8 +- sources | 2 +- 4 files changed, 69 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index ef7450e..8ea9665 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.16.0.tar.xz /fontconfig-2.16.1.tar.xz /fontconfig-2.16.2.tar.xz +/fontconfig-2.17.0.tar.xz diff --git a/fontconfig-disable-network-required-test.patch b/fontconfig-disable-network-required-test.patch index d73f26a..e048b49 100644 --- a/fontconfig-disable-network-required-test.patch +++ b/fontconfig-disable-network-required-test.patch @@ -1,40 +1,87 @@ -diff -pruN fontconfig-2.16.2.orig/test/meson.build fontconfig-2.16.2/test/meson.build ---- fontconfig-2.16.2.orig/test/meson.build 2025-04-11 15:47:01.000000000 +0900 -+++ fontconfig-2.16.2/test/meson.build 2025-04-11 17:09:10.556195744 +0900 -@@ -18,7 +18,7 @@ if host_machine.system() != 'windows' +diff -pruN fontconfig-2.17.0.orig/test/meson.build fontconfig-2.17.0/test/meson.build +--- fontconfig-2.17.0.orig/test/meson.build 2025-06-27 12:12:04.000000000 +0900 ++++ fontconfig-2.17.0/test/meson.build 2025-06-27 14:41:08.843726446 +0900 +@@ -1,16 +1,16 @@ +-fetch_test_fonts = custom_target( +- 'fetch_test_fonts', +- output: 'testfonts', +- command: [ +- python3, +- join_paths(meson.project_source_root(), 'build-aux', 'fetch-testfonts.py'), +- '--target-dir', +- '@BUILD_ROOT@/testfonts', +- '--try-symlink', +- ], +- build_by_default: false, +- build_always_stale: true, +-) ++#fetch_test_fonts = custom_target( ++# 'fetch_test_fonts', ++# output: 'testfonts', ++# command: [ ++# python3, ++# join_paths(meson.project_source_root(), 'build-aux', 'fetch-testfonts.py'), ++# '--target-dir', ++# '@BUILD_ROOT@/testfonts', ++# '--try-symlink', ++# ], ++# build_by_default: false, ++# build_always_stale: true, ++#) + + tests = [ + ['test-bz89617.c', {'c_args': ['-DSRCDIR="@0@"'.format(meson.current_source_dir())]}], +@@ -33,7 +33,7 @@ if host_machine.system() != 'windows' ] tests_not_parallel += [ # FIXME: this needs NotoSans-hinted.zip font downloaded and unpacked into test build directory! see run-test.sh - ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread -+ #['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread ++ # ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread + ['test-mt-fccfg.c', {'include_directories': include_directories('../src'), 'dependencies': dependency('threads')}], ] - if get_option('default_library') == 'static' -@@ -70,13 +70,13 @@ if host_machine.system() != 'windows' +@@ -74,10 +74,10 @@ foreach test_data : tests + tests_not_pa + endforeach + + +-if get_option('fontations').enabled() +- rust = import('rust') +- rust.test('fc_fontations_rust_tests', fc_fontations, link_with: [libfontconfig_internal], depends: fetch_test_fonts, env: ['builddir=@0@'.format(meson.project_build_root())],) +-endif ++#if get_option('fontations').enabled() ++# rust = import('rust') ++# rust.test('fc_fontations_rust_tests', fc_fontations, link_with: [libfontconfig_internal], depends: fetch_test_fonts, env: ['builddir=@0@'.format(meson.project_build_root())],) ++#endif + + fs = import('fs') + +@@ -92,14 +92,14 @@ if host_machine.system() != 'windows' test('run_test_sh', find_program('run-test.sh'), timeout: 600, env: ['srcdir=@0@'.format(meson.current_source_dir()), 'builddir=@0@'.format(meson.current_build_dir()), 'EXEEXT=@0@'.format(conf.get('EXEEXT')), 'VERBOSE=1']) - if pytest.found() - test('pytest', pytest, args: ['--tap'], - workdir: meson.current_source_dir(), -- env: ['builddir=@0@'.format(meson.current_build_dir())], +- env: ['builddir=@0@'.format(meson.project_build_root())], - protocol: 'tap', -- timeout: 600) +- timeout: 600, +- depends: fetch_test_fonts) - endif +# if pytest.found() +# test('pytest', pytest, args: ['--tap'], +# workdir: meson.current_source_dir(), -+# env: ['builddir=@0@'.format(meson.current_build_dir())], ++# env: ['builddir=@0@'.format(meson.project_build_root())], +# protocol: 'tap', -+# timeout: 600) ++# timeout: 600, ++# depends: fetch_test_fonts) +# endif endif if jsonc_dep.found() -diff -pruN fontconfig-2.16.2.orig/test/run-test.sh fontconfig-2.16.2/test/run-test.sh ---- fontconfig-2.16.2.orig/test/run-test.sh 2025-04-11 15:47:01.000000000 +0900 -+++ fontconfig-2.16.2/test/run-test.sh 2025-04-11 17:08:18.741839058 +0900 -@@ -499,18 +499,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" "$B +diff -pruN fontconfig-2.17.0.orig/test/run-test.sh fontconfig-2.17.0/test/run-test.sh +--- fontconfig-2.17.0.orig/test/run-test.sh 2025-06-27 12:12:04.000000000 +0900 ++++ fontconfig-2.17.0/test/run-test.sh 2025-06-27 14:39:19.098581228 +0900 +@@ -521,18 +521,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" "$B fi # if [ "x$EXEEXT" = "x" ] diff --git a/fontconfig.spec b/fontconfig.spec index 7e5818d..0c5b455 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,7 +4,7 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.16.2 +Version: 2.17.0 Release: 1%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code @@ -87,8 +87,6 @@ mv conf.d/65-nonlatin.conf conf.d/69-nonlatin.conf install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ -rm $RPM_BUILD_ROOT/%{_libdir}/libfontconfig.a - # Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf @@ -202,6 +200,10 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Fri Jun 27 2025 Akira TAGOH - 2.17.0-1 +- New upstream release. + Resolves: rhbz#2375126 + * Fri Apr 11 2025 Akira TAGOH - 2.16.2-1 - New upstream release. diff --git a/sources b/sources index f17bc64..9a3bb99 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.16.2.tar.xz) = b51ac822f00b41026d74b73aabcdb5ec766b68c478fdb0a50d5ec20c5ad4661ba38417aac088ee86ef097bd1ecda708f818636389acb34502444298a08701c12 +SHA512 (fontconfig-2.17.0.tar.xz) = dd64905c3e0e5c5881df505b8f0bea594bbac5ce145f57aedcd7130978cd285491497198d8f2d6ed26f7b2abb31268dc3ff97aa75ce998b8e57f2d5c75b240b4 From 8bca22ae6843289d280f9d03098bcede86764255 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 30 Jun 2025 16:50:15 +0900 Subject: [PATCH 54/56] Backport a patch to fix a crash with Graphite fonts Drop 70-*bitmaps*.conf from /etc/fonts/conf.d so far. Resolves: rhbz#2375426 --- fontconfig-fix-crash.patch | 28 ++++++++++++++++++++++++++++ fontconfig.spec | 9 +++++++++ 2 files changed, 37 insertions(+) create mode 100644 fontconfig-fix-crash.patch diff --git a/fontconfig-fix-crash.patch b/fontconfig-fix-crash.patch new file mode 100644 index 0000000..c52b33d --- /dev/null +++ b/fontconfig-fix-crash.patch @@ -0,0 +1,28 @@ +From b9bec06d73340f1b5727302d13ac3df307b7febc Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Mon, 30 Jun 2025 09:05:18 +0900 +Subject: [PATCH] Fix a heap buffer overflow + +https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/481 + +Changelog: fixed +--- + src/fcfreetype.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fcfreetype.c b/src/fcfreetype.c +index 7a4d9811..0a87d27a 100644 +--- a/src/fcfreetype.c ++++ b/src/fcfreetype.c +@@ -2661,7 +2661,7 @@ FcFontCapabilities (FT_Face face) + goto bail; + + maxsize = (((FT_ULong)gpos_count + (FT_ULong)gsub_count) * OTLAYOUT_LEN + +- (issilgraphitefont ? strlen(fcSilfCapability) : 0)); ++ (issilgraphitefont ? strlen(fcSilfCapability) + 1: 0)); + complex_ = malloc (sizeof (FcChar8) * maxsize); + if (!complex_) + goto bail; +-- +2.50.0 + diff --git a/fontconfig.spec b/fontconfig.spec index 0c5b455..ebc311e 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -22,6 +22,7 @@ Patch0: %{name}-sleep-less.patch Patch4: %{name}-drop-lang-from-pkgkit-format.patch Patch5: %{name}-disable-network-required-test.patch Patch6: %{name}-lower-nonlatin-conf.patch +Patch7: %{name}-fix-crash.patch BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -90,6 +91,9 @@ ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontc # Use implied value to allow the use of conditional conf rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf +# Do not enable bitmap-related conf +rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/70-*bitmaps*.conf + # Install docs manually install -d $RPM_BUILD_ROOT%{_mandir}/man1 install -d $RPM_BUILD_ROOT%{_mandir}/man3 @@ -200,6 +204,11 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Mon Jun 30 2025 Akira TAGOH - 2.17.0-2 +- Backport a patch to fix a crash with Graphite fonts +- Drop 70-*bitmaps*.conf from /etc/fonts/conf.d so far. + Resolves: rhbz#2375426 + * Fri Jun 27 2025 Akira TAGOH - 2.17.0-1 - New upstream release. Resolves: rhbz#2375126 From b06b4f8a9146a7e2fa129af061d270d44f16977e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 30 Jun 2025 16:51:15 +0900 Subject: [PATCH 55/56] bump a release --- fontconfig.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index ebc311e..e4c4b0d 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.17.0 -Release: 1%{?dist} +Release: 2%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 From 90ff975dce8834d53778e793405bb55abf7d6980 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 20:41:05 +0000 Subject: [PATCH 56/56] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- fontconfig.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fontconfig.spec b/fontconfig.spec index e4c4b0d..1bc63c7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.17.0 -Release: 2%{?dist} +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code ## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 @@ -204,6 +204,9 @@ fi %doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 2.17.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jun 30 2025 Akira TAGOH - 2.17.0-2 - Backport a patch to fix a crash with Graphite fonts - Drop 70-*bitmaps*.conf from /etc/fonts/conf.d so far.