summaryrefslogtreecommitdiff
path: root/pango/pango-ot-info.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-08-06 12:12:25 -0400
committerBehdad Esfahbod <behdad@behdad.org>2009-08-06 12:12:25 -0400
commitd29e8fcd57cd62627c4fdbbaf4cbcf2e58c5df89 (patch)
treed5b58905073335ce5faa6292764a7c27b31315c3 /pango/pango-ot-info.c
parent6ab6f0042aa081007af8a1ae7e8871c8a6f13ab2 (diff)
downloadpango-d29e8fcd57cd62627c4fdbbaf4cbcf2e58c5df89.tar.gz
[OT] Remove SFNT special-casing. HB knows how to do that
Diffstat (limited to 'pango/pango-ot-info.c')
-rw-r--r--pango/pango-ot-info.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/pango/pango-ot-info.c b/pango/pango-ot-info.c
index 025b74b7..2fc43057 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;