1 /****************************************************************************
5 * TrueTypeGX/AAT morx table validation
6 * body for type0 (Indic Script Rearrangement) subtable.
8 * Copyright (C) 2005-2020 by
9 * suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
10 * David Turner, Robert Wilhelm, and Werner Lemberg.
12 * This file is part of the FreeType project, and may only be used,
13 * modified, and distributed under the terms of the FreeType project
14 * license, LICENSE.TXT. By continuing to use, modify, or distribute
15 * this file you indicate that you have read the license and
16 * understand and accept it fully.
20 /****************************************************************************
22 * gxvalid is derived from both gxlayout module and otvalid module.
23 * Development of gxlayout is supported by the Information-technology
24 * Promotion Agency(IPA), Japan.
32 /**************************************************************************
34 * The macro FT_COMPONENT is used in trace mode. It is an implicit
35 * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
36 * messages during execution.
39 #define FT_COMPONENT gxvmorx
43 gxv_morx_subtable_type0_entry_validate(
46 GXV_XStateTable_GlyphOffsetCPtr glyphOffset_p,
49 GXV_Validator gxvalid )
51 #ifdef GXV_LOAD_UNUSED_VARS
53 FT_UShort dontAdvance;
57 #ifdef GXV_LOAD_UNUSED_VARS
62 FT_UNUSED( glyphOffset_p );
67 #ifdef GXV_LOAD_UNUSED_VARS
68 markFirst = (FT_UShort)( ( flags >> 15 ) & 1 );
69 dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
70 markLast = (FT_UShort)( ( flags >> 13 ) & 1 );
73 reserved = (FT_UShort)( flags & 0x1FF0 );
74 #ifdef GXV_LOAD_UNUSED_VARS
75 verb = (FT_UShort)( flags & 0x000F );
80 GXV_TRACE(( " non-zero bits found in reserved range\n" ));
87 gxv_morx_subtable_type0_validate( FT_Bytes table,
89 GXV_Validator gxvalid )
95 "morx chain subtable type0 (Indic-Script Rearrangement)" );
97 GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE );
99 gxvalid->xstatetable.optdata = NULL;
100 gxvalid->xstatetable.optdata_load_func = NULL;
101 gxvalid->xstatetable.subtable_setup_func = NULL;
102 gxvalid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
103 gxvalid->xstatetable.entry_validate_func =
104 gxv_morx_subtable_type0_entry_validate;
106 gxv_XStateTable_validate( p, limit, gxvalid );