Rebase to the latest release.
Resolves: rhbz#2023161
This commit is contained in:
parent
d15298cb8a
commit
e6d8942608
1
.gitignore
vendored
1
.gitignore
vendored
@ -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
|
||||
|
@ -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));
|
@ -1,122 +0,0 @@
|
||||
From fcada522913e5e07efa6367eff87ace9f06d24c8 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
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 <fontconfig/fontconfig.h>
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ const FcChar8 *doc = ""
|
||||
+ "<fontconfig>\n"
|
||||
+ " <include ignore_missing=\"yes\">blahblahblah</include>\n"
|
||||
+ "</fontconfig>\n"
|
||||
+ "";
|
||||
+ const FcChar8 *doc2 = ""
|
||||
+ "<fontconfig>\n"
|
||||
+ " <include ignore_missing=\"no\">blahblahblah</include>\n"
|
||||
+ "</fontconfig>\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
|
||||
|
@ -1,144 +0,0 @@
|
||||
From fbc05949ef52c8a8d69233eed77f6636dffec280 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
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 <akira@tagoh.org>
|
||||
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
|
||||
|
@ -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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Re-define fonts dirs sample</description>
|
||||
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!--
|
||||
fonts-persian.conf
|
||||
To configure Persian fonts from The FarsiWeb Project.
|
||||
diff -uNr fontconfig-2.13.92.orig/conf.d/65-khmer.conf fontconfig-2.13.92/conf.d/65-khmer.conf
|
||||
--- fontconfig-2.13.92.orig/conf.d/65-khmer.conf 2018-06-05 12:36:38.000000000 +0200
|
||||
+++ fontconfig-2.13.92/conf.d/65-khmer.conf 2020-03-28 15:53:41.813756638 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
diff -uNr fontconfig-2.13.92.orig/conf.d/65-nonlatin.conf fontconfig-2.13.92/conf.d/65-nonlatin.conf
|
||||
--- fontconfig-2.13.92.orig/conf.d/65-nonlatin.conf 2019-05-08 10:22:25.000000000 +0200
|
||||
+++ fontconfig-2.13.92/conf.d/65-nonlatin.conf 2020-03-28 15:53:41.825756394 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
diff -uNr fontconfig-2.13.92.orig/conf.d/69-unifont.conf fontconfig-2.13.92/conf.d/69-unifont.conf
|
||||
--- fontconfig-2.13.92.orig/conf.d/69-unifont.conf 2018-06-05 12:36:38.000000000 +0200
|
||||
+++ fontconfig-2.13.92/conf.d/69-unifont.conf 2020-03-28 15:53:41.821756475 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
diff -uNr fontconfig-2.13.92.orig/conf.d/70-no-bitmaps.conf fontconfig-2.13.92/conf.d/70-no-bitmaps.conf
|
||||
--- fontconfig-2.13.92.orig/conf.d/70-no-bitmaps.conf 2018-06-05 12:36:38.000000000 +0200
|
||||
+++ fontconfig-2.13.92/conf.d/70-no-bitmaps.conf 2020-03-28 15:53:41.788757147 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
diff -uNr fontconfig-2.13.92.orig/conf.d/70-yes-bitmaps.conf fontconfig-2.13.92/conf.d/70-yes-bitmaps.conf
|
||||
--- fontconfig-2.13.92.orig/conf.d/70-yes-bitmaps.conf 2018-06-05 12:36:38.000000000 +0200
|
||||
+++ fontconfig-2.13.92/conf.d/70-yes-bitmaps.conf 2020-03-28 15:53:41.780757310 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
diff -uNr fontconfig-2.13.92.orig/conf.d/80-delicious.conf fontconfig-2.13.92/conf.d/80-delicious.conf
|
||||
--- fontconfig-2.13.92.orig/conf.d/80-delicious.conf 2018-06-05 12:36:38.000000000 +0200
|
||||
+++ fontconfig-2.13.92/conf.d/80-delicious.conf 2020-03-28 15:53:41.800756903 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
diff -uNr fontconfig-2.13.92.orig/conf.d/90-synthetic.conf fontconfig-2.13.92/conf.d/90-synthetic.conf
|
||||
--- fontconfig-2.13.92.orig/conf.d/90-synthetic.conf 2018-07-19 05:14:39.000000000 +0200
|
||||
+++ fontconfig-2.13.92/conf.d/90-synthetic.conf 2020-03-28 15:53:41.776757391 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
||||
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
|
||||
diff -uNr fontconfig-2.13.92.orig/doc/fontconfig-user.html fontconfig-2.13.92/doc/fontconfig-user.html
|
||||
--- fontconfig-2.13.92.orig/doc/fontconfig-user.html 2019-08-09 13:12:38.000000000 +0200
|
||||
+++ fontconfig-2.13.92/doc/fontconfig-user.html 2020-03-28 15:53:41.694759061 +0100
|
||||
@@ -422,7 +422,7 @@
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
> <?xml version="1.0"?>
|
||||
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+ <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
...
|
||||
</fontconfig>
|
||||
@@ -1240,7 +1240,7 @@
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
><?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- /etc/fonts/fonts.conf file to configure system font access -->
|
||||
<fontconfig>
|
||||
<!--
|
||||
@@ -1367,7 +1367,7 @@
|
||||
><PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
><?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration -->
|
||||
<fontconfig>
|
||||
|
||||
diff -uNr fontconfig-2.13.92.orig/doc/fontconfig-user.sgml fontconfig-2.13.92/doc/fontconfig-user.sgml
|
||||
--- fontconfig-2.13.92.orig/doc/fontconfig-user.sgml 2018-11-15 13:20:50.000000000 +0100
|
||||
+++ fontconfig-2.13.92/doc/fontconfig-user.sgml 2020-03-28 15:53:41.680759345 +0100
|
||||
@@ -300,7 +300,7 @@
|
||||
following structure:
|
||||
<programlisting>
|
||||
<?xml version="1.0"?>
|
||||
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+ <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
...
|
||||
</fontconfig>
|
||||
@@ -573,7 +573,7 @@
|
||||
</para>
|
||||
<programlisting>
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- &confdir;/fonts.conf file to configure system font access -->
|
||||
<fontconfig>
|
||||
<!--
|
||||
@@ -684,7 +684,7 @@
|
||||
</para>
|
||||
<programlisting>
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration -->
|
||||
<fontconfig>
|
||||
|
||||
diff -uNr fontconfig-2.13.92.orig/doc/fontconfig-user.txt fontconfig-2.13.92/doc/fontconfig-user.txt
|
||||
--- fontconfig-2.13.92.orig/doc/fontconfig-user.txt 2019-08-09 13:12:20.000000000 +0200
|
||||
+++ fontconfig-2.13.92/doc/fontconfig-user.txt 2020-03-28 15:53:41.689759162 +0100
|
||||
@@ -261,7 +261,7 @@
|
||||
following structure:
|
||||
|
||||
<?xml version="1.0"?>
|
||||
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+ <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
...
|
||||
</fontconfig>
|
||||
@@ -573,7 +573,7 @@
|
||||
This is an example of a system-wide configuration file
|
||||
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- /etc/fonts/fonts.conf file to configure system font access -->
|
||||
<fontconfig>
|
||||
<!--
|
||||
@@ -683,7 +683,7 @@
|
||||
$XDG_CONFIG_HOME/fontconfig/fonts.conf
|
||||
|
||||
<?xml version="1.0"?>
|
||||
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+ <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration -->
|
||||
<fontconfig>
|
||||
|
||||
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
|
||||
<?xml version="1.0"?>
|
||||
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+ <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
\&...
|
||||
</fontconfig>
|
||||
@@ -554,7 +554,7 @@
|
||||
.sp
|
||||
.nf
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- /etc/fonts/fonts.conf file to configure system font access -->
|
||||
<fontconfig>
|
||||
<!--
|
||||
@@ -666,7 +666,7 @@
|
||||
.sp
|
||||
.nf
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration -->
|
||||
<fontconfig>
|
||||
|
||||
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 @@
|
||||
<?xml version="1.0"?>
|
||||
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<!-- /etc/fonts/fonts.conf file to configure system font access -->
|
||||
<fontconfig>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
|
@ -1,26 +0,0 @@
|
||||
From a4aa66a858f1ecd375c5efe5916398281f73f794 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Tojnar <jtojnar@gmail.com>
|
||||
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 @@
|
||||
<!--
|
||||
Reset the list of fonts directories
|
||||
-->
|
||||
-<!ELEMENT reset-dirs >
|
||||
+<!ELEMENT reset-dirs EMPTY>
|
||||
|
||||
<!--
|
||||
Periodically rescan the font configuration and
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,41 +0,0 @@
|
||||
diff -pruN fontconfig-2.13.92.orig/test/run-test.sh fontconfig-2.13.92/test/run-test.sh
|
||||
--- fontconfig-2.13.92.orig/test/run-test.sh 2020-01-30 20:19:55.148680493 +0900
|
||||
+++ fontconfig-2.13.92/test/run-test.sh 2020-01-30 20:25:48.604550017 +0900
|
||||
@@ -409,7 +409,7 @@ rm -rf $MYCACHEBASEDIR $MYCONFIG my-font
|
||||
|
||||
fi # if [ "x$EXEEXT" = "x" ]
|
||||
|
||||
-if [ -x $BUILDTESTDIR/test-crbug1004254 ]; then
|
||||
+if [ -x $BUILDTESTDIR/test-crbug1004254 ] && [ 0 -eq 1 ]; then
|
||||
dotest "MT-safe global config"
|
||||
prep
|
||||
curl -s -o $FONTDIR/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip
|
||||
From 8bddcb113779178e5b5ed711db08d9bfbff924cc Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
Date: Thu, 5 Dec 2019 19:55:06 +0900
|
||||
Subject: [PATCH] Fix a test fail when no bwrap was available
|
||||
|
||||
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/201
|
||||
---
|
||||
test/run-test.sh | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/test/run-test.sh b/test/run-test.sh
|
||||
index e1ee6d0..9b2e54b 100644
|
||||
--- a/test/run-test.sh
|
||||
+++ b/test/run-test.sh
|
||||
@@ -40,9 +40,8 @@ ECHO=true
|
||||
FCLIST="$LOG_COMPILER ../fc-list/fc-list$EXEEXT"
|
||||
FCCACHE="$LOG_COMPILER ../fc-cache/fc-cache$EXEEXT"
|
||||
|
||||
-which bwrap > /dev/null 2>&1
|
||||
-if [ $? -eq 0 ]; then
|
||||
- BWRAP=`which bwrap`
|
||||
+if [ -x "$(command -v bwrap)" ]; then
|
||||
+ BWRAP="$(command -v bwrap)"
|
||||
fi
|
||||
|
||||
FONT1=$TESTDIR/4x6.pcf
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,772 +0,0 @@
|
||||
From 93c93689f5da4ceaa675e006df63283e25b91d49 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
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 <bungeman@chromium.org>
|
||||
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 <bungeman@chromium.org>
|
||||
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 <bungeman@chromium.org>
|
||||
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 <bungeman@chromium.org>
|
||||
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 <bungeman@chromium.org>
|
||||
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 <bungeman@chromium.org>
|
||||
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 <Szunti@users.noreply.github.com>
|
||||
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 <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <fontconfig/fontconfig.h>
|
||||
+
|
||||
+#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 *) ""
|
||||
+ "<fontconfig>\n"
|
||||
+ " <match>\n"
|
||||
+ "";
|
||||
+
|
||||
+ const FcChar8 *xml_post = (const FcChar8 *) ""
|
||||
+ " <edit name=\""FC_TEST_RESULT"\">\n"
|
||||
+ " <bool>true</bool>\n"
|
||||
+ " </edit>\n"
|
||||
+ " </match>\n"
|
||||
+ "</fontconfig>\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 = "<test qual=\"all\" name=\"family\" compare=\"not_eq\">\n"
|
||||
+ " <string>foo</string>\n"
|
||||
+ "</test>\n"
|
||||
+ "";
|
||||
+ SHOULD_MATCH(pat, test);
|
||||
+
|
||||
+ test = ""
|
||||
+ "<test qual=\"all\" name=\"family\" compare=\"not_eq\">\n"
|
||||
+ " <string>family2</string>\n"
|
||||
+ "</test>\n"
|
||||
+ "";
|
||||
+ SHOULD_NOT_MATCH(pat, test);
|
||||
+
|
||||
+ test = ""
|
||||
+ "<test qual=\"any\" name=\"family\" compare=\"eq\">\n"
|
||||
+ " <string>family3</string>\n"
|
||||
+ "</test>\n"
|
||||
+ "";
|
||||
+ SHOULD_MATCH(pat, test);
|
||||
+
|
||||
+ test = ""
|
||||
+ "<test qual=\"any\" name=\"family\" compare=\"eq\">\n"
|
||||
+ " <string>foo</string>\n"
|
||||
+ "</test>\n"
|
||||
+ "";
|
||||
+ SHOULD_NOT_MATCH(pat, test);
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ return (TestFamily ());
|
||||
+}
|
||||
--
|
||||
2.29.2
|
||||
|
40
fontconfig-lcdfilter.patch
Normal file
40
fontconfig-lcdfilter.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 2b897d4624f015c0f59a9f46925b758adfc79190 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
Date: Mon, 19 Jul 2021 21:03:20 +0900
|
||||
Subject: [PATCH] Enable 11-lcdfilter-default.conf by default
|
||||
|
||||
Some applications needs this enabled by default on non-GNOME desktops.
|
||||
|
||||
reference: https://bugzilla.redhat.com/show_bug.cgi?id=1965684
|
||||
---
|
||||
conf.d/Makefile.am | 1 +
|
||||
conf.d/meson.build | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am
|
||||
index 710318c1..43b6e2b9 100644
|
||||
--- a/conf.d/Makefile.am
|
||||
+++ b/conf.d/Makefile.am
|
||||
@@ -32,6 +32,7 @@ DOC_FILES = $(DOC_SOURCES:.in=)
|
||||
CONF_LINKS = \
|
||||
10-hinting-$(PREFERRED_HINTING).conf \
|
||||
10-scale-bitmap-fonts.conf \
|
||||
+ 11-lcdfilter-default.conf \
|
||||
20-unhint-small-vera.conf \
|
||||
30-metric-aliases.conf \
|
||||
40-nonlatin.conf \
|
||||
diff --git a/conf.d/meson.build b/conf.d/meson.build
|
||||
index 2cb144ee..172e2af2 100644
|
||||
--- a/conf.d/meson.build
|
||||
+++ b/conf.d/meson.build
|
||||
@@ -42,6 +42,7 @@ preferred_hinting = 'slight'
|
||||
conf_links = [
|
||||
'10-hinting-@0@.conf'.format(preferred_hinting),
|
||||
'10-scale-bitmap-fonts.conf',
|
||||
+ '11-lcdfilter-default.conf',
|
||||
'20-unhint-small-vera.conf',
|
||||
'30-metric-aliases.conf',
|
||||
'40-nonlatin.conf',
|
||||
--
|
||||
2.32.0
|
||||
|
1439
fontconfig-mt.patch
1439
fontconfig-mt.patch
File diff suppressed because it is too large
Load Diff
@ -1,228 +0,0 @@
|
||||
From c9862b6ea7c3234b29f6500c7d07359847e55ed7 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
Date: Mon, 28 Oct 2019 17:11:38 +0900
|
||||
Subject: [PATCH 1/9] Read latest cache in paths
|
||||
|
||||
Right now fontconfig uses a cache found first in a path and
|
||||
cachedirs are the order of the system-wide path and then the user path.
|
||||
this is due to avoid writing caches into the user path when running as root.
|
||||
|
||||
However, changing caches by certain config only, e.g. using <match target="scan">
|
||||
may not take effect by this behavior, because it may be stored into the user path.
|
||||
|
||||
Thus, needing to find the latest cache out from paths.
|
||||
|
||||
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/182
|
||||
---
|
||||
src/fccache.c | 36 +++++++++++++++++++++-----
|
||||
test/run-test.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 96 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/fccache.c b/src/fccache.c
|
||||
index 0976201..4acde22 100644
|
||||
--- a/src/fccache.c
|
||||
+++ b/src/fccache.c
|
||||
@@ -338,7 +338,7 @@ FcDirCacheOpenFile (const FcChar8 *cache_file, struct stat *file_stat)
|
||||
static FcBool
|
||||
FcDirCacheProcess (FcConfig *config, const FcChar8 *dir,
|
||||
FcBool (*callback) (FcConfig *config, int fd, struct stat *fd_stat,
|
||||
- struct stat *dir_stat, void *closure),
|
||||
+ struct stat *dir_stat, struct timeval *cache_mtime, void *closure),
|
||||
void *closure, FcChar8 **cache_file_ret)
|
||||
{
|
||||
int fd = -1;
|
||||
@@ -348,6 +348,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);
|
||||
@@ -383,15 +384,18 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir,
|
||||
#endif
|
||||
fd = FcDirCacheOpenFile (cache_hashed, &file_stat);
|
||||
if (fd >= 0) {
|
||||
- ret = (*callback) (config, fd, &file_stat, &dir_stat, closure);
|
||||
+ ret = (*callback) (config, fd, &file_stat, &dir_stat, &latest_mtime, closure);
|
||||
close (fd);
|
||||
if (ret)
|
||||
{
|
||||
if (cache_file_ret)
|
||||
+ {
|
||||
+ if (*cache_file_ret)
|
||||
+ FcStrFree (*cache_file_ret);
|
||||
*cache_file_ret = cache_hashed;
|
||||
+ }
|
||||
else
|
||||
FcStrFree (cache_hashed);
|
||||
- break;
|
||||
}
|
||||
}
|
||||
#ifndef _WIN32
|
||||
@@ -414,7 +418,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
- FcStrFree (cache_hashed);
|
||||
+ else
|
||||
+ FcStrFree (cache_hashed);
|
||||
}
|
||||
FcStrListDone (list);
|
||||
|
||||
@@ -998,12 +1003,31 @@ FcDirCacheUnload (FcCache *cache)
|
||||
}
|
||||
|
||||
static FcBool
|
||||
-FcDirCacheMapHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure)
|
||||
+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;
|
||||
|
||||
if (!cache)
|
||||
return FcFalse;
|
||||
+ cache_mtime.tv_sec = fd_stat->st_mtime;
|
||||
+#ifdef HAVE_STRUCT_STAT_ST_MTIM
|
||||
+ cache_mtime.tv_usec = fd_stat->st_mtim.tv_nsec / 1000;
|
||||
+#else
|
||||
+ cache_mtime.tv_usec = 0;
|
||||
+#endif
|
||||
+ if (timercmp (latest_cache_mtime, &cache_mtime, <))
|
||||
+ {
|
||||
+ if (*((FcCache **) closure))
|
||||
+ FcDirCacheUnload (*((FcCache **) closure));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ FcDirCacheUnload (cache);
|
||||
+ return FcFalse;
|
||||
+ }
|
||||
+ latest_cache_mtime->tv_sec = cache_mtime.tv_sec;
|
||||
+ latest_cache_mtime->tv_usec = cache_mtime.tv_usec;
|
||||
*((FcCache **) closure) = cache;
|
||||
return FcTrue;
|
||||
}
|
||||
@@ -1093,7 +1117,7 @@ FcDirChecksumNano (struct stat *statb)
|
||||
* the magic number and the size field
|
||||
*/
|
||||
static FcBool
|
||||
-FcDirCacheValidateHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure FC_UNUSED)
|
||||
+FcDirCacheValidateHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *latest_cache_mtime, void *closure FC_UNUSED)
|
||||
{
|
||||
FcBool ret = FcTrue;
|
||||
FcCache c;
|
||||
diff --git a/test/run-test.sh b/test/run-test.sh
|
||||
index 4e5968b..8ad09e3 100644
|
||||
--- a/test/run-test.sh
|
||||
+++ b/test/run-test.sh
|
||||
@@ -340,6 +340,72 @@ fi
|
||||
|
||||
rm -rf $MyPWD/sysroot
|
||||
|
||||
+dotest "read newer caches when multiple places are allowed to store"
|
||||
+prep
|
||||
+cp $FONT1 $FONT2 $FONTDIR
|
||||
+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
|
||||
+MYCACHEBASEDIR=`mktemp -d /tmp/fontconfig.XXXXXXXX`
|
||||
+MYCACHEDIR=$MYCACHEBASEDIR/cache.dir
|
||||
+MYOWNCACHEDIR=$MYCACHEBASEDIR/owncache.dir
|
||||
+MYCONFIG=`mktemp /tmp/fontconfig.XXXXXXXX`
|
||||
+
|
||||
+mkdir -p $MYCACHEDIR
|
||||
+mkdir -p $MYOWNCACHEDIR
|
||||
+
|
||||
+sed "s!@FONTDIR@!$FONTDIR!
|
||||
+s!@REMAPDIR@!!
|
||||
+s!@CACHEDIR@!$MYCACHEDIR!" < $TESTDIR/fonts.conf.in > my-fonts.conf
|
||||
+
|
||||
+FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCCACHE $FONTDIR
|
||||
+
|
||||
+sleep 1
|
||||
+cat<<EOF>$MYCONFIG
|
||||
+<fontconfig>
|
||||
+ <match target="scan">
|
||||
+ <test name="file"><string>$FONTDIR/4x6.pcf</string></test>
|
||||
+ <edit name="pixelsize"><int>8</int></edit>
|
||||
+ </match>
|
||||
+</fontconfig>
|
||||
+EOF
|
||||
+sed "s!@FONTDIR@!$FONTDIR!
|
||||
+s!@REMAPDIR@!<include ignore_missing=\"yes\">$MYCONFIG</include>!
|
||||
+s!@CACHEDIR@!$MYOWNCACHEDIR!" < $TESTDIR/fonts.conf.in > my-fonts.conf
|
||||
+
|
||||
+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
|
||||
+ old_epoch=${SOURCE_DATE_EPOCH}
|
||||
+ SOURCE_DATE_EPOCH=`expr $SOURCE_DATE_EPOCH + 1`
|
||||
+fi
|
||||
+FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCCACHE -f $FONTDIR
|
||||
+if [ -n ${SOURCE_DATE_EPOCH:-} ]; then
|
||||
+ SOURCE_DATE_EPOCH=${old_epoch}
|
||||
+fi
|
||||
+
|
||||
+sed "s!@FONTDIR@!$FONTDIR!
|
||||
+s!@REMAPDIR@!<include ignore_missing=\"yes\">$MYCONFIG</include>!
|
||||
+s!@CACHEDIR@!$MYCACHEDIR</cachedir><cachedir>$MYOWNCACHEDIR!" < $TESTDIR/fonts.conf.in > my-fonts.conf
|
||||
+
|
||||
+FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCLIST - family pixelsize | sort > my-out
|
||||
+echo "=" >> my-out
|
||||
+FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCLIST - family pixelsize | sort >> my-out
|
||||
+echo "=" >> my-out
|
||||
+FONTCONFIG_FILE=$MyPWD/my-fonts.conf $FCLIST - family pixelsize | sort >> my-out
|
||||
+tr -d '\015' <my-out >my-out.tmp; mv my-out.tmp my-out
|
||||
+sed -e 's/pixelsize=6/pixelsize=8/g' $BUILDTESTDIR/$EXPECTED > my-out.expected
|
||||
+
|
||||
+if cmp my-out my-out.expected > /dev/null ; then : ; else
|
||||
+ echo "*** Test failed: $TEST"
|
||||
+ echo "*** output is in 'my-out', expected output in 'my-out.expected'"
|
||||
+ echo "Actual Result"
|
||||
+ cat my-out
|
||||
+ echo "Expected Result"
|
||||
+ cat my-out.expected
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
+rm -rf $MYCACHEBASEDIR $MYCONFIG my-fonts.conf my-out my-out.expected
|
||||
+
|
||||
fi # if [ "x$EXEEXT" = "x" ]
|
||||
|
||||
rm -rf $FONTDIR $CACHEFILE $CACHEDIR $BASEDIR $FONTCONFIG_FILE out
|
||||
--
|
||||
2.24.1
|
||||
|
||||
From a45fc8a33256d9d3ea0ea7947f33c8e5e3cc7238 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
Date: Thu, 31 Oct 2019 16:15:25 +0900
|
||||
Subject: [PATCH 2/9] Fix a memory leak caused by the previous commit
|
||||
|
||||
---
|
||||
src/fccache.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/fccache.c b/src/fccache.c
|
||||
index 4acde22..c565560 100644
|
||||
--- a/src/fccache.c
|
||||
+++ b/src/fccache.c
|
||||
@@ -397,6 +397,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir,
|
||||
else
|
||||
FcStrFree (cache_hashed);
|
||||
}
|
||||
+ else
|
||||
+ FcStrFree (cache_hashed);
|
||||
}
|
||||
#ifndef _WIN32
|
||||
else if (!retried)
|
||||
@@ -416,6 +418,8 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir,
|
||||
break;
|
||||
goto retry;
|
||||
}
|
||||
+ else
|
||||
+ FcStrFree (cache_hashed);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -pruN fontconfig-2.12.93.orig/configure.ac fontconfig-2.12.93/configure.ac
|
||||
--- fontconfig-2.12.93.orig/configure.ac 2018-02-15 22:01:54.000000000 +0900
|
||||
+++ fontconfig-2.12.93/configure.ac 2018-02-15 22:33:42.353941393 +0900
|
||||
@@ -308,8 +308,8 @@ AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv,
|
||||
# Checks for FreeType
|
||||
#
|
||||
dnl See http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT for versioning in freetype
|
||||
-PKG_CHECK_MODULES(FREETYPE, freetype2 >= 21.0.15)
|
||||
-PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2 >= 21.0.15"
|
||||
+PKG_CHECK_MODULES(FREETYPE, freetype2 >= 20.0.14)
|
||||
+PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2 >= 20.0.14"
|
||||
|
||||
AC_SUBST(FREETYPE_LIBS)
|
||||
AC_SUBST(FREETYPE_CFLAGS)
|
188
fontconfig-score-fix.patch
Normal file
188
fontconfig-score-fix.patch
Normal file
@ -0,0 +1,188 @@
|
||||
From 4d43f84188847a6a77f7259f986fb178c52c1ea7 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
Date: Thu, 8 Jul 2021 14:21:50 +0900
|
||||
Subject: [PATCH 1/2] Do not set different score to non-string values
|
||||
|
||||
Non-string values in a cache is supposed to choose one from them.
|
||||
Due to the change of da1c9f7a, there was a regression on scoring for
|
||||
matching functions. So reverting the behavior for evaluating non-string
|
||||
values to the previous one.
|
||||
|
||||
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/286
|
||||
---
|
||||
src/fcmatch.c | 2 +-
|
||||
test/Makefile.am | 1 +
|
||||
test/run-test-conf.sh | 1 +
|
||||
test/test-conf.c | 71 ++++++++++++++++++++++++++--------------
|
||||
test/test-issue-286.json | 35 ++++++++++++++++++++
|
||||
5 files changed, 85 insertions(+), 25 deletions(-)
|
||||
create mode 100644 test/test-issue-286.json
|
||||
|
||||
diff --git a/src/fcmatch.c b/src/fcmatch.c
|
||||
index c88e3aa..fd43cbd 100644
|
||||
--- a/src/fcmatch.c
|
||||
+++ b/src/fcmatch.c
|
||||
@@ -433,7 +433,7 @@ FcCompareValueList (FcObject object,
|
||||
*result = FcResultTypeMismatch;
|
||||
return FcFalse;
|
||||
}
|
||||
- v = v * 1000 + j * 100 + k;
|
||||
+ v = v * 1000 + j * 100 + k * (v2->value.type == FcTypeString ? 1 : 0);
|
||||
if (v < best)
|
||||
{
|
||||
if (bestValue)
|
||||
diff --git a/test/Makefile.am b/test/Makefile.am
|
||||
index aea8724..d07654b 100644
|
||||
--- a/test/Makefile.am
|
||||
+++ b/test/Makefile.am
|
||||
@@ -47,6 +47,7 @@ TESTDATA = \
|
||||
test-45-generic.json \
|
||||
test-60-generic.json \
|
||||
test-90-synthetic.json \
|
||||
+ test-issue-286.json \
|
||||
test-style-match.json \
|
||||
$(NULL)
|
||||
|
||||
diff --git a/test/run-test-conf.sh b/test/run-test-conf.sh
|
||||
index 0c2bd52..bbb56f4 100644
|
||||
--- a/test/run-test-conf.sh
|
||||
+++ b/test/run-test-conf.sh
|
||||
@@ -49,6 +49,7 @@ for i in \
|
||||
$RUNNER $TESTDIR/../conf.d/$i $TESTDIR/$test_json
|
||||
done
|
||||
for i in \
|
||||
+ test-issue-286.json \
|
||||
test-style-match.json \
|
||||
; do
|
||||
echo $RUNNER $TESTDIR/$i ...
|
||||
diff --git a/test/test-conf.c b/test/test-conf.c
|
||||
index e4e9da4..1a52c6e 100644
|
||||
--- a/test/test-conf.c
|
||||
+++ b/test/test-conf.c
|
||||
@@ -207,35 +207,58 @@ build_pattern (json_object *obj)
|
||||
}
|
||||
}
|
||||
} else if (type == json_type_double || type == json_type_int) {
|
||||
+ const FcObjectType *fc_o = FcNameGetObjectType (iter.key);
|
||||
double values[4];
|
||||
- if (n != 2 && n != 4) {
|
||||
- fprintf (stderr, "E: array starting with number not range or matrix\n");
|
||||
+
|
||||
+ if (fc_o && fc_o->type == FcTypeDouble) {
|
||||
+ for (i = 0; i < n; i++)
|
||||
+ {
|
||||
+ o = json_object_array_get_idx (iter.val, i);
|
||||
+ type = json_object_get_type (o);
|
||||
+ if (type == json_type_double) {
|
||||
+ v.type = FcTypeDouble;
|
||||
+ v.u.d = json_object_get_double (o);
|
||||
+ } else if (type == json_type_int) {
|
||||
+ v.type = FcTypeInteger;
|
||||
+ v.u.i = json_object_get_int (o);
|
||||
+ } else {
|
||||
+ fprintf (stderr, "E: unable to convert to double\n");
|
||||
+ continue;
|
||||
+ }
|
||||
+ FcPatternAdd (pat, iter.key, v, FcTrue);
|
||||
+ v.type = FcTypeVoid;
|
||||
+ }
|
||||
continue;
|
||||
- }
|
||||
- for (i = 0; i < n; i++) {
|
||||
- o = json_object_array_get_idx (iter.val, i);
|
||||
- type = json_object_get_type (o);
|
||||
- if (type != json_type_double && type != json_type_int) {
|
||||
- fprintf (stderr, "E: numeric array entry not a number\n");
|
||||
+ } else {
|
||||
+ if (n != 2 && n != 4) {
|
||||
+ fprintf (stderr, "E: array starting with number not range or matrix\n");
|
||||
continue;
|
||||
}
|
||||
- values[i] = json_object_get_double (o);
|
||||
- }
|
||||
- if (n == 2) {
|
||||
- v.type = FcTypeRange;
|
||||
- v.u.r = FcRangeCreateDouble (values[0], values[1]);
|
||||
- if (!v.u.r) {
|
||||
- fprintf (stderr, "E: failed to create range\n");
|
||||
- continue;
|
||||
+ for (i = 0; i < n; i++) {
|
||||
+ o = json_object_array_get_idx (iter.val, i);
|
||||
+ type = json_object_get_type (o);
|
||||
+ if (type != json_type_double && type != json_type_int) {
|
||||
+ fprintf (stderr, "E: numeric array entry not a number\n");
|
||||
+ continue;
|
||||
+ }
|
||||
+ values[i] = json_object_get_double (o);
|
||||
+ }
|
||||
+ if (n == 2) {
|
||||
+ v.type = FcTypeRange;
|
||||
+ v.u.r = FcRangeCreateDouble (values[0], values[1]);
|
||||
+ if (!v.u.r) {
|
||||
+ fprintf (stderr, "E: failed to create range\n");
|
||||
+ continue;
|
||||
+ }
|
||||
+ destroy_v = FcTrue;
|
||||
+ } else {
|
||||
+ v.type = FcTypeMatrix;
|
||||
+ v.u.m = &matrix;
|
||||
+ matrix.xx = values[0];
|
||||
+ matrix.xy = values[1];
|
||||
+ matrix.yx = values[2];
|
||||
+ matrix.yy = values[3];
|
||||
}
|
||||
- destroy_v = FcTrue;
|
||||
- } else {
|
||||
- v.type = FcTypeMatrix;
|
||||
- v.u.m = &matrix;
|
||||
- matrix.xx = values[0];
|
||||
- matrix.xy = values[1];
|
||||
- matrix.yx = values[2];
|
||||
- matrix.yy = values[3];
|
||||
}
|
||||
} else {
|
||||
fprintf (stderr, "E: array format not recognized\n");
|
||||
diff --git a/test/test-issue-286.json b/test/test-issue-286.json
|
||||
new file mode 100644
|
||||
index 0000000..a3199fa
|
||||
--- /dev/null
|
||||
+++ b/test/test-issue-286.json
|
||||
@@ -0,0 +1,35 @@
|
||||
+{
|
||||
+ "fonts": [
|
||||
+ {
|
||||
+ "family": "Foo",
|
||||
+ "style": "Italic",
|
||||
+ "pixelsize": [15, 16, 17, 18],
|
||||
+ "file": "/path/to/Foo-Italic.ttf",
|
||||
+ "fontversion": 133365
|
||||
+ },
|
||||
+ {
|
||||
+ "family": "Foo",
|
||||
+ "style": "Regular",
|
||||
+ "pixelsize": [11, 12, 13, 14, 15, 16, 17, 18, 22],
|
||||
+ "file": "/path/to/Foo-Regular.ttf",
|
||||
+ "fontversion": 133365
|
||||
+ }
|
||||
+ ],
|
||||
+ "tests": [
|
||||
+ {
|
||||
+ "method": "match",
|
||||
+ "query": {
|
||||
+ "family": "Foo",
|
||||
+ "style": "Regular",
|
||||
+ "pixelsize": 16
|
||||
+ },
|
||||
+ "result": {
|
||||
+ "family": "Foo",
|
||||
+ "style": "Regular",
|
||||
+ "pixelsize": 16,
|
||||
+ "file": "/path/to/Foo-Regular.ttf",
|
||||
+ "fontversion": 133365
|
||||
+ }
|
||||
+ }
|
||||
+ ]
|
||||
+}
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,36 +0,0 @@
|
||||
From cb1036a7c7f1cb79fa799b1db368c86b018ec368 Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
Date: Fri, 9 Aug 2019 12:22:08 +0000
|
||||
Subject: [PATCH] Affect FC_FONT_HAS_HINT property to score on matcher
|
||||
|
||||
---
|
||||
src/fcmatch.c | 1 +
|
||||
src/fcobjs.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/fcmatch.c b/src/fcmatch.c
|
||||
index c3d2b8ad..78bcf7b4 100644
|
||||
--- a/src/fcmatch.c
|
||||
+++ b/src/fcmatch.c
|
||||
@@ -342,6 +342,7 @@ typedef enum _FcMatcherPriority {
|
||||
PRI1(SLANT),
|
||||
PRI1(WEIGHT),
|
||||
PRI1(WIDTH),
|
||||
+ PRI1(FONT_HAS_HINT),
|
||||
PRI1(DECORATIVE),
|
||||
PRI1(ANTIALIAS),
|
||||
PRI1(RASTERIZER),
|
||||
diff --git a/src/fcobjs.h b/src/fcobjs.h
|
||||
index 7bb97d09..dd4a6ec3 100644
|
||||
--- a/src/fcobjs.h
|
||||
+++ b/src/fcobjs.h
|
||||
@@ -72,5 +72,5 @@ FC_OBJECT (COLOR, FcTypeBool, FcCompareBool)
|
||||
FC_OBJECT (SYMBOL, FcTypeBool, FcCompareBool)
|
||||
FC_OBJECT (FONT_VARIATIONS, FcTypeString, NULL)
|
||||
FC_OBJECT (VARIABLE, FcTypeBool, FcCompareBool)
|
||||
-FC_OBJECT (FONT_HAS_HINT, FcTypeBool, NULL)
|
||||
+FC_OBJECT (FONT_HAS_HINT, FcTypeBool, FcCompareBool)
|
||||
/* ^-------------- Add new objects here. */
|
||||
--
|
||||
2.22.0
|
||||
|
@ -1,285 +0,0 @@
|
||||
From cd51cb241aad7b362b793200ca7d42595c14f52b Mon Sep 17 00:00:00 2001
|
||||
From: Akira TAGOH <akira@tagoh.org>
|
||||
Date: Mon, 21 Oct 2019 16:17:42 +0900
|
||||
Subject: [PATCH] Take effect sysroot functionality to the default config file
|
||||
|
||||
When loading the default config file with FONTCONFIG_SYSROOT,
|
||||
it fails if no /etc/fonts/fonts.conf is available, even if it is
|
||||
there where is based on sysroot.
|
||||
|
||||
To address this, FcConfig is required to determine the sysroot.
|
||||
therefore, this change makes FcConfigFilename() deprecated,
|
||||
use FcConfigGetFilename() instead.
|
||||
|
||||
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/181
|
||||
---
|
||||
doc/fcconfig.fncs | 11 +++++++
|
||||
fontconfig/fontconfig.h | 4 +++
|
||||
src/fccfg.c | 67 ++++++++++++++++++++++++++++-------------
|
||||
src/fcxml.c | 24 ++++++++++++---
|
||||
4 files changed, 81 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/doc/fcconfig.fncs b/doc/fcconfig.fncs
|
||||
index 5f1ef43..82769d5 100644
|
||||
--- a/doc/fcconfig.fncs
|
||||
+++ b/doc/fcconfig.fncs
|
||||
@@ -344,6 +344,15 @@ to be up to date, and used.
|
||||
@TYPE1@ const FcChar8 * @ARG1@ name
|
||||
@PURPOSE@ Find a config file
|
||||
@DESC@
|
||||
+This function is deprecated and is replaced by <function>FcConfigGetFilename</function>.
|
||||
+@@
|
||||
+
|
||||
+@RET@ FcChar8 *
|
||||
+@FUNC@ FcConfigGetFilename
|
||||
+@TYPE1@ FcConfig * @ARG1@ config
|
||||
+@TYPE2@ const FcChar8 * @ARG2@ name
|
||||
+@PURPOSE@ Find a config file
|
||||
+@DESC@
|
||||
Given the specified external entity name, return the associated filename.
|
||||
This provides applications a way to convert various configuration file
|
||||
references into filename form.
|
||||
@@ -355,6 +364,8 @@ 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.
|
||||
+ </para><para>
|
||||
+The result of this function is affected by the FONTCONFIG_SYSROOT environment variable or equivalent functionality.
|
||||
@@
|
||||
|
||||
@RET@ FcBool
|
||||
diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
|
||||
index 9586616..2f0e8cf 100644
|
||||
--- a/fontconfig/fontconfig.h
|
||||
+++ b/fontconfig/fontconfig.h
|
||||
@@ -393,6 +393,10 @@ FcConfigHome (void);
|
||||
FcPublic FcBool
|
||||
FcConfigEnableHome (FcBool enable);
|
||||
|
||||
+FcPublic FcChar8 *
|
||||
+FcConfigGetFilename (FcConfig *config,
|
||||
+ const FcChar8 *url);
|
||||
+
|
||||
FcPublic FcChar8 *
|
||||
FcConfigFilename (const FcChar8 *url);
|
||||
|
||||
diff --git a/src/fccfg.c b/src/fccfg.c
|
||||
index e81eeba..21ccd25 100644
|
||||
--- a/src/fccfg.c
|
||||
+++ b/src/fccfg.c
|
||||
@@ -686,7 +686,7 @@ FcConfigAddConfigFile (FcConfig *config,
|
||||
const FcChar8 *f)
|
||||
{
|
||||
FcBool ret;
|
||||
- FcChar8 *file = FcConfigFilename (f);
|
||||
+ FcChar8 *file = FcConfigGetFilename (config, f);
|
||||
|
||||
if (!file)
|
||||
return FcFalse;
|
||||
@@ -2284,10 +2284,19 @@ FcConfigEnableHome (FcBool enable)
|
||||
}
|
||||
|
||||
FcChar8 *
|
||||
-FcConfigFilename (const FcChar8 *url)
|
||||
+FcConfigGetFilename (FcConfig *config,
|
||||
+ const FcChar8 *url)
|
||||
{
|
||||
FcChar8 *file, *dir, **path, **p;
|
||||
+ const FcChar8 *sysroot;
|
||||
|
||||
+ if (!config)
|
||||
+ {
|
||||
+ config = FcConfigGetCurrent ();
|
||||
+ if (!config)
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ sysroot = FcConfigGetSysRoot (config);
|
||||
if (!url || !*url)
|
||||
{
|
||||
url = (FcChar8 *) getenv ("FONTCONFIG_FILE");
|
||||
@@ -2297,13 +2306,23 @@ FcConfigFilename (const FcChar8 *url)
|
||||
file = 0;
|
||||
|
||||
if (FcStrIsAbsoluteFilename(url))
|
||||
- return FcConfigFileExists (0, url);
|
||||
+ return FcConfigFileExists (sysroot, url);
|
||||
|
||||
if (*url == '~')
|
||||
{
|
||||
dir = FcConfigHome ();
|
||||
if (dir)
|
||||
- file = FcConfigFileExists (dir, url + 1);
|
||||
+ {
|
||||
+ FcChar8 *s;
|
||||
+
|
||||
+ if (sysroot)
|
||||
+ s = FcStrBuildFilename (sysroot, dir, NULL);
|
||||
+ else
|
||||
+ s = dir;
|
||||
+ file = FcConfigFileExists (s, url + 1);
|
||||
+ if (sysroot)
|
||||
+ FcStrFree (s);
|
||||
+ }
|
||||
else
|
||||
file = 0;
|
||||
}
|
||||
@@ -2314,7 +2333,15 @@ FcConfigFilename (const FcChar8 *url)
|
||||
return NULL;
|
||||
for (p = path; *p; p++)
|
||||
{
|
||||
- file = FcConfigFileExists (*p, url);
|
||||
+ FcChar8 *s;
|
||||
+
|
||||
+ if (sysroot)
|
||||
+ s = FcStrBuildFilename (sysroot, *p, NULL);
|
||||
+ else
|
||||
+ s = *p;
|
||||
+ file = FcConfigFileExists (s, url);
|
||||
+ if (sysroot)
|
||||
+ FcStrFree (s);
|
||||
if (file)
|
||||
break;
|
||||
}
|
||||
@@ -2323,33 +2350,31 @@ FcConfigFilename (const FcChar8 *url)
|
||||
return file;
|
||||
}
|
||||
|
||||
+FcChar8 *
|
||||
+FcConfigFilename (const FcChar8 *url)
|
||||
+{
|
||||
+ return FcConfigGetFilename (NULL, url);
|
||||
+}
|
||||
+
|
||||
FcChar8 *
|
||||
FcConfigRealFilename (FcConfig *config,
|
||||
const FcChar8 *url)
|
||||
{
|
||||
- const FcChar8 *sysroot = FcConfigGetSysRoot (config);
|
||||
- FcChar8 *n = FcConfigFilename (url);
|
||||
- FcChar8 *nn = NULL;
|
||||
+ FcChar8 *n = FcConfigGetFilename (config, url);
|
||||
|
||||
if (n)
|
||||
{
|
||||
FcChar8 buf[FC_PATH_MAX];
|
||||
ssize_t len;
|
||||
|
||||
- if (sysroot)
|
||||
- nn = FcStrBuildFilename (sysroot, n, NULL);
|
||||
- else
|
||||
- nn = FcStrdup (n);
|
||||
- FcStrFree (n);
|
||||
-
|
||||
- if ((len = FcReadLink (nn, buf, sizeof (buf) - 1)) != -1)
|
||||
+ if ((len = FcReadLink (n, buf, sizeof (buf) - 1)) != -1)
|
||||
{
|
||||
buf[len] = 0;
|
||||
|
||||
if (!FcStrIsAbsoluteFilename (buf))
|
||||
{
|
||||
- FcChar8 *dirname = FcStrDirname (nn);
|
||||
- FcStrFree (nn);
|
||||
+ FcChar8 *dirname = FcStrDirname (n);
|
||||
+ FcStrFree (n);
|
||||
if (!dirname)
|
||||
return NULL;
|
||||
|
||||
@@ -2358,18 +2383,18 @@ FcConfigRealFilename (FcConfig *config,
|
||||
if (!path)
|
||||
return NULL;
|
||||
|
||||
- nn = FcStrCanonFilename (path);
|
||||
+ n = FcStrCanonFilename (path);
|
||||
FcStrFree (path);
|
||||
}
|
||||
else
|
||||
{
|
||||
- FcStrFree (nn);
|
||||
- nn = FcStrdup (buf);
|
||||
+ FcStrFree (n);
|
||||
+ n = FcStrdup (buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- return nn;
|
||||
+ return n;
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/src/fcxml.c b/src/fcxml.c
|
||||
index d9a67f6..a366644 100644
|
||||
--- a/src/fcxml.c
|
||||
+++ b/src/fcxml.c
|
||||
@@ -2541,7 +2541,7 @@ FcParseInclude (FcConfigParse *parse)
|
||||
FcChar8 *filename;
|
||||
static FcBool warn_conf = FcFalse, warn_confd = FcFalse;
|
||||
|
||||
- filename = FcConfigFilename(s);
|
||||
+ filename = FcConfigGetFilename(parse->config, s);
|
||||
if (deprecated == FcTrue &&
|
||||
filename != NULL &&
|
||||
userdir != NULL &&
|
||||
@@ -3532,7 +3532,9 @@ _FcConfigParse (FcConfig *config,
|
||||
FcStrBuf sbuf;
|
||||
char buf[BUFSIZ];
|
||||
FcBool ret = FcFalse, complain_again = complain;
|
||||
+ FcStrBuf reason;
|
||||
|
||||
+ FcStrBufInit (&reason, NULL, 0);
|
||||
#ifdef _WIN32
|
||||
if (!pGetSystemWindowsDirectory)
|
||||
{
|
||||
@@ -3549,12 +3551,20 @@ _FcConfigParse (FcConfig *config,
|
||||
}
|
||||
#endif
|
||||
|
||||
- filename = FcConfigFilename (name);
|
||||
+ filename = FcConfigGetFilename (config, name);
|
||||
if (!filename)
|
||||
+ {
|
||||
+ FcStrBufString (&reason, (FcChar8 *)"No such file: ");
|
||||
+ FcStrBufString (&reason, name ? name : (FcChar8 *)"(null)");
|
||||
goto bail0;
|
||||
+ }
|
||||
realfilename = FcConfigRealFilename (config, name);
|
||||
if (!realfilename)
|
||||
+ {
|
||||
+ FcStrBufString (&reason, (FcChar8 *)"No such realfile: ");
|
||||
+ FcStrBufString (&reason, name ? name : (FcChar8 *)"(null)");
|
||||
goto bail0;
|
||||
+ }
|
||||
if (FcStrSetMember (config->availConfigFiles, realfilename))
|
||||
{
|
||||
FcStrFree (filename);
|
||||
@@ -3582,7 +3592,11 @@ _FcConfigParse (FcConfig *config,
|
||||
|
||||
fd = FcOpen ((char *) realfilename, O_RDONLY);
|
||||
if (fd == -1)
|
||||
+ {
|
||||
+ FcStrBufString (&reason, (FcChar8 *)"Unable to open ");
|
||||
+ FcStrBufString (&reason, realfilename);
|
||||
goto bail1;
|
||||
+ }
|
||||
|
||||
do {
|
||||
len = read (fd, buf, BUFSIZ);
|
||||
@@ -3623,11 +3637,13 @@ bail0:
|
||||
if (!ret && complain_again)
|
||||
{
|
||||
if (name)
|
||||
- FcConfigMessage (0, FcSevereError, "Cannot %s config file \"%s\"", load ? "load" : "scan", name);
|
||||
+ FcConfigMessage (0, FcSevereError, "Cannot %s config file \"%s\": %s", load ? "load" : "scan", name, FcStrBufDoneStatic (&reason));
|
||||
else
|
||||
- FcConfigMessage (0, FcSevereError, "Cannot %s default config file", load ? "load" : "scan");
|
||||
+ FcConfigMessage (0, FcSevereError, "Cannot %s default config file: %s", load ? "load" : "scan", FcStrBufDoneStatic (&reason));
|
||||
+ FcStrBufDestroy (&reason);
|
||||
return FcFalse;
|
||||
}
|
||||
+ FcStrBufDestroy (&reason);
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
Summary: Font configuration and customization library
|
||||
Name: fontconfig
|
||||
Version: 2.13.93
|
||||
Release: 8%{?dist}
|
||||
Version: 2.13.94
|
||||
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
|
||||
@ -20,7 +20,8 @@ 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}-hotfix.patch
|
||||
Patch6: %{name}-score-fix.patch
|
||||
Patch7: %{name}-lcdfilter.patch
|
||||
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: freetype-devel >= %{freetype_version}
|
||||
@ -188,12 +189,15 @@ fi
|
||||
%doc fontconfig-devel.txt fontconfig-devel
|
||||
|
||||
%changelog
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.13.93-8
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
* Tue Jul 20 2021 Akira TAGOH <tagoh@redhat.com> - 2.13.94-2
|
||||
- Fix the score calculation on matching for multiple values.
|
||||
- Enable 11-lcdfilter-default.conf.
|
||||
Resolves: rhbz#1965684
|
||||
- Rebase to the latest release.
|
||||
Resolves: rhbz#2023161
|
||||
|
||||
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.13.93-7
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
* Thu Jun 29 2021 Akira TAGOH <tagoh@redhat.com> - 2.13.94-1
|
||||
- New upstream release.
|
||||
|
||||
* Thu Mar 25 2021 Akira TAGOH <tagoh@redhat.com> - 2.13.93-6
|
||||
- Fix postun scriptlet to remove the entry from xml catalog.
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (fontconfig-2.13.93.tar.xz) = 1ba119ea3faba662e108df6fce22f242eb2b7c5ec087159ca0cb76944991b19563f744c181263343941c50547bc0c73c6437d5380df09b5029facaab80465b58
|
||||
SHA512 (fontconfig-2.13.94.tar.xz) = f880c71d3fa59855a72baea7ee220dcb2067cf9afa2ee5c30b6b18a6f8252b6cb34ab8d7cd9f8631e63afbc5733ccb781ac089792217c4d98726960550e5ba37
|
||||
|
Loading…
Reference in New Issue
Block a user