shithub: freetype+ttf2subf

Download patch

ref: c948df52e40bca30a510694cc6ca00b49abd334c
parent: 84b3616c94f48726c596ead4150218d4431b3412
author: Alexei Podtelezhnikov <apodtele@gmail.com>
date: Thu Dec 17 10:53:51 EST 2020

* include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): New public macro.

The driver name is needed for `FT_Property_Set' and `FT_Property_Get'.

git/fs: mount .git/fs: mount/attach disallowed
--- 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).
--- a/include/freetype/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -88,6 +88,7 @@
    *   FT_Remove_Module
    *   FT_Add_Default_Modules
    *
+   *   FT_FACE_DRIVER_NAME
    *   FT_Property_Set
    *   FT_Property_Get
    *   FT_Set_Default_Properties
@@ -328,6 +329,23 @@
   FT_EXPORT( FT_Error )
   FT_Remove_Module( FT_Library  library,
                     FT_Module   module );
+
+
+  /**************************************************************************
+   *
+   * @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 )
 
 
   /**************************************************************************