From f7da903d370dcf662a301930b003485f25db618f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 18 Oct 2007 04:31:33 -0700 Subject: [PATCH] Make FC_FULLNAME include all fullname entries, elide nothing. [bug 12827] The old policy of eliding fullname entries which matched FC_FAMILY or FC_FAMILY + FC_STYLE meant that applications could not know what the font foundry set as the fullname of the font. Hiding information is not helpful. --- src/fcfreetype.c | 64 ------------------------------------------------ 1 file changed, 64 deletions(-) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index c79ab3b..fb2e01b 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1330,70 +1330,6 @@ FcFreeTypeQueryFace (const FT_Face face, ++nfamily; } - /* - * Walk through FC_FULLNAME entries eliding those in FC_FAMILY - * or which are simply a FC_FAMILY and FC_STYLE glued together - */ - { - int fn, fa; - FcChar8 *full; - FcChar8 *fam; - FcChar8 *style; - - for (fn = 0; FcPatternGetString (pat, FC_FULLNAME, fn, &full) == FcResultMatch; fn++) - { - FcBool remove = FcFalse; - /* - * Check each family - */ - for (fa = 0; !remove && - FcPatternGetString (pat, FC_FAMILY, - fa, &fam) == FcResultMatch; - fa++) - { - /* - * for exact match - */ - if (!FcStrCmpIgnoreBlanksAndCase (full, fam)) - { - remove = FcTrue; - break; - } - /* - * If the family is in the full name, check the - * combination of this family with every style - */ - if (!FcStrContainsIgnoreBlanksAndCase (full, fam)) - continue; - for (st = 0; !remove && - FcPatternGetString (pat, FC_STYLE, - st, &style) == FcResultMatch; - st++) - { - FcChar8 *both = FcStrPlus (fam, style); - - if (both) - { - if (FcStrCmpIgnoreBlanksAndCase (full, both) == 0) - remove = FcTrue; - free (both); - } - } - } - if (remove) - { - FcPatternRemove (pat, FC_FULLNAME, fn); - FcPatternRemove (pat, FC_FULLNAMELANG, fn); - fn--; - nfullname--; - nfullname_lang--; - } - } - if (FcDebug () & FC_DBG_SCANV) - for (fn = 0; FcPatternGetString (pat, FC_FULLNAME, fn, &full) == FcResultMatch; fn++) - printf ("Saving unique fullname %s\n", full); - } - if (!FcPatternAddString (pat, FC_FILE, file)) goto bail1; -- 2.39.2