17 |
/***************************************************************************/ |
/***************************************************************************/ |
18 |
|
|
19 |
/***************************************************************************/ |
/***************************************************************************/ |
20 |
|
/* */ |
21 |
/* gxvalid is derived from both gxlayout module and otvalid module. */ |
/* gxvalid is derived from both gxlayout module and otvalid module. */ |
22 |
/* Development of gxlayout was support of Information-technology Promotion */ |
/* Development of gxlayout is supported by the Information-technology */ |
23 |
/* Agency(IPA), Japan. */ |
/* Promotion Agency(IPA), Japan. */ |
24 |
|
/* */ |
25 |
/***************************************************************************/ |
/***************************************************************************/ |
26 |
|
|
27 |
|
|
28 |
#include "gxvmort.h" |
#include "gxvmort.h" |
29 |
|
|
30 |
|
|
31 |
/*************************************************************************/ |
/*************************************************************************/ |
32 |
/* */ |
/* */ |
33 |
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */ |
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */ |
43 |
GXV_LookupValueDesc value, |
GXV_LookupValueDesc value, |
44 |
GXV_Validator valid ) |
GXV_Validator valid ) |
45 |
{ |
{ |
46 |
|
FT_UNUSED( glyph ); |
47 |
|
|
48 |
gxv_glyphid_validate( value.u, valid ); |
gxv_glyphid_validate( value.u, valid ); |
49 |
} |
} |
50 |
|
|
74 |
| value | <-------+ |
| value | <-------+ |
75 |
.... |
.... |
76 |
*/ |
*/ |
77 |
|
|
78 |
static GXV_LookupValueDesc |
static GXV_LookupValueDesc |
79 |
gxv_mort_subtable_type4_lookupfmt4_transit( FT_UShort relative_gindex, |
gxv_mort_subtable_type4_lookupfmt4_transit( |
80 |
GXV_LookupValueDesc base_value, |
FT_UShort relative_gindex, |
81 |
FT_Bytes lookuptbl_limit, |
GXV_LookupValueDesc base_value, |
82 |
GXV_Validator valid ) |
FT_Bytes lookuptbl_limit, |
83 |
|
GXV_Validator valid ) |
84 |
{ |
{ |
85 |
FT_Bytes p; |
FT_Bytes p; |
86 |
FT_Bytes limit; |
FT_Bytes limit; |
88 |
GXV_LookupValueDesc value; |
GXV_LookupValueDesc value; |
89 |
|
|
90 |
|
|
91 |
offset = base_value.u + ( relative_gindex * sizeof ( FT_UShort ) ); |
offset = base_value.u + relative_gindex * sizeof ( FT_UShort ); |
92 |
|
|
93 |
p = valid->lookuptbl_head + offset; |
p = valid->lookuptbl_head + offset; |
94 |
limit = lookuptbl_limit; |
limit = lookuptbl_limit; |
99 |
return value; |
return value; |
100 |
} |
} |
101 |
|
|
102 |
|
|
103 |
static void |
static void |
104 |
gxv_mort_subtable_type4_validate( FT_Bytes table, |
gxv_mort_subtable_type4_validate( FT_Bytes table, |
105 |
FT_Bytes limit, |
FT_Bytes limit, |
108 |
FT_Bytes p = table; |
FT_Bytes p = table; |
109 |
|
|
110 |
|
|
111 |
GXV_NAME_ENTER( "mort chain subtable type4 (Non-Contextual Glyph Substitution)" ); |
GXV_NAME_ENTER( "mort chain subtable type4 " |
112 |
|
"(Non-Contextual Glyph Substitution)" ); |
113 |
|
|
114 |
valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; |
valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED; |
115 |
valid->lookupval_func = gxv_mort_subtable_type4_lookupval_validate; |
valid->lookupval_func = gxv_mort_subtable_type4_lookupval_validate; |
116 |
valid->lookupfmt4_trans = gxv_mort_subtable_type4_lookupfmt4_transit; |
valid->lookupfmt4_trans = gxv_mort_subtable_type4_lookupfmt4_transit; |
117 |
|
|
118 |
gxv_LookupTable_validate( p, limit, valid ); |
gxv_LookupTable_validate( p, limit, valid ); |
119 |
|
|
120 |
GXV_EXIT; |
GXV_EXIT; |