Commit 1573adf9717315ef4b354c63a3b54122a231ef3d

Werner Lemberg 2002-04-28T12:25:31

* src/pcf/pcfdriver.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_CMAPS]: `root' -> `face->root'. * src/sfnt/ttcmap0.c (TT_Build_CMaps) [!FT_CONFIG_OPTION_USE_CMAPS]: Removed. * src/sfnt/ttcmap0.c: Declare TT_Build_CMaps only for FT_CONFIG_OPTION_USE_CMAPS.

diff --git a/ChangeLog b/ChangeLog
index e843f21..f0769c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,13 @@
 	(pfr_face_init): Return PFR_Err_Unknown_File_Format.
 	* src/pfr/rules.mk (PFR_DRV_H): Include pfrerror.h.
 
+	* src/pcf/pcfdriver.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_CMAPS]:
+	`root' -> `face->root'.
+	* src/sfnt/ttcmap0.c (TT_Build_CMaps) [!FT_CONFIG_OPTION_USE_CMAPS]:
+	Removed.
+	* src/sfnt/ttcmap0.c: Declare TT_Build_CMaps only for
+	FT_CONFIG_OPTION_USE_CMAPS.
+
 2002-04-27  Werner Lemberg  <wl@gnu.org>
 
 	* src/cache/ftccache.c (ftc_cache_lookup),
diff --git a/src/pcf/pcfdriver.c b/src/pcf/pcfdriver.c
index d3bf0b5..839b07b 100644
--- a/src/pcf/pcfdriver.c
+++ b/src/pcf/pcfdriver.c
@@ -345,8 +345,8 @@ THE SOFTWARE.
 #else  /* !FT_CONFIG_OPTION_USE_CMAPS */
 
       /* XXX: charmaps.  For now, report unicode for Unicode and Latin 1 */
-      root->charmaps     = &face->charmap_handle;
-      root->num_charmaps = 1;
+      face->root.charmaps     = &face->charmap_handle;
+      face->root.num_charmaps = 1;
 
       face->charmap.encoding    = ft_encoding_none;
       face->charmap.platform_id = 0;
@@ -359,9 +359,9 @@ THE SOFTWARE.
         face->charmap.encoding_id = 1;
       }
       
-      face->charmap.face   = root;
+      face->charmap.face   = &face->root;
       face->charmap_handle = &face->charmap;
-      root->charmap        = face->charmap_handle;
+      face->root.charmap   = face->charmap_handle;
 
 #endif /* !FT_CONFIG_OPTION_USE_CMAPS */        
         
diff --git a/src/sfnt/ttcmap0.c b/src/sfnt/ttcmap0.c
index cb29229..be318c1 100644
--- a/src/sfnt/ttcmap0.c
+++ b/src/sfnt/ttcmap0.c
@@ -1675,16 +1675,7 @@
     return 0;
   }
 
-#else /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-  FT_LOCAL_DEF( FT_Error )
-  TT_Build_CMaps( TT_Face  face )
-  {
-    FT_ERROR(( "No support for TT_Build_CMaps compiled\n" ));
-    return 0;
-  }
-
-#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
+#endif /* FT_CONFIG_OPTION_USE_CMAPS */
 
 
 /* END */
diff --git a/src/sfnt/ttcmap0.h b/src/sfnt/ttcmap0.h
index 7ce90c9..a37e909 100644
--- a/src/sfnt/ttcmap0.h
+++ b/src/sfnt/ttcmap0.h
@@ -62,9 +62,13 @@ FT_BEGIN_HEADER
 #define TT_VALID_GLYPH_COUNT( x )  TT_VALIDATOR( x )->num_glyphs
 
 
+#ifdef FT_CONFIG_OPTION_USE_CMAPS
+
   FT_LOCAL( FT_Error )
   TT_Build_CMaps( TT_Face  face );
 
+#endif
+
 
 FT_END_HEADER