freetype-commit
[Top][All Lists]
Advanced

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

[freetype2-demos] master cb46974: * Revert commits c7dd4d0c..0ab4babc


From: suzuki toshiya
Subject: [freetype2-demos] master cb46974: * Revert commits c7dd4d0c..0ab4babc
Date: Sat, 8 Jul 2023 21:21:21 -0400 (EDT)

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

    * Revert commits c7dd4d0c..0ab4babc
    
    Revert "[ftdump] Merge Print_CID_Implemented() to Print_CIDs()."
    Revert "[ftdump] Fix the help message for `-c' and `-C' options."
    Revert "[ftdump] Require `-c' or `-C' to dump the CID coverage."
    Revert "[ftdump] Fix coding style."
    Revert "[ftdump] Use FT_Get_CID_Is_Internally_CID_Keyed()."
    Revert "[ftdump] Add a comment why FT_IS_CID_KEYED() is not used."
    Revert "[ftdump] Print CID-keyed font properties if available."
    
    This reverts commit 0ab4babc058ce084faf214b7428bc08263335746.
    This reverts commit 5d9811ce085fee6c9d90b21e8224607198e57627.
    This reverts commit dac91ef6329051b156f904407a619ea25f446840.
    This reverts commit d6ff1379a02b53caebef70fd96d85a73630e084c.
    This reverts commit 992c073c768ad8b31e15b499cd1c35df46ef41c4.
    This reverts commit 98c55cbd19b6c120a14b5d1fbc29be2ab8e85e85.
    This reverts commit c7dd4d0c7ce7f5f2a15fc2e4239b69d4492ac3b2.
---
 src/ftdump.c | 134 +----------------------------------------------------------
 1 file changed, 1 insertion(+), 133 deletions(-)

diff --git a/src/ftdump.c b/src/ftdump.c
index 9b32efa..2361289 100644
--- a/src/ftdump.c
+++ b/src/ftdump.c
@@ -24,7 +24,6 @@
 #include <freetype/tttags.h>
 #include <freetype/t1tables.h>
 
-#include <freetype/ftcid.h>
 
   /* error messages */
 #undef FTERRORS_H_
@@ -115,7 +114,7 @@
              execname );
 
     fprintf( stderr,
-      "  -c, -C    Print charmap coverage and/or CID coverage.\n"
+      "  -c, -C    Print charmap coverage.\n"
       "  -n        Print SFNT 'name' table or Type1 font info.\n"
       "  -p        Print TrueType programs.\n"
       "  -t        Print SFNT table list.\n"
@@ -481,132 +480,6 @@
   }
 
 
-  /*
-   * FreeType 2 API supports 32-bit gid, but
-   * the CIDFont does not support 32-bit CID,
-   * because of the 64k limit of the array
-   * and dictionary objects in PostScript.
-   */
-#ifndef FT_CID_MAX
-#define FT_CID_MAX 0xFFFFU
-#endif
-  /*
-   * Print a range specified by 2 integers.
-   */
-  static void
-  Print_UInt_Range( FT_UInt  from,
-                    FT_UInt  to,
-                    char*    is_first )
-  {
-    if (!(*is_first))
-      printf(",");
-
-    if ( from == to )
-      printf( "%d", from );
-    else if ( from < to )
-      printf( "%d-%d", from, to );
-
-    *is_first = 0;
-  }
-
-
-  /*
-   * Print implemented CIDs by calling
-   *   FT_Get_CID_From_Glyph_Index() for all GIDs.
-   *
-   */
-  static void
-  Print_CIDs( FT_Face  face )
-  {
-    FT_UInt  gid = 0, max_gid = FT_UINT_MAX;
-    FT_UInt  cid = 0, rng_from = 0, rng_to = 0;
-    char     is_first_rng = 1;
-    
-
-    if ( face->num_glyphs < 1 )
-      return;
-
-    printf( "\n" );
-    printf( "CID coverage\n" );
-    printf( "   " );
-
-    if ( (FT_ULong)face->num_glyphs < FT_UINT_MAX )
-      max_gid = (FT_UInt)face->num_glyphs;
-
-    for ( gid = 0; gid <= max_gid; gid ++ )
-    {
-      if ( FT_Get_CID_From_Glyph_Index( face, gid, &cid ) )
-        continue;
-
-      if ( FT_CID_MAX < cid )
-      {
-        fprintf( stderr, "gid=%d resulted too large CID=%d, ignore it\n", gid, 
cid );
-        break;
-      }
-
-      if ( rng_to == cid )
-        continue;
-      else if ( cid < rng_to )
-      {
-        fprintf( stderr, "Unordered GID-CID map is found, please file your 
issue on "
-                         
"https://gitlab.freedesktop.org/groups/freetype/-/issues\n"; );
-        exit( 1 );
-      }
-      else if ( rng_to + 1 == cid )
-      {
-        rng_to = cid;
-        continue;
-      }
-
-      /* Found a gap (rng_to + 1 < cid), print the last range */
-      Print_UInt_Range( rng_from, rng_to, &is_first_rng );
-      rng_to = rng_from = cid;
-    }
-
-    Print_UInt_Range( rng_from, rng_to, &is_first_rng );
-
-    printf( "\n" );
-  }
-
-
-  /*
-   * Print_CIDFontInfo_Dictionary() might be conventional,
-   * but other tables, like gcid, can have ROS info too.
-   */
-  static void
-  Print_ROS_From_Face( FT_Face  face )
-  {
-    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" );
-    printf( "/CIDSystemInfo dictionary\n" );
-
-    if ( r )
-      printf( "%s%s\n", Name_Field( "Registry" ), r );
-
-    if ( o )
-      printf( "%s%s\n", Name_Field( "Ordering" ), o );
-
-    printf( "%s%d\n", Name_Field( "Supplement" ), s );
-
-    if ( coverage > 0 )
-      Print_CIDs( face );
-  }
-
-
   static void
   Print_FontPrivate_Dictionary( PS_Private  fp )
   {
@@ -1477,11 +1350,6 @@
         Print_Charmaps( face );
       }
 
-      /* FT_IS_CID_KEYED() does not catch an OpenType/CFF,
-       * let Print_ROS_From_Face() catch various cases.
-       */
-      Print_ROS_From_Face( face );
-
       if ( FT_HAS_MULTIPLE_MASTERS( face ) )
       {
         printf( "\n" );



reply via email to

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