++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;