Commit c70818a86218ba0b322102147d27de1b52b9db05

Werner Lemberg 2003-05-15T06:44:09

* src/base/ftmac.c (FT_New_Face_From_SFNT): Handle CFF files also. * include/freetype/freetype.h: Fix typo in comment (FT_HAS_FIXED_SIZES).

diff --git a/ChangeLog b/ChangeLog
index e882564..4f976c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-05-14  George Williams  <gww@silcom.com>
+
+	* src/base/ftmac.c (FT_New_Face_From_SFNT): Handle CFF files also.
+
+2003-05-14  Werner Lemberg  <wl@gnu.org>
+
+	* include/freetype/freetype.h: Fix typo in comment
+	(FT_HAS_FIXED_SIZES).
+
 2003-05-10  Dan Williams  <dan@bigw.org>
 
 	* builds/unix/aclocal.m4: Comment out definition of
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 96979bb..7d20a4b 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1016,7 +1016,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* @macro:                                                               */
-  /*    FT_IS_FIXED_SIZES( face )                                          */
+  /*    FT_HAS_FIXED_SIZES( face )                                         */
   /*                                                                       */
   /* @description:                                                         */
   /*    A macro that returns true whenever a face object contains some     */
diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c
index dd445d8..f71c9f0 100644
--- a/src/base/ftbbox.c
+++ b/src/base/ftbbox.c
@@ -98,9 +98,9 @@
   static void
   BBox_Conic_Check( FT_Pos   y1,
                     FT_Pos   y2,
-                          FT_Pos   y3,
-                          FT_Pos*  min,
-                          FT_Pos*  max )
+                    FT_Pos   y3,
+                    FT_Pos*  min,
+                    FT_Pos*  max )
   {
     if ( y1 <= y3 )
     {
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index 4dbd825..ba018bc 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -588,6 +588,7 @@
     size_t     sfnt_size;
     FT_Error   error = 0;
     FT_Memory  memory = library->memory;
+    int        is_cff;
 
 
     sfnt = GetResource( 'sfnt', sfnt_id );
@@ -606,11 +607,16 @@
     HUnlock( sfnt );
     ReleaseResource( sfnt );
 
+    is_cff = rlen > 4 && sfnt_data[0] == 'O' &&
+                         sfnt_data[1] == 'T' &&
+                         sfnt_data[2] == 'T' &&
+                         sfnt_data[3] == 'O';
+
     return open_face_from_buffer( library,
                                   sfnt_data,
                                   sfnt_size,
                                   face_index,
-                                  "truetype",
+                                  is_cff ? "cff" : "truetype",
                                   aface );
   }
 
diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c
index c16fa24..5bf55eb 100644
--- a/src/base/fttrigon.c
+++ b/src/base/fttrigon.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType trigonometric functions (body).                             */
 /*                                                                         */
-/*  Copyright 2001 by                                                      */
+/*  Copyright 2001, 2002, 2003 by                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -366,8 +366,8 @@
     FT_Vector  v;
 
 
-    v.x   = vec->x;
-    v.y   = vec->y;
+    v.x = vec->x;
+    v.y = vec->y;
 
     if ( angle && ( v.x != 0 || v.y != 0 ) )
     {