1 /***************************************************************************/
5 /* TrueTypeGX/AAT morx table validation */
6 /* body for type0 (Indic Script Rearrangement) subtable. */
8 /* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
11 /* This file is part of the FreeType project, and may only be used, */
12 /* modified, and distributed under the terms of the FreeType project */
13 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
14 /* this file you indicate that you have read the license and */
15 /* understand and accept it fully. */
17 /***************************************************************************/
19 /***************************************************************************/
21 /* gxvalid is derived from both gxlayout module and otvalid module. */
22 /* Development of gxlayout is supported by the Information-technology */
23 /* Promotion Agency(IPA), Japan. */
25 /***************************************************************************/
31 /*************************************************************************/
33 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
34 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
35 /* messages during execution. */
38 #define FT_COMPONENT trace_gxvmorx
42 gxv_morx_subtable_type0_entry_validate(
45 GXV_XStateTable_GlyphOffsetDesc glyphOffset
,
51 FT_UShort dontAdvance
;
57 FT_UNUSED( glyphOffset
);
62 markFirst
= (FT_UShort
)( ( flags
>> 15 ) & 1 );
63 dontAdvance
= (FT_UShort
)( ( flags
>> 14 ) & 1 );
64 markLast
= (FT_UShort
)( ( flags
>> 13 ) & 1 );
66 reserved
= (FT_UShort
)( flags
& 0x1FF0 );
67 verb
= (FT_UShort
)( flags
& 0x000F );
71 GXV_TRACE(( " non-zero bits found in reserved range\n" ));
78 gxv_morx_subtable_type0_validate( FT_Bytes table
,
86 "morx chain subtable type0 (Indic-Script Rearrangement)" );
88 GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE
);
90 valid
->xstatetable
.optdata
= NULL
;
91 valid
->xstatetable
.optdata_load_func
= NULL
;
92 valid
->xstatetable
.subtable_setup_func
= NULL
;
93 valid
->xstatetable
.entry_glyphoffset_fmt
= GXV_GLYPHOFFSET_NONE
;
94 valid
->xstatetable
.entry_validate_func
=
95 gxv_morx_subtable_type0_entry_validate
;
97 gxv_XStateTable_validate( p
, limit
, valid
);