shithub: freetype+ttf2subf

Download patch

ref: b9933f4b028dc64a6f59569d7ba8b747398b7602
parent: c793d90fca2f732865b504b9ae29ec6824c778d2
author: Werner Lemberg <[email protected]>
date: Fri Jun 1 17:27:12 EDT 2007

* src/base/ftobjs.c (FT_Request_Metrics), src/cache/ftccmap.c
(FTC_CMapCache_Lookup): Remove unused code.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-01  Werner Lemberg  <[email protected]>
+
+	* src/base/ftobjs.c (FT_Request_Metrics), src/cache/ftccmap.c
+	(FTC_CMapCache_Lookup): Remove unused code.
+
 2007-06-01  Sean McBride  <[email protected]>
 
 	* src/truetype/ttinterp.c (Null_Vector, NULL_Vector): Removed,
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -2243,16 +2243,16 @@
         w = h = face->ascender - face->descender;
         break;
 
-      case FT_SIZE_REQUEST_TYPE_CELL:
-        w = face->max_advance_width;
-        h = face->ascender - face->descender;
-        break;
-
       case FT_SIZE_REQUEST_TYPE_BBOX:
         w = face->bbox.xMax - face->bbox.xMin;
         h = face->bbox.yMax - face->bbox.yMin;
         break;
 
+      case FT_SIZE_REQUEST_TYPE_CELL:
+        w = face->max_advance_width;
+        h = face->ascender - face->descender;
+        break;
+
       case FT_SIZE_REQUEST_TYPE_SCALES:
         metrics->x_scale = (FT_Fixed)req->width;
         metrics->y_scale = (FT_Fixed)req->height;
@@ -2262,9 +2262,8 @@
           metrics->y_scale = metrics->x_scale;
         goto Calculate_Ppem;
 
-      default:
-        /* this never happens */
-        return;
+      case FT_SIZE_REQUEST_TYPE_MAX:
+        break;
       }
 
       /* to be on the safe side */
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType CharMap cache (body)                                        */
 /*                                                                         */
-/*  Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -341,7 +341,6 @@
 
           return FT_Get_Char_Index( face, char_code );
         }
-        break;
 
       default:
         return 0;