freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] ftvalid


From: Masatake YAMATO
Subject: Re: [ft-devel] ftvalid
Date: Thu, 15 Jun 2006 21:07:06 +0900 (JST)

> >Toshiya-san, could you add following code to ftvalid.c?
> >
> >  status = validator_function();
> >
> >  if ( status = FT_Err_Unimplemented_Feature ) {
> >     fprintf("xx_validator module is not compiled in your libfreetype2");
> >     ...
> 
> OK, following messages are enough?


> --- src/ftvalid.c     25 Feb 2006 22:32:36 -0000      1.7
> +++ src/ftvalid.c     15 Jun 2006 10:36:51 -0000
> @@ -439,7 +439,10 @@
>                face, 
>                validation_flags, 
>                &data[0], &data[1], &data[2], &data[3], &data[4] );
> -      
> +
> +    if ( error == FT_Err_Unimplemented_Feature )
> +      printf( "FT_OpenType_Validate is disabled, replace FreeType2 with 
> otvalid-enabled version\n" );
> +
>      report_result( data, validation_flags, ot_table_spec, N_OT_TABLE_SPEC );
>  
>      for ( i = 0; i < N_OT_TABLE_SPEC; i++ )
> @@ -489,7 +492,10 @@
>                validation_flags, 
>                data,
>                N_GX_TABLE_SPEC );
> -      

I didn't test following code but I think following code may be better:

      if ( error == FT_Err_Unimplemented_Feature )
      {
         fprintf(stderr, 
                 "FT_OpenType_Validate is disabled, replace FreeType2 with 
otvalid-enabled version\n" );
         
      }
      else
      {
         report_result( data, validation_flags, ot_table_spec, N_OT_TABLE_SPEC 
);
      }

Here stderr should be used instead of stdout.
I think it may be better to be put report_result in else {}.

Regards,
Masatake YAMATO




reply via email to

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