summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2014-12-14 13:39:41 -0800
committerBehdad Esfahbod <behdad@behdad.org>2014-12-14 13:40:02 -0800
commitdbc7c4a2cfe1ba6c537957b3b68b625403ca99fd (patch)
treeafedfdfd9ebf3e710d116ffa9fa260ce90acd5a0 /src
parentfc7e1a9497919c88d790d9395eb01cd7d5121507 (diff)
downloadfontconfig-dbc7c4a2cfe1ba6c537957b3b68b625403ca99fd.tar.gz
Add FC_COLOR
Only adds "color" to pattern if FreeType version supports color. Based on patch from Jungshik Shin.
Diffstat (limited to 'src')
-rw-r--r--src/fcfreetype.c6
-rw-r--r--src/fcmatch.c1
-rw-r--r--src/fcobjs.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index da66741..2575a72 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1285,6 +1285,12 @@ FcFreeTypeQueryFace (const FT_Face face,
(face->face_flags & FT_FACE_FLAG_SCALABLE) != 0))
goto bail1;
+#ifdef FT_FACE_FLAG_COLOR
+ if (!FcPatternAddBool (pat, FC_COLOR,
+ (face->face_flags & FT_FACE_FLAG_COLOR) != 0))
+ goto bail1;
+#endif
+
/*
* Get the OS/2 table
diff --git a/src/fcmatch.c b/src/fcmatch.c
index 25081e2..46d08bc 100644
--- a/src/fcmatch.c
+++ b/src/fcmatch.c
@@ -284,6 +284,7 @@ typedef enum _FcMatcherPriority {
PRI1(FILE),
PRI1(FONTFORMAT),
PRI1(SCALABLE),
+ PRI1(COLOR),
PRI1(FOUNDRY),
PRI1(CHARSET),
PRI_FAMILY_STRONG,
diff --git a/src/fcobjs.h b/src/fcobjs.h
index bfdf4b5..573fa61 100644
--- a/src/fcobjs.h
+++ b/src/fcobjs.h
@@ -68,4 +68,5 @@ FC_OBJECT (FONT_FEATURES, FcTypeString, NULL)
FC_OBJECT (PRGNAME, FcTypeString, NULL)
FC_OBJECT (HASH, FcTypeString, NULL) /* deprecated */
FC_OBJECT (POSTSCRIPT_NAME, FcTypeString, FcComparePostScript)
+FC_OBJECT (COLOR, FcTypeBool, FcCompareBool)
/* ^-------------- Add new objects here. */