From cd9b1033a68816a7acfbba1718ba0aa5888f6ec7 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 24 May 2013 13:55:07 +0900 Subject: [PATCH] Bug 64906 - FcNameParse() should ignore leading whitespace in parameters After this change, the following works as expected: $ FC_DEBUG=4 fc-match ":family=foo bar, sans-serif" ... FcConfigSubstitute Pattern has 3 elts (size 16) family: "foo bar"(s) "sans-serif"(s) ... --- src/fcname.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fcname.c b/src/fcname.c index 6dd4d49..a525345 100644 --- a/src/fcname.c +++ b/src/fcname.c @@ -316,6 +316,12 @@ FcNameFindNext (const FcChar8 *cur, const char *delim, FcChar8 *save, FcChar8 *l { FcChar8 c; + while ((c = *cur)) + { + if (!isspace (c)) + break; + ++cur; + } while ((c = *cur)) { if (c == '\\')