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, 22 Jun 2006 13:45:45 +0900 (JST)

> Sorry, when the internal validators are disabled, FT_XXX_Validate()
> should return FT_Err_Unimplemented, instead of FT_Err_Invalid_Argument.
> It was my mistake. I remember we had ever discussed this issue and
> agreed to implement so, when validation functions are decided to
> be disabled by default (around 2005-11?), but I slipped to fix that.
> Within 6 hours, I will fix it in CVS.

After rethinking, I found a case that FT_Err_Unimplemented is not
enough. With current code, FT_Err_Unimplemented is returned even if a
bdf face is passed to FT_TrueTypeGX_Validate. From the return value 
the user cannot distinguish (1) a validator is just disabled when building
libfreetype2 nor (2) a validator service doesn't support the face
passed as an argument.

With following patch FT_TrueTypeGX_Validate returns FT_Err_Unimplemented_Feature
for the case (1); and FT_Err_Invalid_Argument for the case (2).

Toshiya-san and Werner, do you think this is over kill?

If I get approval from you, I'll install patches for GX and OT.

Masatake YAMATO

--- ftgxval.c   16  6月 2006 04:42:51 +0900      1.4
+++ ftgxval.c   22  6月 2006 13:23:26 +0900      
@@ -61,8 +61,10 @@
                                  validation_flags,
                                  tables,
                                  table_length );
-    else
+    else if ( FT_Get_Module( FT_FACE_LIBRARY( face ), "gxvalid" ) == NULL )
       error = FT_Err_Unimplemented_Feature;
+    else
+      error = FT_Err_Invalid_Argument;
 
   Exit:
     return error;






reply via email to

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