* include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): New public macro. The driver name is needed for `FT_Property_Set' and `FT_Property_Get'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
diff --git a/ChangeLog b/ChangeLog
index 3c93564..4fe9b34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-12-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): New public macro.
+
+ The driver name is needed for `FT_Property_Set' and `FT_Property_Get'.
+
2020-12-16 Chris Liddell <chris.liddell@artifex.com>
[truetype] Fix incremental metrics (#59503).
diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h
index f4246dc..8b0bbe3 100644
--- a/include/freetype/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -88,6 +88,7 @@ FT_BEGIN_HEADER
* FT_Remove_Module
* FT_Add_Default_Modules
*
+ * FT_FACE_DRIVER_NAME
* FT_Property_Set
* FT_Property_Get
* FT_Set_Default_Properties
@@ -331,6 +332,23 @@ FT_BEGIN_HEADER
/**************************************************************************
+ *
+ * @macro:
+ * FT_FACE_DRIVER_NAME
+ *
+ * @description:
+ * A macro that retrieves the name of a font driver from a face object.
+ *
+ * @note:
+ * The font driver name is a valid `module_name` for @FT_Property_Set
+ * and @FT_Property_Get. This is not the same as @FT_Get_Font_Format.
+ *
+ */
+#define FT_FACE_DRIVER_NAME( face ) \
+ ( ( *(FT_Module_Class**)( ( face )->driver ) )->module_name )
+
+
+ /**************************************************************************
*
* @function:
* FT_Property_Set