]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcmatch.c
Fonts matching lang not territory should satisfy sort pattern lang.
[fontconfig.git] / src / fcmatch.c
index 7e3353b3d42e610b1e5ba6a387eee20aeb08de76..e7a70ef1f13bd6390fa44a803777f4606476ab71 100644 (file)
@@ -313,7 +313,7 @@ FcCompareValueList (FcObject         object,
     j = 0;
     for (v1 = v1orig; v1; v1 = FcValueListNext(v1))
     {
-       for (v2 = v1orig; v2; v2 = FcValueListNext(v2))
+       for (v2 = v2orig; v2; v2 = FcValueListNext(v2))
        {
            v = (match->compare) (&v1->value, &v2->value);
            if (v < 0)
@@ -608,7 +608,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **cs, FcBool tri
                 }
 
                FcPatternReference (node->pattern);
-               if (FcDebug () & FC_DBG_MATCH)
+               if (FcDebug () & FC_DBG_MATCHV)
                {
                    printf ("Add ");
                    FcPatternPrint (node->pattern);
@@ -730,7 +730,7 @@ FcFontSetSort (FcConfig         *config,
         * If this node matches any language, go check
         * which ones and satisfy those entries
         */
-       if (nodeps[f]->score[MATCH_LANG_INDEX] < nPatternLang)
+       if (nodeps[f]->score[MATCH_LANG_INDEX] < 200)
        {
            for (i = 0; i < nPatternLang; i++)
            {
@@ -788,6 +788,11 @@ FcFontSetSort (FcConfig        *config,
 
     free (nodes);
 
+    if (FcDebug() & FC_DBG_MATCH)
+    {
+       printf ("First font ");
+       FcPatternPrint (ret->fonts[0]);
+    }
     return ret;
 
 bail2: