fontconfig: Branch 'master'

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

 



 src/fccfg.c |   33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

New commits:
commit f4103bf708778433f5ea02014f890cdeccde206b
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Fri Jun 8 19:17:57 2012 +0900

    fcdefault: Add the lang object at FcConfigSubstituteWithPat() only when kind is FcMatchPattern

diff --git a/src/fccfg.c b/src/fccfg.c
index c3d95e8..3f1fa73 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -1419,6 +1419,22 @@ FcConfigSubstituteWithPat (FcConfig    *config,
     switch (kind) {
     case FcMatchPattern:
 	s = config->substPattern;
+	strs = FcGetDefaultLangs ();
+	if (strs)
+	{
+	    FcStrList *l = FcStrListCreate (strs);
+	    FcChar8 *lang;
+	    FcValue v;
+
+	    FcStrSetDestroy (strs);
+	    while (l && (lang = FcStrListNext (l)))
+	    {
+		v.type = FcTypeString;
+		v.u.s = lang;
+		FcPatternObjectAddWithBinding (p, FC_LANG_OBJECT, v, FcValueBindingWeak, FcTrue);
+	    }
+	    FcStrListDone (l);
+	}
 	break;
     case FcMatchFont:
 	s = config->substFont;
@@ -1435,23 +1451,6 @@ FcConfigSubstituteWithPat (FcConfig    *config,
 	return FcFalse;
     FcMemAlloc (FC_MEM_SUBSTATE, config->maxObjects * sizeof (FcSubState));
 
-    strs = FcGetDefaultLangs ();
-    if (strs)
-    {
-	FcStrList *l = FcStrListCreate (strs);
-	FcChar8 *lang;
-	FcValue v;
-
-	FcStrSetDestroy (strs);
-	while (l && (lang = FcStrListNext (l)))
-	{
-	    v.type = FcTypeString;
-	    v.u.s = lang;
-	    FcPatternObjectAddWithBinding (p, FC_LANG_OBJECT, v, FcValueBindingWeak, FcTrue);
-	}
-	FcStrListDone (l);
-    }
-
     if (FcDebug () & FC_DBG_EDIT)
     {
 	printf ("FcConfigSubstitute ");
_______________________________________________
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