freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Setting FT_ValidationLevel


From: Masatake YAMATO
Subject: Re: [ft-devel] Setting FT_ValidationLevel
Date: Wed, 13 Jul 2005 16:31:58 +0900 (JST)

> > I have found that there is no way to pass FT_VALIDATE_DEFAULT,
> > FT_VALIDATE_TIGHT not FT_VALIDATE_PARANOID to FT_OpenType_Validate.
> > 
> > Always FT_VALIDATE_DEFAULT is used.  Is it expected behavior?
> 
> Yes, more or less.  I've modeled the validation code after the cmap
> validation code which also doesn't allow configuration.  IIRC, David's
> idea was that a normal build of the FreeType library should use the
> default value since it isn't its job to do a thorough font checking --
> rather the opposite, namely to allow as much glitches in the font as
> possible.  People who want to reuse FreeType's validation code will
> change this.

I see.

> Do you need it configurable?  Why?

No. However, I have one more question:

freetype/ftotval.h:

 #define FT_VALIDATE_BASE  0x0100
 #define FT_VALIDATE_GDEF  0x0200
 #define FT_VALIDATE_GPOS  0x0400
 #define FT_VALIDATE_GSUB  0x0800
 #define FT_VALIDATE_JSTF  0x1000

 #define FT_VALIDATE_OT  FT_VALIDATE_BASE | \
                         FT_VALIDATE_GDEF | \
                         FT_VALIDATE_GPOS | \
                         FT_VALIDATE_GSUB | \
                         FT_VALIDATE_JSTF


Why FT_VALIDATE_BASE is started from 0x0100?
It seems that 0xFF is reserved.

I guessed this 0xFF is reserved for passing the validation level.
Using this reserved area, it is easy to pass a validation level
to validator; and it is easy to switch the validation level 
dynamically.

Masatake YAMATO




reply via email to

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