freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2-demos] master 992c073 3/7: [ftdump] Use FT_Get_CID_Is_Interna


From: Werner Lemberg
Subject: [freetype2-demos] master 992c073 3/7: [ftdump] Use FT_Get_CID_Is_Internally_CID_Keyed().
Date: Fri, 5 May 2023 12:47:58 -0400 (EDT)

branch: master
commit 992c073c768ad8b31e15b499cd1c35df46ef41c4
Author: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Commit: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>

    [ftdump] Use FT_Get_CID_Is_Internally_CID_Keyed().
    
    * ftdump.c (Print_ROS_From_Face): Use
    FT_Get_CID_Is_Internally_CID_Keyed() instead
    of the comparison of the driver names.
---
 src/ftdump.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/ftdump.c b/src/ftdump.c
index 999dee6..8c59725 100644
--- a/src/ftdump.c
+++ b/src/ftdump.c
@@ -586,21 +586,23 @@
   static void
   Print_ROS_From_Face( FT_Face  face )
   {
-    const FT_String*  module_name = FT_FACE_DRIVER_NAME( face );
-    const char*       r = NULL;
-    const char*       o = NULL;
-    FT_Int            s = -1;
+    FT_Bool      is_cid = 0;
+    const char*  r = NULL;
+    const char*  o = NULL;
+    FT_Int       s = -1;
 
 
+    if ( FT_Get_CID_Is_Internally_CID_Keyed( face, &is_cid ) )
+      return;
+
+    if ( !is_cid )
+      return;
+
     if ( FT_Get_CID_Registry_Ordering_Supplement( face, &r, &o, &s ) )
       return;
 
     printf( "\n" );
-    if ( !ft_strcmp( module_name, "cff" ) ||
-         !ft_strcmp( module_name, "t1cid") )
-      printf( "/CIDSystemInfo dictionary\n" );
-    else /* some fonts can have a ROS info out of /CIDSysteInfo dict */
-      printf( "CID info\n" );
+    printf( "/CIDSystemInfo dictionary\n" );
 
     if ( r )
       printf("%s%s\n", Name_Field( "Registry" ), r );



reply via email to

[Prev in Thread] Current Thread [Next in Thread]