fontconfig: Branch 'master' - 2 commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 src/fccfg.c |    2 ++
 src/fcint.h |    3 +++
 src/fcstr.c |    8 ++++++++
 src/fcxml.c |    7 +++++++
 4 files changed, 20 insertions(+)

New commits:
commit 46b2c62faa64250eec3981ee816e91a9a3dee857
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Wed Jun 17 16:29:08 2015 +0900

    Add a warning for blank in fonts.conf
    
    and remove the unnecessary code for parsing blanks

diff --git a/src/fcxml.c b/src/fcxml.c
index bad6b81..52a0668 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -1260,8 +1260,11 @@ static void
 FcParseBlank (FcConfigParse *parse)
 {
     int		n = FcVStackElements (parse);
+#if 0
     FcChar32	i, begin, end;
+#endif
 
+    FcConfigMessage (parse, FcSevereWarning, "blank doesn't take any effect anymore. please remove it from your fonts.conf");
     while (n-- > 0)
     {
 	FcVStack    *v = FcVStackFetch (parse, n);
@@ -1273,10 +1276,13 @@ FcParseBlank (FcConfigParse *parse)
 	}
 	switch ((int) v->tag) {
 	case FcVStackInteger:
+#if 0
 	    if (!FcBlanksAdd (parse->config->blanks, v->u.integer))
 		goto bail;
 	    break;
+#endif
 	case FcVStackRange:
+#if 0
 	    begin = (FcChar32) v->u.range->begin;
 	    end = (FcChar32) v->u.range->end;
 	    if (begin <= end)
@@ -1287,6 +1293,7 @@ FcParseBlank (FcConfigParse *parse)
 		      goto bail;
 	      }
 	    }
+#endif
 	    break;
 	default:
 	    FcConfigMessage (parse, FcSevereError, "invalid element in blank");
commit 33fd436a3ec63ca58f3cb51bd4ab7b33e90d89c8
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Wed Jun 17 16:15:35 2015 +0900

    Don't return FcFalse even when no fonts dirs is configured

diff --git a/src/fccfg.c b/src/fccfg.c
index cc2d9ee..abf539c 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -373,6 +373,8 @@ FcConfigAddDirList (FcConfig *config, FcSetName set, FcStrSet *dirSet)
     dirlist = FcStrListCreate (dirSet);
     if (!dirlist)
         return FcFalse;
+    if (FcStrListGetLength (dirlist) == 0)
+	ret = FcTrue;
 	
     while ((dir = FcStrListNext (dirlist)))
     {
diff --git a/src/fcint.h b/src/fcint.h
index 15e22fd..ca6f8ef 100644
--- a/src/fcint.h
+++ b/src/fcint.h
@@ -1176,6 +1176,9 @@ FcStrSerializeAlloc (FcSerialize *serialize, const FcChar8 *str);
 FcPrivate FcChar8 *
 FcStrSerialize (FcSerialize *serialize, const FcChar8 *str);
 
+FcPrivate int
+FcStrListGetLength (const FcStrList *list);
+
 /* fcobjs.c */
 
 FcPrivate void
diff --git a/src/fcstr.c b/src/fcstr.c
index 29a577d..71e033a 100644
--- a/src/fcstr.c
+++ b/src/fcstr.c
@@ -1347,6 +1347,14 @@ FcStrListDone (FcStrList *list)
     free (list);
 }
 
+int
+FcStrListGetLength (const FcStrList *list)
+{
+    if (!list)
+	return 0;
+    return list->set->num;
+}
+
 #define __fcstr__
 #include "fcaliastail.h"
 #undef __fcstr__
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux