]> git.wh0rd.org Git - fontconfig.git/commitdiff
Make FC_FULLNAME include all fullname entries, elide nothing. [bug 12827]
authorKeith Packard <keithp@koto.keithp.com>
Thu, 18 Oct 2007 11:31:33 +0000 (04:31 -0700)
committerKeith Packard <keithp@koto.keithp.com>
Thu, 18 Oct 2007 11:31:33 +0000 (04:31 -0700)
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

index c79ab3b7712bb411f7d18692ac9322c6be3be0a4..fb2e01b2c477020fc88be6a067cdeb667a6d38ef 100644 (file)
@@ -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;