73 lines
2.4 KiB
Diff
73 lines
2.4 KiB
Diff
|
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
|
||
|
index a7809cbb..4b545bf2 100644
|
||
|
--- a/src/fcfreetype.c
|
||
|
+++ b/src/fcfreetype.c
|
||
|
@@ -1087,6 +1087,8 @@ static const FT_UShort nameid_order[] = {
|
||
|
TT_NAME_ID_WWS_FAMILY,
|
||
|
TT_NAME_ID_TYPOGRAPHIC_FAMILY,
|
||
|
TT_NAME_ID_FONT_FAMILY,
|
||
|
+ TT_NAME_ID_MAC_FULL_NAME,
|
||
|
+ TT_NAME_ID_FULL_NAME,
|
||
|
TT_NAME_ID_WWS_SUBFAMILY,
|
||
|
TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY,
|
||
|
TT_NAME_ID_FONT_SUBFAMILY,
|
||
|
@@ -1222,6 +1224,8 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
|
||
|
int nfamily_lang = 0;
|
||
|
int nstyle = 0;
|
||
|
int nstyle_lang = 0;
|
||
|
+ int nfullname = 0;
|
||
|
+ int nfullname_lang = 0;
|
||
|
unsigned int p, n;
|
||
|
|
||
|
FcChar8 *style = 0;
|
||
|
@@ -1443,7 +1447,8 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
|
||
|
* and treat the instance's nameid as FONT_SUBFAMILY.
|
||
|
* Postscript name is automatically handled by FreeType. */
|
||
|
if (nameid == TT_NAME_ID_WWS_SUBFAMILY ||
|
||
|
- nameid == TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY)
|
||
|
+ nameid == TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY ||
|
||
|
+ nameid == TT_NAME_ID_FULL_NAME)
|
||
|
continue;
|
||
|
|
||
|
if (nameid == TT_NAME_ID_FONT_SUBFAMILY)
|
||
|
@@ -1474,6 +1479,20 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
|
||
|
np = &nfamily;
|
||
|
nlangp = &nfamily_lang;
|
||
|
break;
|
||
|
+ case TT_NAME_ID_MAC_FULL_NAME:
|
||
|
+ case TT_NAME_ID_FULL_NAME:
|
||
|
+ if (variable)
|
||
|
+ break;
|
||
|
+ if (FcDebug () & FC_DBG_SCANV)
|
||
|
+ printf ("found full (n %2d p %d e %d l 0x%04x)",
|
||
|
+ sname.name_id, sname.platform_id,
|
||
|
+ sname.encoding_id, sname.language_id);
|
||
|
+
|
||
|
+ obj = FC_FULLNAME_OBJECT;
|
||
|
+ objlang = FC_FULLNAMELANG_OBJECT;
|
||
|
+ np = &nfullname;
|
||
|
+ nlangp = &nfullname_lang;
|
||
|
+ break;
|
||
|
case TT_NAME_ID_WWS_SUBFAMILY:
|
||
|
case TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY:
|
||
|
case TT_NAME_ID_FONT_SUBFAMILY:
|
||
|
diff --git a/src/fcopentype.c b/src/fcopentype.c
|
||
|
index 9382a1ba..59cce456 100644
|
||
|
--- a/src/fcopentype.c
|
||
|
+++ b/src/fcopentype.c
|
||
|
@@ -76,12 +76,14 @@ FcPatternAddFullname (FcPattern *pat)
|
||
|
FcStrBufChar (&sbuf, ' ');
|
||
|
FcStrBufString (&sbuf, style);
|
||
|
}
|
||
|
+ FcPatternObjectDel (pat, FC_FULLNAME_OBJECT);
|
||
|
if (!FcPatternObjectAddString (pat, FC_FULLNAME_OBJECT, FcStrBufDoneStatic (&sbuf)))
|
||
|
{
|
||
|
FcStrBufDestroy (&sbuf);
|
||
|
return FcFalse;
|
||
|
}
|
||
|
FcStrBufDestroy (&sbuf);
|
||
|
+ FcPatternObjectDel (pat, FC_FULLNAMELANG_OBJECT);
|
||
|
if (!FcPatternObjectAddString (pat, FC_FULLNAMELANG_OBJECT, (const FcChar8 *) "en"))
|
||
|
return FcFalse;
|
||
|
}
|