From c78e7fd6deea835a522a89b3ae9ecc4fb1a2b672 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 3 Apr 2020 19:44:00 +0900 Subject: Add fullname later once FcConfigSubstitute() is done So user's changes in family and style will be reflected into fullname. --- src/fcfreetype.c | 57 -------------------------------------------------------- 1 file changed, 57 deletions(-) (limited to 'src/fcfreetype.c') diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 672c33a..0001f38 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1666,63 +1666,6 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, ++nfamily; } - /* Add the fullname into the cache */ - if (!variable) - { - FcChar8 *family, *style, *lang; - int n = 0; - size_t len, i; - FcStrBuf sbuf; - - while (FcPatternObjectGetString (pat, FC_FAMILYLANG_OBJECT, n, &lang) == FcResultMatch) - { - if (FcStrCmp (lang, (const FcChar8 *) "en") == 0) - break; - n++; - lang = NULL; - } - if (!lang) - n = 0; - if (FcPatternObjectGetString (pat, FC_FAMILY_OBJECT, n, &family) != FcResultMatch) - goto bail1; - len = strlen ((const char *) family); - for (i = len; i > 0; i--) - { - if (!isspace (family[i])) - break; - } - family[i] = 0; - while (FcPatternObjectGetString (pat, FC_STYLELANG_OBJECT, n, &lang) == FcResultMatch) - { - if (FcStrCmp (lang, (const FcChar8 *) "en") == 0) - break; - n++; - lang = NULL; - } - if (!lang) - n = 0; - if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch) - goto bail1; - len = strlen ((const char *) style); - for (i = 0; style[i] != 0 && isspace (style[i]); i++) - break; - memcpy (style, &style[i], len - i); - FcStrBufInit (&sbuf, NULL, 0); - FcStrBufString (&sbuf, family); - if (FcStrCmpIgnoreBlanksAndCase(style, (const FcChar8 *) "Regular") != 0) - { - FcStrBufChar (&sbuf, ' '); - FcStrBufString (&sbuf, style); - } - if (!FcPatternObjectAddString (pat, FC_FULLNAME_OBJECT, FcStrBufDoneStatic (&sbuf))) - { - FcStrBufDestroy (&sbuf); - goto bail1; - } - FcStrBufDestroy (&sbuf); - if (!FcPatternObjectAddString (pat, FC_FULLNAMELANG_OBJECT, (const FcChar8 *) "en")) - goto bail1; - } /* Add the PostScript name into the cache */ if (!variable) { -- cgit v1.2.1