2005-08-24 06:31:31 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* gxvmorx5.c */
|
|
|
|
/* */
|
|
|
|
/* TrueTypeGX/AAT morx table validation */
|
|
|
|
/* body for type5 (Contextual Glyph Insertion) subtable. */
|
|
|
|
/* */
|
|
|
|
/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
|
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
/***************************************************************************/
|
2005-09-01 09:33:03 +02:00
|
|
|
/* */
|
2005-08-24 06:31:31 +02:00
|
|
|
/* gxvalid is derived from both gxlayout module and otvalid module. */
|
2005-09-01 09:33:03 +02:00
|
|
|
/* Development of gxlayout is supported by the Information-technology */
|
|
|
|
/* Promotion Agency(IPA), Japan. */
|
|
|
|
/* */
|
2005-08-24 06:31:31 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
|
2005-09-01 09:33:03 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
#include "gxvmorx.h"
|
|
|
|
|
2005-09-01 09:33:03 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
|
|
|
|
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
|
|
|
|
/* messages during execution. */
|
|
|
|
/* */
|
|
|
|
#undef FT_COMPONENT
|
|
|
|
#define FT_COMPONENT trace_gxvmorx
|
|
|
|
|
|
|
|
|
2005-09-01 09:33:03 +02:00
|
|
|
/*
|
|
|
|
* `morx' subtable type5 (Contextual Glyph Insertion)
|
|
|
|
* has format of a StateTable with insertion-glyph-list
|
|
|
|
* without name. However, the 32bit offset from the head
|
|
|
|
* of subtable to the i-g-l is given after `entryTable',
|
|
|
|
* without variable name specification (the existence of
|
|
|
|
* this offset to the table is different from mort type5).
|
|
|
|
*/
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct GXV_morx_subtable_type5_StateOptRec_
|
|
|
|
{
|
|
|
|
FT_ULong insertionGlyphList;
|
|
|
|
FT_ULong insertionGlyphList_length;
|
|
|
|
|
|
|
|
} GXV_morx_subtable_type5_StateOptRec,
|
|
|
|
*GXV_morx_subtable_type5_StateOptRecData;
|
|
|
|
|
2005-09-01 09:33:03 +02:00
|
|
|
|
|
|
|
#define GXV_MORX_SUBTABLE_TYPE5_HEADER_SIZE \
|
|
|
|
( GXV_STATETABLE_HEADER_SIZE + 4 )
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_morx_subtable_type5_insertionGlyphList_load( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
2005-09-01 09:33:03 +02:00
|
|
|
|
|
|
|
GXV_morx_subtable_type5_StateOptRecData optdata =
|
Fixes for `make multi' and using C++ compiler.
* gxvalid/gxvcommn.c (gxv_set_length_by_ushort_offset,
gxv_set_length_by_ulong_offset, gxv_array_getlimits_byte,
gxv_array_getlimits_ushort): Declare with FT_LOCAL_DEF.
(gxv_compare_ranges): Make it static.
(gxv_LookupTable_fmt0_validate, gxv_LookupTable_fmt2_validate,
gxv_LookupTable_fmt4_validate, gxv_LookupTable_fmt6_validate,
gxv_LookupTable_fmt8_validate, gxv_LookupTable_validate): Improve
trace messages.
(gxv_StateArray_validate, gxv_XStateArray_validate): s/class/clazz/.
(GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE,
GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Move to
gxvcommn.h.
* gxvalid/gxvcommn.h: Add prototypes for
gxv_StateTable_subtable_setup, gxv_XStateTable_subtable_setup,
gxv_XStateTable_validate, gxv_array_getlimits_byte,
gxv_array_getlimits_ushort, gxv_set_length_by_ushort_offset,
gxv_set_length_by_ulong_offset, gxv_odtect_add_range,
gxv_odtect_validate.
(GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE,
GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Moved from
gxvcommn.c.
* src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate,
gxv_bsln_parts_fmt1_validate): Improve trace messages.
* gxvalid/gxvfeat.c: Split off predefined registry stuff to...
* gxvalid/gxvfeat.h: New file.
* gxvalid/gxvjust.c (gxv_just_wdc_entry_validate): Improve trace
message.
* gxvalid/gxvkern.c (GXV_kern_Dialect): Add KERN_DIALECT_UNKNOWN.
(gxv_kern_subtable_fmt1_valueTable_load,
gxv_kern_subtable_fmt1_subtable_setup,
gxv_kern_subtable_fmt1_entry_validate): Fix C++ compiler errors.
(gxv_kern_coverage_validate): Use KERN_DIALECT_UNKWOWN.
Improve trace message.
(gxv_kern_validate_generic): Fix C++ compiler error.
Improve trace message.
(gxv_kern_validate_classic): Fix C++ compiler error.
* gxvalid/gxvmort0.c (gxv_mort_subtable_type0_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmort1.c
(gxv_mort_subtable_type1_substitutionTable_load,
gxv_mort_subtable_type1_subtable_setup): Fix C++ compiler errors.
(gxv_mort_subtable_type1_substTable_validate): Improve trace
message.
(gxv_mort_subtable_type1_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmort2.c (gxv_mort_subtable_type2_opttable_load,
gxv_mort_subtable_type2_subtable_setup,
gxv_mort_subtable_type2_ligActionOffset_validate,
gxv_mort_subtable_type2_ligatureTable_validate): Fix C++ compiler
errors.
(gxv_mort_subtable_type2_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmort4.c (gxv_mort_subtable_type4_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup,
gxv_mort_subtable_type5_InsertList_validate): Fix C++ compiler
errors.
(gxv_mort_subtable_type5_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmort.c: Include gxvfeat.h.
(gxv_mort_featurearray_validate, gxv_mort_coverage_validate):
Declare with FT_LOCAL_DEF.
(gxv_mort_subtables_validate, gxv_mort_validate): Improve trace
messages.
* gxvalid/gxvmort.h (gxv_mort_feature_validate): Remove.
* gxvalid/gxvmorx0.c (gxv_morx_subtable_type0_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmorx1.c
(gxv_morx_subtable_type1_substitutionTable_load,
gxv_morx_subtable_type1_subtable_setup,
gxv_morx_subtable_type1_entry_validate,
gxv_morx_subtable_type1_substitutionTable_validate): Fix C++
compiler errors.
(gxv_morx_subtable_type1_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmorx2.c (gxv_morx_subtable_type2_opttable_load,
gxv_morx_subtable_type2_subtable_setup,
gxv_morx_subtable_type2_ligActionIndex_validate,
gxv_morx_subtable_type2_ligatureTable_validate): Fix C++ compiler
errors.
(gxv_morx_subtable_type2_validate): Declare with FT_LOCAL_DEF.
Fix typo.
* gxvalid/gxvmorx4.c (gxv_morx_subtable_type4_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmorx5.c (gxv_morx_subtable_type5_insertionGlyph_load,
gxv_morx_subtable_type5_subtable_setup): Fix C++ compiler error.
(gxv_morx_subtable_type5_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmorx.c (gxv_morx_subtables_validate,
gxv_morx_validate): Improve trace message.
* gxvalid/gxvopbd.c (gxv_opbd_LookupFmt4_transit): Fix compiler
warnings.
(gxv_opbd_validate): Improve trace message.
* gxvalid/gxvprop.c: Decorate constants with `U' and `L' where
appropriate.
(gxv_prop_zero_advance_validate, gxv_prop_validate): Improve trace
message.
* gxvalid/gxvtrak.c (gxv_trak_trackTable_validate): Remove unused
parameter. Update all callers.
(gxv_trak_validate): Improve trace message.
* rules.mk (GXV_DRV_H): Add gxvfeat.h.
2005-09-05 21:31:27 +02:00
|
|
|
(GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 4 );
|
|
|
|
optdata->insertionGlyphList = FT_NEXT_ULONG( p );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_morx_subtable_type5_subtable_setup( FT_ULong table_size,
|
|
|
|
FT_ULong classTable,
|
|
|
|
FT_ULong stateArray,
|
|
|
|
FT_ULong entryTable,
|
|
|
|
FT_ULong* classTable_length_p,
|
|
|
|
FT_ULong* stateArray_length_p,
|
|
|
|
FT_ULong* entryTable_length_p,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_ULong o[4];
|
|
|
|
FT_ULong* l[4];
|
|
|
|
FT_ULong buff[5];
|
2005-09-01 09:33:03 +02:00
|
|
|
|
|
|
|
GXV_morx_subtable_type5_StateOptRecData optdata =
|
Fixes for `make multi' and using C++ compiler.
* gxvalid/gxvcommn.c (gxv_set_length_by_ushort_offset,
gxv_set_length_by_ulong_offset, gxv_array_getlimits_byte,
gxv_array_getlimits_ushort): Declare with FT_LOCAL_DEF.
(gxv_compare_ranges): Make it static.
(gxv_LookupTable_fmt0_validate, gxv_LookupTable_fmt2_validate,
gxv_LookupTable_fmt4_validate, gxv_LookupTable_fmt6_validate,
gxv_LookupTable_fmt8_validate, gxv_LookupTable_validate): Improve
trace messages.
(gxv_StateArray_validate, gxv_XStateArray_validate): s/class/clazz/.
(GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE,
GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Move to
gxvcommn.h.
* gxvalid/gxvcommn.h: Add prototypes for
gxv_StateTable_subtable_setup, gxv_XStateTable_subtable_setup,
gxv_XStateTable_validate, gxv_array_getlimits_byte,
gxv_array_getlimits_ushort, gxv_set_length_by_ushort_offset,
gxv_set_length_by_ulong_offset, gxv_odtect_add_range,
gxv_odtect_validate.
(GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE,
GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Moved from
gxvcommn.c.
* src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate,
gxv_bsln_parts_fmt1_validate): Improve trace messages.
* gxvalid/gxvfeat.c: Split off predefined registry stuff to...
* gxvalid/gxvfeat.h: New file.
* gxvalid/gxvjust.c (gxv_just_wdc_entry_validate): Improve trace
message.
* gxvalid/gxvkern.c (GXV_kern_Dialect): Add KERN_DIALECT_UNKNOWN.
(gxv_kern_subtable_fmt1_valueTable_load,
gxv_kern_subtable_fmt1_subtable_setup,
gxv_kern_subtable_fmt1_entry_validate): Fix C++ compiler errors.
(gxv_kern_coverage_validate): Use KERN_DIALECT_UNKWOWN.
Improve trace message.
(gxv_kern_validate_generic): Fix C++ compiler error.
Improve trace message.
(gxv_kern_validate_classic): Fix C++ compiler error.
* gxvalid/gxvmort0.c (gxv_mort_subtable_type0_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmort1.c
(gxv_mort_subtable_type1_substitutionTable_load,
gxv_mort_subtable_type1_subtable_setup): Fix C++ compiler errors.
(gxv_mort_subtable_type1_substTable_validate): Improve trace
message.
(gxv_mort_subtable_type1_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmort2.c (gxv_mort_subtable_type2_opttable_load,
gxv_mort_subtable_type2_subtable_setup,
gxv_mort_subtable_type2_ligActionOffset_validate,
gxv_mort_subtable_type2_ligatureTable_validate): Fix C++ compiler
errors.
(gxv_mort_subtable_type2_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmort4.c (gxv_mort_subtable_type4_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup,
gxv_mort_subtable_type5_InsertList_validate): Fix C++ compiler
errors.
(gxv_mort_subtable_type5_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmort.c: Include gxvfeat.h.
(gxv_mort_featurearray_validate, gxv_mort_coverage_validate):
Declare with FT_LOCAL_DEF.
(gxv_mort_subtables_validate, gxv_mort_validate): Improve trace
messages.
* gxvalid/gxvmort.h (gxv_mort_feature_validate): Remove.
* gxvalid/gxvmorx0.c (gxv_morx_subtable_type0_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmorx1.c
(gxv_morx_subtable_type1_substitutionTable_load,
gxv_morx_subtable_type1_subtable_setup,
gxv_morx_subtable_type1_entry_validate,
gxv_morx_subtable_type1_substitutionTable_validate): Fix C++
compiler errors.
(gxv_morx_subtable_type1_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmorx2.c (gxv_morx_subtable_type2_opttable_load,
gxv_morx_subtable_type2_subtable_setup,
gxv_morx_subtable_type2_ligActionIndex_validate,
gxv_morx_subtable_type2_ligatureTable_validate): Fix C++ compiler
errors.
(gxv_morx_subtable_type2_validate): Declare with FT_LOCAL_DEF.
Fix typo.
* gxvalid/gxvmorx4.c (gxv_morx_subtable_type4_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmorx5.c (gxv_morx_subtable_type5_insertionGlyph_load,
gxv_morx_subtable_type5_subtable_setup): Fix C++ compiler error.
(gxv_morx_subtable_type5_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmorx.c (gxv_morx_subtables_validate,
gxv_morx_validate): Improve trace message.
* gxvalid/gxvopbd.c (gxv_opbd_LookupFmt4_transit): Fix compiler
warnings.
(gxv_opbd_validate): Improve trace message.
* gxvalid/gxvprop.c: Decorate constants with `U' and `L' where
appropriate.
(gxv_prop_zero_advance_validate, gxv_prop_validate): Improve trace
message.
* gxvalid/gxvtrak.c (gxv_trak_trackTable_validate): Remove unused
parameter. Update all callers.
(gxv_trak_validate): Improve trace message.
* rules.mk (GXV_DRV_H): Add gxvfeat.h.
2005-09-05 21:31:27 +02:00
|
|
|
(GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
o[0] = classTable;
|
|
|
|
o[1] = stateArray;
|
|
|
|
o[2] = entryTable;
|
|
|
|
o[3] = optdata->insertionGlyphList;
|
|
|
|
l[0] = classTable_length_p;
|
|
|
|
l[1] = stateArray_length_p;
|
|
|
|
l[2] = entryTable_length_p;
|
|
|
|
l[3] = &(optdata->insertionGlyphList_length);
|
|
|
|
|
|
|
|
gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, valid );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_morx_subtable_type5_InsertList_validate( FT_UShort index,
|
|
|
|
FT_UShort count,
|
|
|
|
FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
2005-09-01 09:33:03 +02:00
|
|
|
FT_Bytes p = table + index * 2;
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
|
2005-09-01 09:33:03 +02:00
|
|
|
while ( p < table + count * 2 + index * 2 )
|
2005-08-24 06:31:31 +02:00
|
|
|
{
|
2005-09-01 09:33:03 +02:00
|
|
|
FT_UShort insert_glyphID;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 2 );
|
|
|
|
insert_glyphID = FT_NEXT_USHORT( p );
|
|
|
|
GXV_TRACE(( " 0x%04x", insert_glyphID ));
|
|
|
|
}
|
|
|
|
|
|
|
|
GXV_TRACE(( "\n" ));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2005-09-01 09:33:03 +02:00
|
|
|
gxv_morx_subtable_type5_entry_validate(
|
|
|
|
FT_UShort state,
|
|
|
|
FT_UShort flags,
|
|
|
|
GXV_StateTable_GlyphOffsetDesc glyphOffset,
|
|
|
|
FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
2005-08-24 06:31:31 +02:00
|
|
|
{
|
|
|
|
FT_Bool setMark;
|
|
|
|
FT_Bool dontAdvance;
|
|
|
|
FT_Bool currentIsKashidaLike;
|
|
|
|
FT_Bool markedIsKashidaLike;
|
|
|
|
FT_Bool currentInsertBefore;
|
|
|
|
FT_Bool markedInsertBefore;
|
* src/base/Jamfile: adding src/base/ftgxval.c
* src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c, src/gxvalid/gxvfeat.c,
src/gxvalid/gxvjust.c, src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c,
src/gxvalid/gxvmort.c, src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c, src/gxvalid/gxvmort5.c,
src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx0.c, src/gxvalid/gxvmorx1.c,
src/gxvalid/gxvmorx2.c, src/gxvalid/gxvmorx5.c, src/gxvalid/gxvopbd.c,
src/gxvalid/gxvprop.c, src/sfnt/sfdriver.c, src/truetype/ttgload.c:
removing _many_ compiler warnings when compiling with Visual C++
at maximum level (/W4)
2005-09-23 15:22:10 +02:00
|
|
|
FT_Byte currentInsertCount;
|
2005-08-24 06:31:31 +02:00
|
|
|
FT_Byte markedInsertCount;
|
|
|
|
FT_Byte currentInsertList;
|
|
|
|
FT_UShort markedInsertList;
|
|
|
|
|
2005-09-01 09:33:03 +02:00
|
|
|
FT_UNUSED( state );
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
|
2005-09-28 09:34:45 +02:00
|
|
|
setMark = FT_BOOL( ( flags >> 15 ) & 1 );
|
|
|
|
dontAdvance = FT_BOOL( ( flags >> 14 ) & 1 );
|
|
|
|
currentIsKashidaLike = FT_BOOL( ( flags >> 13 ) & 1 );
|
|
|
|
markedIsKashidaLike = FT_BOOL( ( flags >> 12 ) & 1 );
|
|
|
|
currentInsertBefore = FT_BOOL( ( flags >> 11 ) & 1 );
|
|
|
|
markedInsertBefore = FT_BOOL( ( flags >> 10 ) & 1 );
|
|
|
|
|
|
|
|
currentInsertCount = (FT_Byte)( ( flags >> 5 ) & 0x1F );
|
|
|
|
markedInsertCount = (FT_Byte)( flags & 0x001F );
|
|
|
|
|
|
|
|
currentInsertList = (FT_Byte) ( glyphOffset.ul >> 16 );
|
|
|
|
markedInsertList = (FT_UShort)( glyphOffset.ul );
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
if ( currentInsertList && 0 != currentInsertCount )
|
|
|
|
gxv_morx_subtable_type5_InsertList_validate( currentInsertList,
|
|
|
|
currentInsertCount,
|
|
|
|
table, limit,
|
|
|
|
valid );
|
|
|
|
|
|
|
|
if ( markedInsertList && 0 != markedInsertCount )
|
|
|
|
gxv_morx_subtable_type5_InsertList_validate( markedInsertList,
|
|
|
|
markedInsertCount,
|
|
|
|
table, limit,
|
|
|
|
valid );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Fixes for `make multi' and using C++ compiler.
* gxvalid/gxvcommn.c (gxv_set_length_by_ushort_offset,
gxv_set_length_by_ulong_offset, gxv_array_getlimits_byte,
gxv_array_getlimits_ushort): Declare with FT_LOCAL_DEF.
(gxv_compare_ranges): Make it static.
(gxv_LookupTable_fmt0_validate, gxv_LookupTable_fmt2_validate,
gxv_LookupTable_fmt4_validate, gxv_LookupTable_fmt6_validate,
gxv_LookupTable_fmt8_validate, gxv_LookupTable_validate): Improve
trace messages.
(gxv_StateArray_validate, gxv_XStateArray_validate): s/class/clazz/.
(GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE,
GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Move to
gxvcommn.h.
* gxvalid/gxvcommn.h: Add prototypes for
gxv_StateTable_subtable_setup, gxv_XStateTable_subtable_setup,
gxv_XStateTable_validate, gxv_array_getlimits_byte,
gxv_array_getlimits_ushort, gxv_set_length_by_ushort_offset,
gxv_set_length_by_ulong_offset, gxv_odtect_add_range,
gxv_odtect_validate.
(GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE,
GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Moved from
gxvcommn.c.
* src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate,
gxv_bsln_parts_fmt1_validate): Improve trace messages.
* gxvalid/gxvfeat.c: Split off predefined registry stuff to...
* gxvalid/gxvfeat.h: New file.
* gxvalid/gxvjust.c (gxv_just_wdc_entry_validate): Improve trace
message.
* gxvalid/gxvkern.c (GXV_kern_Dialect): Add KERN_DIALECT_UNKNOWN.
(gxv_kern_subtable_fmt1_valueTable_load,
gxv_kern_subtable_fmt1_subtable_setup,
gxv_kern_subtable_fmt1_entry_validate): Fix C++ compiler errors.
(gxv_kern_coverage_validate): Use KERN_DIALECT_UNKWOWN.
Improve trace message.
(gxv_kern_validate_generic): Fix C++ compiler error.
Improve trace message.
(gxv_kern_validate_classic): Fix C++ compiler error.
* gxvalid/gxvmort0.c (gxv_mort_subtable_type0_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmort1.c
(gxv_mort_subtable_type1_substitutionTable_load,
gxv_mort_subtable_type1_subtable_setup): Fix C++ compiler errors.
(gxv_mort_subtable_type1_substTable_validate): Improve trace
message.
(gxv_mort_subtable_type1_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmort2.c (gxv_mort_subtable_type2_opttable_load,
gxv_mort_subtable_type2_subtable_setup,
gxv_mort_subtable_type2_ligActionOffset_validate,
gxv_mort_subtable_type2_ligatureTable_validate): Fix C++ compiler
errors.
(gxv_mort_subtable_type2_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmort4.c (gxv_mort_subtable_type4_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup,
gxv_mort_subtable_type5_InsertList_validate): Fix C++ compiler
errors.
(gxv_mort_subtable_type5_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmort.c: Include gxvfeat.h.
(gxv_mort_featurearray_validate, gxv_mort_coverage_validate):
Declare with FT_LOCAL_DEF.
(gxv_mort_subtables_validate, gxv_mort_validate): Improve trace
messages.
* gxvalid/gxvmort.h (gxv_mort_feature_validate): Remove.
* gxvalid/gxvmorx0.c (gxv_morx_subtable_type0_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmorx1.c
(gxv_morx_subtable_type1_substitutionTable_load,
gxv_morx_subtable_type1_subtable_setup,
gxv_morx_subtable_type1_entry_validate,
gxv_morx_subtable_type1_substitutionTable_validate): Fix C++
compiler errors.
(gxv_morx_subtable_type1_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmorx2.c (gxv_morx_subtable_type2_opttable_load,
gxv_morx_subtable_type2_subtable_setup,
gxv_morx_subtable_type2_ligActionIndex_validate,
gxv_morx_subtable_type2_ligatureTable_validate): Fix C++ compiler
errors.
(gxv_morx_subtable_type2_validate): Declare with FT_LOCAL_DEF.
Fix typo.
* gxvalid/gxvmorx4.c (gxv_morx_subtable_type4_validate): Declare
with FT_LOCAL_DEF.
* gxvalid/gxvmorx5.c (gxv_morx_subtable_type5_insertionGlyph_load,
gxv_morx_subtable_type5_subtable_setup): Fix C++ compiler error.
(gxv_morx_subtable_type5_validate): Declare with FT_LOCAL_DEF.
* gxvalid/gxvmorx.c (gxv_morx_subtables_validate,
gxv_morx_validate): Improve trace message.
* gxvalid/gxvopbd.c (gxv_opbd_LookupFmt4_transit): Fix compiler
warnings.
(gxv_opbd_validate): Improve trace message.
* gxvalid/gxvprop.c: Decorate constants with `U' and `L' where
appropriate.
(gxv_prop_zero_advance_validate, gxv_prop_validate): Improve trace
message.
* gxvalid/gxvtrak.c (gxv_trak_trackTable_validate): Remove unused
parameter. Update all callers.
(gxv_trak_validate): Improve trace message.
* rules.mk (GXV_DRV_H): Add gxvfeat.h.
2005-09-05 21:31:27 +02:00
|
|
|
FT_LOCAL_DEF( void )
|
2005-08-24 06:31:31 +02:00
|
|
|
gxv_morx_subtable_type5_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
2005-09-01 09:33:03 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_morx_subtable_type5_StateOptRec et_rec;
|
|
|
|
GXV_morx_subtable_type5_StateOptRecData et = &et_rec;
|
|
|
|
|
|
|
|
|
|
|
|
GXV_NAME_ENTER( "morx chain subtable type5 (Glyph Insertion)" );
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE5_HEADER_SIZE );
|
|
|
|
|
2005-09-01 09:33:03 +02:00
|
|
|
valid->xstatetable.optdata =
|
|
|
|
et;
|
|
|
|
valid->xstatetable.optdata_load_func =
|
|
|
|
gxv_morx_subtable_type5_insertionGlyphList_load;
|
|
|
|
valid->xstatetable.subtable_setup_func =
|
|
|
|
gxv_morx_subtable_type5_subtable_setup;
|
|
|
|
valid->xstatetable.entry_glyphoffset_fmt =
|
|
|
|
GXV_GLYPHOFFSET_ULONG;
|
|
|
|
valid->xstatetable.entry_validate_func =
|
|
|
|
gxv_morx_subtable_type5_entry_validate;
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
gxv_XStateTable_validate( p, limit, valid );
|
2005-09-01 09:33:03 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_EXIT;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|