2005-08-24 06:31:31 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* gxvjust.c */
|
|
|
|
/* */
|
|
|
|
/* TrueTypeGX/AAT just table validation (body). */
|
|
|
|
/* */
|
|
|
|
/* 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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
/***************************************************************************/
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
/* */
|
2005-08-24 06:31:31 +02:00
|
|
|
/* gxvalid is derived from both gxlayout module and otvalid module. */
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
/* Development of gxlayout is supported by the Information-technology */
|
|
|
|
/* Promotion Agency(IPA), Japan. */
|
|
|
|
/* */
|
2005-08-24 06:31:31 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
#include "gxvalid.h"
|
|
|
|
#include "gxvcommn.h"
|
|
|
|
|
|
|
|
#include FT_SFNT_NAMES_H
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* 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_gxvjust
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
/*
|
|
|
|
* referred `just' table format specification:
|
|
|
|
* http://developer.apple.com/fonts/TTRefMan/RM06/Chap6just.html
|
|
|
|
* last updated 2000.
|
|
|
|
* ----------------------------------------------
|
|
|
|
* [JUST HEADER]: GXV_JUST_HEADER_SIZE
|
|
|
|
* version (fixed: 32bit) = 0x00010000
|
|
|
|
* format (uint16: 16bit) = 0 is only defined (2000)
|
|
|
|
* horizOffset (uint16: 16bit)
|
|
|
|
* vertOffset (uint16: 16bit)
|
|
|
|
* ----------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
typedef struct GXV_just_DataRec_
|
|
|
|
{
|
|
|
|
FT_UShort wdc_offset_max;
|
|
|
|
FT_UShort wdc_offset_min;
|
|
|
|
FT_UShort pc_offset_max;
|
|
|
|
FT_UShort pc_offset_min;
|
|
|
|
|
|
|
|
} GXV_just_DataRec, *GXV_just_Data;
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
#define GXV_JUST_DATA( a ) GXV_TABLE_DATA( just, a )
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
static void
|
|
|
|
gxv_just_wdp_entry_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_ULong justClass;
|
|
|
|
FT_Fixed beforeGrowLimit;
|
|
|
|
FT_Fixed beforeShrinkGrowLimit;
|
|
|
|
FT_Fixed afterGrowLimit;
|
|
|
|
FT_Fixed afterShrinkGrowLimit;
|
|
|
|
FT_UShort growFlags;
|
|
|
|
FT_UShort shrinkFlags;
|
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 + 4 + 2 + 2 );
|
|
|
|
justClass = FT_NEXT_ULONG( p );
|
|
|
|
beforeGrowLimit = FT_NEXT_ULONG( p );
|
|
|
|
beforeShrinkGrowLimit = FT_NEXT_ULONG( p );
|
|
|
|
afterGrowLimit = FT_NEXT_ULONG( p );
|
|
|
|
afterShrinkGrowLimit = FT_NEXT_ULONG( p );
|
|
|
|
growFlags = FT_NEXT_USHORT( p );
|
|
|
|
shrinkFlags = FT_NEXT_USHORT( p );
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
/* TODO: decode flags for human readability */
|
2005-08-24 06:31:31 +02:00
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
2005-08-24 06:31:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_wdc_entry_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_ULong count, i;
|
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 4 );
|
|
|
|
count = FT_NEXT_ULONG( p );
|
|
|
|
for ( i = 0; i < count; i++ )
|
|
|
|
{
|
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_TRACE(( "validating wdc pair %d/%d\n", i + 1, count ));
|
2005-08-24 06:31:31 +02:00
|
|
|
gxv_just_wdp_entry_validate( p, limit, valid );
|
|
|
|
p += valid->subtable_length;
|
|
|
|
}
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
2005-08-24 06:31:31 +02:00
|
|
|
}
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
static void
|
|
|
|
gxv_just_widthDeltaClusters_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_Bytes p = table ;
|
|
|
|
FT_Bytes wdc_end = table + GXV_JUST_DATA( wdc_offset_max );
|
|
|
|
FT_UInt i;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
GXV_NAME_ENTER( "just justDeltaClusters" );
|
|
|
|
|
|
|
|
if ( limit <= wdc_end )
|
|
|
|
FT_INVALID_OFFSET;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
for ( i = 0; p <= wdc_end; i++ )
|
|
|
|
{
|
|
|
|
gxv_just_wdc_entry_validate( p, limit, valid );
|
|
|
|
p += valid->subtable_length;
|
|
|
|
}
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_EXIT;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_actSubrecord_type0_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_Bytes p = table;
|
|
|
|
|
|
|
|
FT_Fixed lowerLimit;
|
|
|
|
FT_Fixed upperLimit;
|
|
|
|
|
|
|
|
FT_UShort order;
|
|
|
|
FT_UShort decomposedCount;
|
|
|
|
|
|
|
|
FT_UInt i;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 4 + 4 + 2 + 2 );
|
|
|
|
lowerLimit = FT_NEXT_ULONG( p );
|
|
|
|
upperLimit = FT_NEXT_ULONG( p );
|
|
|
|
order = FT_NEXT_USHORT( p );
|
|
|
|
decomposedCount = FT_NEXT_USHORT( p );
|
|
|
|
|
|
|
|
for ( i = 0; i < decomposedCount; i++ )
|
|
|
|
{
|
|
|
|
FT_UShort glyphs;
|
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 2 );
|
|
|
|
glyphs = FT_NEXT_USHORT( p );
|
|
|
|
}
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
2005-08-24 06:31:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_actSubrecord_type1_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_UShort addGlyph;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 2 );
|
|
|
|
addGlyph = FT_NEXT_USHORT( p );
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
2005-08-24 06:31:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_actSubrecord_type2_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_Fixed substThreshhold; /* Apple misspelled "Threshhold" */
|
|
|
|
FT_UShort addGlyph;
|
|
|
|
FT_UShort substGlyph;
|
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 4 + 2 + 2 );
|
|
|
|
substThreshhold = FT_NEXT_ULONG( p );
|
|
|
|
addGlyph = FT_NEXT_USHORT( p );
|
|
|
|
substGlyph = FT_NEXT_USHORT( p );
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
2005-08-24 06:31:31 +02:00
|
|
|
}
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
static void
|
|
|
|
gxv_just_actSubrecord_type4_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_ULong variantsAxis;
|
|
|
|
FT_Fixed minimumLimit;
|
|
|
|
FT_Fixed noStretchValue;
|
|
|
|
FT_Fixed maximumLimit;
|
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 );
|
|
|
|
variantsAxis = FT_NEXT_ULONG( p );
|
|
|
|
minimumLimit = FT_NEXT_ULONG( p );
|
|
|
|
noStretchValue = FT_NEXT_ULONG( p );
|
|
|
|
maximumLimit = FT_NEXT_ULONG( p );
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
2005-08-24 06:31:31 +02:00
|
|
|
}
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
static void
|
|
|
|
gxv_just_actSubrecord_type5_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_UShort flags;
|
|
|
|
FT_UShort glyph;
|
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 2 + 2 );
|
|
|
|
flags = FT_NEXT_USHORT( p );
|
|
|
|
glyph = FT_NEXT_USHORT( p );
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
2005-08-24 06:31:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* parse single actSubrecord */
|
|
|
|
static void
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
gxv_just_actSubrecord_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
2005-08-24 06:31:31 +02:00
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_UShort actionClass;
|
|
|
|
FT_UShort actionType;
|
|
|
|
FT_ULong actionLength;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
GXV_NAME_ENTER( "just actSubrecord" );
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 2 + 2 + 4 );
|
|
|
|
actionClass = FT_NEXT_USHORT( p );
|
|
|
|
actionType = FT_NEXT_USHORT( p );
|
|
|
|
actionLength = FT_NEXT_ULONG( p );
|
|
|
|
|
|
|
|
if ( actionType == 0 )
|
|
|
|
gxv_just_actSubrecord_type0_validate( p, limit, valid );
|
|
|
|
else if ( actionType == 1 )
|
|
|
|
gxv_just_actSubrecord_type1_validate( p, limit, valid );
|
|
|
|
else if ( actionType == 2 )
|
|
|
|
gxv_just_actSubrecord_type2_validate( p, limit, valid );
|
|
|
|
else if ( actionType == 3 )
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
; /* Stretch glyph action: no actionData */
|
2005-08-24 06:31:31 +02:00
|
|
|
else if ( actionType == 4 )
|
|
|
|
gxv_just_actSubrecord_type4_validate( p, limit, valid );
|
|
|
|
else if ( actionType == 5 )
|
|
|
|
gxv_just_actSubrecord_type5_validate( p, limit, valid );
|
|
|
|
else
|
|
|
|
FT_INVALID_DATA;
|
|
|
|
|
|
|
|
valid->subtable_length = actionLength;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_EXIT;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_pcActionRecord_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_ULong actionCount;
|
|
|
|
FT_ULong i;
|
|
|
|
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 4 );
|
|
|
|
actionCount = FT_NEXT_ULONG( p );
|
|
|
|
GXV_TRACE(( "actionCount = %d\n", actionCount ));
|
|
|
|
|
|
|
|
for ( i = 0; i < actionCount; i++ )
|
|
|
|
{
|
|
|
|
gxv_just_actSubrecord_validate( p, limit, valid );
|
|
|
|
p += valid->subtable_length;
|
|
|
|
}
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_EXIT;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_pcTable_LookupValue_entry_validate( FT_UShort glyph,
|
|
|
|
GXV_LookupValueDesc value,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_UNUSED( glyph );
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
if ( value.u > GXV_JUST_DATA( pc_offset_max ) )
|
|
|
|
GXV_JUST_DATA( pc_offset_max ) = value.u;
|
|
|
|
if ( value.u < GXV_JUST_DATA( pc_offset_max ) )
|
|
|
|
GXV_JUST_DATA( pc_offset_min ) = value.u;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_pcLookupTable_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_NAME_ENTER( "just pcLookupTable" );
|
|
|
|
GXV_JUST_DATA( pc_offset_max ) = 0x0000;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
GXV_JUST_DATA( pc_offset_min ) = 0xFFFFU;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
|
|
|
|
valid->lookupval_func = gxv_just_pcTable_LookupValue_entry_validate;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
gxv_LookupTable_validate( p, limit, valid );
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
/* subtable_length is set by gxv_LookupTable_validate() */
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_EXIT;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_postcompTable_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_Bytes p = table;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
GXV_NAME_ENTER( "just postcompTable" );
|
|
|
|
|
|
|
|
gxv_just_pcLookupTable_validate( p, limit, valid );
|
|
|
|
p += valid->subtable_length;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
gxv_just_pcActionRecord_validate( p, limit, valid );
|
|
|
|
p += valid->subtable_length;
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length = p - table;
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_EXIT;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
gxv_just_classTable_entry_validate(
|
|
|
|
FT_Byte 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_UShort setMark;
|
|
|
|
FT_UShort dontAdvance;
|
|
|
|
FT_UShort markClass;
|
|
|
|
FT_UShort currentClass;
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_UNUSED( state );
|
|
|
|
FT_UNUSED( glyphOffset );
|
|
|
|
FT_UNUSED( table );
|
|
|
|
FT_UNUSED( limit );
|
|
|
|
FT_UNUSED( valid );
|
|
|
|
|
|
|
|
|
* 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
|
|
|
setMark = (FT_UShort)( (flags >> 15) & 1 );
|
|
|
|
dontAdvance = (FT_UShort)( (flags >> 14) & 1);
|
|
|
|
markClass = (FT_UShort)( (flags >> 7) & 0x7F );
|
|
|
|
currentClass = (FT_UShort)( flags & 0x7F );
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
/* TODO: validate markClass & currentClass */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_justClassTable_validate ( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_UShort length;
|
|
|
|
FT_UShort coverage;
|
|
|
|
FT_ULong subFeatureFlags;
|
|
|
|
|
|
|
|
|
|
|
|
GXV_NAME_ENTER( "just justClassTable" );
|
|
|
|
|
|
|
|
GXV_LIMIT_CHECK( 2 + 2 + 4 );
|
|
|
|
length = FT_NEXT_USHORT( p );
|
|
|
|
coverage = FT_NEXT_USHORT( p );
|
|
|
|
subFeatureFlags = FT_NEXT_ULONG( p );
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
GXV_TRACE(( " justClassTable: coverage = 0x%04x (%s)",
|
|
|
|
coverage,
|
|
|
|
( 0x4000 & coverage ) == 0 ? "ascending" : "descending" ));
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
valid->statetable.optdata = NULL;
|
|
|
|
valid->statetable.optdata_load_func = NULL;
|
|
|
|
valid->statetable.subtable_setup_func = NULL;
|
|
|
|
valid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->statetable.entry_validate_func =
|
|
|
|
gxv_just_classTable_entry_validate;
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
gxv_StateTable_validate( p, table + length, valid );
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
/* subtable_length is set by gxv_LookupTable_validate() */
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
GXV_EXIT;
|
2005-08-24 06:31:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_wdcTable_LookupValue_validate( FT_UShort glyph,
|
|
|
|
GXV_LookupValueDesc value,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_UNUSED( glyph );
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
if ( value.u > GXV_JUST_DATA( wdc_offset_max ) )
|
|
|
|
GXV_JUST_DATA( wdc_offset_max ) = value.u;
|
|
|
|
if ( value.u < GXV_JUST_DATA( wdc_offset_min ) )
|
|
|
|
GXV_JUST_DATA( wdc_offset_min ) = value.u;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gxv_just_justData_lookuptable_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_Bytes p = table;
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
GXV_JUST_DATA( wdc_offset_max ) = 0x0000;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
GXV_JUST_DATA( wdc_offset_min ) = 0xFFFFU;
|
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
|
|
|
|
valid->lookupval_func = gxv_just_wdcTable_LookupValue_validate;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
gxv_LookupTable_validate( p, limit, valid );
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
/* subtable_length is set by gxv_LookupTable_validate() */
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_EXIT;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* gxv_just_justData_validate() parses and validates horizData, vertData.
|
|
|
|
*/
|
|
|
|
static void
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
gxv_just_justData_validate( FT_Bytes table,
|
|
|
|
FT_Bytes limit,
|
|
|
|
GXV_Validator valid )
|
2005-08-24 06:31:31 +02:00
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
/*
|
|
|
|
* following 3 offsets are measured from the start of `just'
|
|
|
|
* (which table points to), not justData
|
2005-08-24 06:31:31 +02:00
|
|
|
*/
|
|
|
|
FT_UShort justClassTableOffset;
|
|
|
|
FT_UShort wdcTableOffset;
|
|
|
|
FT_UShort pcTableOffset;
|
|
|
|
FT_Bytes p = table;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_ODTECT( 4, odtect );
|
|
|
|
|
|
|
|
|
|
|
|
GXV_NAME_ENTER( "just justData" );
|
|
|
|
|
|
|
|
GXV_ODTECT_INIT( odtect );
|
|
|
|
GXV_LIMIT_CHECK( 2 + 2 + 2 );
|
|
|
|
justClassTableOffset = FT_NEXT_USHORT( p );
|
|
|
|
wdcTableOffset = FT_NEXT_USHORT( p );
|
|
|
|
pcTableOffset = FT_NEXT_USHORT( p );
|
|
|
|
|
|
|
|
GXV_TRACE(( " (justClassTableOffset = 0x%04x)\n", justClassTableOffset ));
|
|
|
|
GXV_TRACE(( " (wdcTableOffset = 0x%04x)\n", wdcTableOffset ));
|
|
|
|
GXV_TRACE(( " (pcTableOffset = 0x%04x)\n", pcTableOffset ));
|
|
|
|
|
|
|
|
gxv_just_justData_lookuptable_validate( p, limit, valid );
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
gxv_odtect_add_range( p, valid->subtable_length,
|
|
|
|
"just_LookupTable", odtect );
|
2005-08-24 06:31:31 +02:00
|
|
|
|
|
|
|
if ( wdcTableOffset )
|
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
gxv_just_widthDeltaClusters_validate(
|
|
|
|
valid->root->base + wdcTableOffset, limit, valid );
|
2005-08-24 06:31:31 +02:00
|
|
|
gxv_odtect_add_range( valid->root->base + wdcTableOffset,
|
|
|
|
valid->subtable_length, "just_wdcTable", odtect );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( pcTableOffset )
|
|
|
|
{
|
|
|
|
gxv_just_postcompTable_validate( valid->root->base + pcTableOffset,
|
|
|
|
limit, valid );
|
|
|
|
gxv_odtect_add_range( valid->root->base + pcTableOffset,
|
|
|
|
valid->subtable_length, "just_pcTable", odtect );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( justClassTableOffset )
|
|
|
|
{
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
gxv_just_justClassTable_validate(
|
|
|
|
valid->root->base + justClassTableOffset, limit, valid );
|
2005-08-24 06:31:31 +02:00
|
|
|
gxv_odtect_add_range( valid->root->base + justClassTableOffset,
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
valid->subtable_length, "just_justClassTable",
|
|
|
|
odtect );
|
2005-08-24 06:31:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
gxv_odtect_validate( odtect, valid );
|
|
|
|
|
|
|
|
GXV_EXIT;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( void )
|
|
|
|
gxv_just_validate( FT_Bytes table,
|
|
|
|
FT_Face face,
|
|
|
|
FT_Validator ftvalid )
|
|
|
|
{
|
|
|
|
FT_Bytes p = table;
|
|
|
|
FT_Bytes limit = 0;
|
|
|
|
FT_UInt table_size;
|
|
|
|
|
|
|
|
GXV_ValidatorRec validrec;
|
|
|
|
GXV_Validator valid = &validrec;
|
|
|
|
GXV_just_DataRec justrec;
|
|
|
|
GXV_just_Data just = &justrec;
|
|
|
|
|
|
|
|
FT_ULong version;
|
|
|
|
FT_UShort format;
|
|
|
|
FT_UShort horizOffset;
|
|
|
|
FT_UShort vertOffset;
|
|
|
|
|
|
|
|
GXV_ODTECT( 3, odtect );
|
|
|
|
|
|
|
|
|
|
|
|
GXV_ODTECT_INIT( odtect );
|
|
|
|
|
|
|
|
valid->root = ftvalid;
|
|
|
|
valid->table_data = just;
|
|
|
|
valid->face = face;
|
|
|
|
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
FT_TRACE3(( "validating `just' table\n" ));
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_INIT;
|
|
|
|
|
|
|
|
limit = valid->root->limit;
|
|
|
|
table_size = limit - table;
|
* src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix tracing message.
* src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
* src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve tracing
messages.
Decorate constants with `U' and `L' where appropriate.
Fix compiler warnings.
2005-09-01 00:39:23 +02:00
|
|
|
|
2005-08-24 06:31:31 +02:00
|
|
|
GXV_LIMIT_CHECK( 4 + 2 + 2 + 2 );
|
|
|
|
version = FT_NEXT_ULONG( p );
|
|
|
|
format = FT_NEXT_USHORT( p );
|
|
|
|
horizOffset = FT_NEXT_USHORT( p );
|
|
|
|
vertOffset = FT_NEXT_USHORT( p );
|
|
|
|
gxv_odtect_add_range( table, p - table, "just header", odtect );
|
|
|
|
|
|
|
|
|
|
|
|
/* Version 1.0 (always:2000) */
|
|
|
|
GXV_TRACE(( " (version = 0x%08x)\n", version ));
|
|
|
|
if ( version != 0x00010000UL )
|
|
|
|
FT_INVALID_FORMAT;
|
|
|
|
|
|
|
|
/* format 0 (always:2000) */
|
|
|
|
GXV_TRACE(( " (format = 0x%04x)\n", format ));
|
|
|
|
if ( format != 0x0000 )
|
|
|
|
FT_INVALID_FORMAT;
|
|
|
|
|
|
|
|
GXV_TRACE(( " (horizOffset = %d)\n", horizOffset ));
|
|
|
|
GXV_TRACE(( " (vertOffset = %d)\n", vertOffset ));
|
|
|
|
|
|
|
|
|
|
|
|
/* validate justData */
|
|
|
|
if ( 0 < horizOffset )
|
|
|
|
{
|
|
|
|
gxv_just_justData_validate( table + horizOffset, limit, valid );
|
|
|
|
gxv_odtect_add_range( table + horizOffset, valid->subtable_length,
|
|
|
|
"horizJustData", odtect );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( 0 < vertOffset )
|
|
|
|
{
|
|
|
|
gxv_just_justData_validate( table + vertOffset, limit, valid );
|
|
|
|
gxv_odtect_add_range( table + vertOffset, valid->subtable_length,
|
|
|
|
"vertJustData", odtect );
|
|
|
|
}
|
|
|
|
|
|
|
|
gxv_odtect_validate( odtect, valid );
|
|
|
|
|
|
|
|
FT_TRACE4(( "\n" ));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|