[ft] Open blob in READONLY mode
authorBehdad Esfahbod <behdad@behdad.org>
Mon, 29 Dec 2014 00:20:31 +0000 (16:20 -0800)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 29 Dec 2014 00:20:31 +0000 (16:20 -0800)
HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE is deprecated and fairly
useless now.

src/hb-ft.cc

index c42d484..c3b58f8 100644 (file)
@@ -340,11 +340,7 @@ hb_ft_face_create (FT_Face           ft_face,
 
     blob = hb_blob_create ((const char *) ft_face->stream->base,
                           (unsigned int) ft_face->stream->size,
-                          /* TODO: We assume that it's mmap()'ed, but FreeType code
-                           * suggests that there are cases we reach here but font is
-                           * not mmapped.  For example, when mmap() fails.  No idea
-                           * how to deal with it better here. */
-                          HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE,
+                          HB_MEMORY_MODE_READONLY,
                           ft_face, destroy);
     face = hb_face_create (blob, ft_face->face_index);
     hb_blob_destroy (blob);