rem: FcPatternAddString(pattern, FC_WEIGHT, "regular"); FcPatternAddString(pattern, FC_WEIGHT, "medium"); FcPatternAddString(pattern, FC_SLANT, "roman");
context: WMCopyFontWithStyle(WMScreen *scrPtr, WMFont *font, WMFontStyle style){    FcPattern *pattern;    WMFont *copy;    char *name;    if (!font)        return NULL;    pattern = FcNameParse(WMGetFontName(font));    switch (style) {    case WFSNormal:        FcPatternDel(pattern, FC_WEIGHT);        FcPatternDel(pattern, FC_SLANT);        FcPatternAddString(pattern, FC_WEIGHT, "regular");        FcPatternAddString(pattern, FC_WEIGHT, "medium");        FcPatternAddString(pattern, FC_SLANT, "roman");        break;    case WFSBold:        FcPatternDel(pattern, FC_WEIGHT);        FcPatternAddString(pattern, FC_WEIGHT, "bold");        break;    case WFSEmphasized:        FcPatternDel(pattern, FC_SLANT);        FcPatternAddString(pattern, FC_SLANT, "italic");        FcPatternAddString(pattern, FC_SLANT, "oblique");        break;    case WFSBoldEmphasized:        FcPatternDel(pattern, FC_WEIGHT);        FcPatternDel(pattern, FC_SLANT);        FcPatternAddString(pattern, FC_WEIGHT, "bold");        FcPatternAddString(pattern, FC_SLANT, "italic");        FcPatternAddString(pattern, FC_SLANT, "oblique");        break;    }    name = FcNameUnparse(pattern);    copy = WMCreateFont(scrPtr, name);    FcPatternDestroy(pattern);    wfree(name);    return copy;}