]> git.wh0rd.org - fontconfig.git/commitdiff
Fonts matching lang not territory should satisfy sort pattern lang.
authorKeith Packard <keithp@neko.keithp.com>
Fri, 1 Sep 2006 22:33:27 +0000 (15:33 -0700)
committerKeith Packard <keithp@neko.keithp.com>
Fri, 1 Sep 2006 22:33:27 +0000 (15:33 -0700)
A pattern specifying 'Chinese' (:lang=zh) without a territory should be
satisfied by any font supporting any Chinese lang. The code was requiring
that the lang tags match exactly, causing this sort to fail.

src/fcmatch.c

index d688c98b9eaad659f8cb19f0dc1d070b6f0a9ba2..e7a70ef1f13bd6390fa44a803777f4606476ab71 100644 (file)
@@ -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++)
            {