shithub: freetype+ttf2subf

Download patch

ref: 1573adf9717315ef4b354c63a3b54122a231ef3d
parent: b658ac9e63daf21cb136c10444eb29033cde7882
author: Werner Lemberg <[email protected]>
date: Sun Apr 28 08:25:31 EDT 2002

* 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.

git/fs: mount .git/fs: mount/attach disallowed
--- 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  <[email protected]>
 
 	* src/cache/ftccache.c (ftc_cache_lookup),
--- a/src/pcf/pcfdriver.c
+++ b/src/pcf/pcfdriver.c
@@ -345,8 +345,8 @@
 #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 @@
         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 */        
         
--- 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 */
--- a/src/sfnt/ttcmap0.h
+++ b/src/sfnt/ttcmap0.h
@@ -62,8 +62,12 @@
 #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