freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Handling nested failures to open a face in IsMacResource


From: David Turner
Subject: Re: [ft-devel] Handling nested failures to open a face in IsMacResource
Date: Thu, 11 Jan 2007 16:05:20 +0100

Thanks a lot, this is in the CVS right now

- David

On Thu, 11 Jan 2007 22:14:18 +0900 (JST), "Masatake YAMATO" <address@hidden> 
said:
> Toshiya-san, I got some core-dumps when I tried to open
> 
>            Keyboard.dfont and
>            LastResort.dfont, fonts bundled in MacOSX.
> 
> I know these fonts are rather abnormal. However, a core-dump is not good.
> I wrote a patch. Please, review it.
> Give me ack, then I'll install this patch.
> 
> Regards,
> Masatake YAMATO
> 
> 2006-12-15  suzuki toshiya  <address@hidden>
> 
>       * src/base/ftobjs.c: Improvement of resource fork handler for
>       POSIX, cf.
>         http://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html
>       (Mac_Read_sfnt_Resource): Count only `sfnt' resource of suitcase font
>       format or .dfont, to simulate the face index number counted by ftmac.c.
>       (IsMacResource): Return the number of scalable faces correctly.
> 
> --- ftobjs.c    05  1&#26376; 2007 12:26:07 +0900      1.266
> +++ ftobjs.c    11  1&#26376; 2007 22:06:13 +0900      
> @@ -1446,7 +1446,8 @@
>                                        face_index, aface );
>        FT_FREE( data_offsets );
>        /* POST exists in an LWFN providing a single face */
> -      (*aface)->num_faces = 1;
> +      if ( !error )
> +       (*aface)->num_faces = 1;
>        return error;
>      }
>  
> @@ -1462,7 +1463,8 @@
>        error = Mac_Read_sfnt_Resource( library, stream, data_offsets,
>        count,
>                                        face_index_internal, aface );
>        FT_FREE( data_offsets );
> -      (*aface)->num_faces = count;
> +      if ( !error )
> +       (*aface)->num_faces = count;
>      }
>  
>      return error;
> 
> 
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]