[Fontconfig] fontconfig: Branch 'master' - 2 commits

Akira TAGOH tagoh at kemper.freedesktop.org
Thu Oct 31 14:13:49 CET 2013


 fonts.dtd   |    2 +-
 src/fcxml.c |    5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 767108aa1327cf0156dfc6f024dbc8fb783ae067
Author: Akira TAGOH <akira at tagoh.org>
Date:   Thu Oct 31 22:12:26 2013 +0900

    Correct DTD

diff --git a/fonts.dtd b/fonts.dtd
index 4c38e77..479f2c0 100644
--- a/fonts.dtd
+++ b/fonts.dtd
@@ -140,7 +140,7 @@
     if 'target' is 'font', execute the match on the result of a font
     selection.
 -->
-<!ELEMENT match (test*, edit*)+>
+<!ELEMENT match (test|edit)+>
 <!ATTLIST match
 	  target (pattern|font|scan) "pattern">
 
commit aa22e6e63933e8b31a032835b712b7ed596534cc
Author: Akira TAGOH <akira at tagoh.org>
Date:   Thu Jan 24 19:48:48 2013 +0900

    Warn if no <test> nor <edit> elements in <match>
    
    This corrects an error message being reported at
      https://bugs.freedesktop.org/show_bug.cgi?id=71085
      Bug 71085 - "out of memory" errors on empty match element in fonts.conf
    
    and somewhat works as a workaround for
      https://bugs.freedesktop.org/show_bug.cgi?id=59438
      Bug 59438 - Fix <alias> inside <match>

diff --git a/src/fcxml.c b/src/fcxml.c
index 8ff10b6..bd95580 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -2566,6 +2566,11 @@ FcParseMatch (FcConfigParse *parse)
 	}
 	FcVStackPopAndDestroy (parse);
     }
+    if (!rule)
+    {
+	FcConfigMessage (parse, FcSevereWarning, "No <test> nor <edit> elements in <match>");
+	return;
+    }
     if (!FcConfigAddRule (parse->config, rule, kind))
 	FcConfigMessage (parse, FcSevereError, "out of memory");
 }


More information about the Fontconfig mailing list