diff options
author | marha <marha@users.sourceforge.net> | 2015-06-15 21:36:28 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-06-15 21:36:28 +0200 |
commit | 008a8d8051786badb83e455bd9281103ba9a6470 (patch) | |
tree | f99ea672d105271cb60a726fac8022ce47ea2866 /fontconfig/src/fcmatch.c | |
parent | 912e881bec8b16f2331225960645c3bdf5a8ba2d (diff) | |
parent | e8d5e7c4bb11f7fcb0a4ba5c13f43e7929849a2f (diff) | |
download | vcxsrv-008a8d8051786badb83e455bd9281103ba9a6470.tar.gz vcxsrv-008a8d8051786badb83e455bd9281103ba9a6470.tar.bz2 vcxsrv-008a8d8051786badb83e455bd9281103ba9a6470.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
freetype/src/base/ftfntfmt.c
freetype/src/cache/ftcimage.c
freetype/src/cid/cidriver.c
freetype/src/truetype/ttdriver.c
mesalib/src/mesa/drivers/dri/common/dri_util.c
mesalib/src/mesa/drivers/dri/swrast/swrast.c
openssl/Makefile
Diffstat (limited to 'fontconfig/src/fcmatch.c')
-rw-r--r-- | fontconfig/src/fcmatch.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c index 46d08bcc7..40efbd3f6 100644 --- a/fontconfig/src/fcmatch.c +++ b/fontconfig/src/fcmatch.c @@ -220,7 +220,7 @@ FcCompareSizeRange (FcValue *v1, FcValue *v2) if (FcRangeIsInRange (r1, r2)) ret = 0.0; else - ret = FC_MIN (fabs (r1->u.d.end - r2->u.d.begin), fabs (r1->u.d.begin - r2->u.d.end)); + ret = FC_MIN (fabs (r1->end - r2->begin), fabs (r1->begin - r2->end)); bail: if (r1) @@ -292,6 +292,7 @@ typedef enum _FcMatcherPriority { PRI1(LANG), PRI_FAMILY_WEAK, PRI_POSTSCRIPT_NAME_WEAK, + PRI1(SYMBOL), PRI1(SPACING), PRI1(SIZE), PRI1(PIXEL_SIZE), @@ -688,6 +689,47 @@ FcFontSetMatchInternal (FcFontSet **sets, printf ("\n"); FcPatternPrint (best); } + if (FcDebug () & FC_DBG_MATCH2) + { + char *env = getenv ("FC_DBG_MATCH_FILTER"); + FcObjectSet *os = NULL; + + if (env) + { + char *ss, *s; + char *p; + FcBool f = FcTrue; + + ss = s = strdup (env); + os = FcObjectSetCreate (); + while (f) + { + size_t len; + char *x; + + if (!(p = strchr (s, ','))) + { + f = FcFalse; + len = strlen (s) + 1; + } + else + { + len = (p - s) + 1; + } + x = malloc (sizeof (char) * len); + strncpy (x, s, len - 1); + x[len - 1] = 0; + if (FcObjectFromName (x) > 0) + FcObjectSetAdd (os, x); + s = p + 1; + free (x); + } + free (ss); + } + FcPatternPrint2 (p, best, os); + if (os) + FcObjectSetDestroy (os); + } /* assuming that 'result' is initialized with FcResultNoMatch * outside this function */ if (best) |