[pango] [OT] Remove SFNT special-casing. HB knows how to do that



commit d29e8fcd57cd62627c4fdbbaf4cbcf2e58c5df89
Author: Behdad Esfahbod <behdad behdad org>
Date:   Thu Aug 6 12:12:25 2009 -0400

    [OT] Remove SFNT special-casing.  HB knows how to do that

 pango/pango-ot-info.c |   30 +++++++++++++-----------------
 1 files changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/pango/pango-ot-info.c b/pango/pango-ot-info.c
index 025b74b..2fc4305 100644
--- a/pango/pango-ot-info.c
+++ b/pango/pango-ot-info.c
@@ -110,6 +110,8 @@ pango_ot_info_get (FT_Face face)
     return face->generic.data;
   else
     {
+      hb_blob_t *blob;
+
       if (face->generic.finalizer)
         face->generic.finalizer (face->generic.data);
 
@@ -118,23 +120,17 @@ pango_ot_info_get (FT_Face face)
 
       info->face = face;
 
-      if (FT_IS_SFNT (face))
-        {
-	  hb_blob_t *blob;
-
-	  /* XXX handle face->stream->base == NULL better */
-	  blob = hb_blob_create ((const char *) face->stream->base,
-				 (unsigned int) face->stream->size,
-				 HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITEABLE,
-				 NULL, NULL);
-	  info->hb_face = hb_face_create_for_data (blob, face->face_index);
-	  hb_blob_destroy (blob);
-
-	  if (!hb_ot_layout_has_font_glyph_classes (info->hb_face))
-	    synthesize_class_def (info);
-	}
-      else
-        info->hb_face = hb_face_create_for_data (hb_blob_create_empty (), 0);
+      /* XXX handle face->stream->base == NULL better */
+      blob = hb_blob_create ((const char *) face->stream->base,
+			     (unsigned int) face->stream->size,
+			     HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITEABLE,
+			     NULL, NULL);
+      info->hb_face = hb_face_create_for_data (blob, face->face_index);
+      hb_blob_destroy (blob);
+
+      /* XXX this is such a waste if not SFNT */
+      if (!hb_ot_layout_has_font_glyph_classes (info->hb_face))
+	synthesize_class_def (info);
     }
 
   return info;



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