[HarfBuzz] harfbuzz-ng: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Mar 1 19:34:10 PST 2010


 src/hb-ft.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit e48ed72230a83499dabbd02af2ac63340220a353
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Mar 1 22:33:45 2010 -0500

    [ft] Check stream->read instead of stream->base
    
    The former is more robust.  See discussion on freetype-devel.

diff --git a/src/hb-ft.c b/src/hb-ft.c
index 4c508a2..fb8e566 100644
--- a/src/hb-ft.c
+++ b/src/hb-ft.c
@@ -164,12 +164,13 @@ hb_ft_face_create (FT_Face           ft_face,
 {
   hb_face_t *face;
 
-  /* TODO: Handle NULL ft_face (in other places too */
-  if (ft_face->stream->base != NULL) {
+  /* TODO: Handle NULL ft_face (in other places too) */
+  if (ft_face->stream->read == NULL) {
     hb_blob_t *blob;
 
     blob = hb_blob_create ((const char *) ft_face->stream->base,
 			   (unsigned int) ft_face->stream->size,
+			   /* TODO: Check FT_FACE_FLAG_EXTERNAL_STREAM? */
 			   HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE,
 			   destroy, ft_face);
     face = hb_face_create_for_data (blob, ft_face->face_index);



More information about the HarfBuzz mailing list