Commit ff655437e3090af23ed4d79e7782e7ccab4498e6

Werner Lemberg 2016-07-14T15:01:55

* include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.

diff --git a/ChangeLog b/ChangeLog
index e42f0cb..b2400c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2016-07-14  Werner Lemberg  <wl@gnu.org>
 
+	* include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
+
+2016-07-14  Werner Lemberg  <wl@gnu.org>
+
 	[sfnt] Fix `face_index' value in `FT_Face' for named instances.
 
 	* src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
diff --git a/docs/CHANGES b/docs/CHANGES
index 2d1b54c..d2d47cc 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -9,6 +9,12 @@ CHANGES BETWEEN 2.6.5 and 2.7
       documented.
 
 
+  II. MISCELLANEOUS
+
+    - A new macro `FT_IS_NAMED_INSTANCE' to test  whether a given face
+      is a named instance.
+
+
 ======================================================================
 
 CHANGES BETWEEN 2.6.4 and 2.6.5
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 45e10c4..8f104ab 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1361,6 +1361,20 @@ FT_BEGIN_HEADER
   /*************************************************************************
    *
    * @macro:
+   *   FT_IS_NAMED_INSTANCE( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object is a named instance
+   *   of a GX variation font.
+   *
+   */
+#define FT_IS_NAMED_INSTANCE( face ) \
+          ( (face)->face_index & 0x7FFF0000L )
+
+
+  /*************************************************************************
+   *
+   * @macro:
    *   FT_IS_CID_KEYED( face )
    *
    * @description: