* src/otlayout/otlgpos.c (otl_value_length): Return number of bytes, not number of 16bit entities. (otl_gpos_lookup2_validate): Check class definition tables for format 2. Fix loop for format 2. (otl_liga_mark2_validate): Fix offset for otl_anchor_validate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
diff --git a/ChangeLog b/ChangeLog
index 66f5bc9..bd7fc5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-08-28 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otlgpos.c (otl_value_length): Return number of bytes,
+ not number of 16bit entities.
+ (otl_gpos_lookup2_validate): Check class definition tables for
+ format 2.
+ Fix loop for format 2.
+ (otl_liga_mark2_validate): Fix offset for otl_anchor_validate.
+
2004-08-27 Werner Lemberg <wl@gnu.org>
* src/base/ftmac.c: Don't include truetype/ttobjs.h.
diff --git a/src/otlayout/otlgpos.c b/src/otlayout/otlgpos.c
index 6c26433..2c4ca4d 100644
--- a/src/otlayout/otlgpos.c
+++ b/src/otlayout/otlgpos.c
@@ -42,7 +42,7 @@
count = ( ( count & 0xCC ) >> 2 ) + ( count & 0x33 );
count = ( ( count & 0xF0 ) >> 4 ) + ( count & 0x0F );
- return count;
+ return count * 2;
}
@@ -314,7 +314,7 @@
case 2:
{
OTL_UInt coverage, value1, value2, class1, class2;
- OTL_UInt num_classes1, num_classes2, len_value1, len_value2;
+ OTL_UInt num_classes1, num_classes2, len_value1, len_value2, count;
OTL_CHECK( 14 );
@@ -330,13 +330,15 @@
len_value2 = otl_value_length( value2 );
otl_coverage_validate( table + coverage, valid );
+ otl_class_definition_validate( table + class1, valid );
+ otl_class_definition_validate( table + class2, valid );
OTL_CHECK( num_classes1 * num_classes2 *
( len_value1 + len_value2 ) );
for ( ; num_classes1 > 0; num_classes1-- )
{
- for ( ; num_classes2 > 0; num_classes2-- )
+ for ( count = num_classes2; count > 0; count-- )
{
otl_value_validate( p, table, value1, valid );
p += len_value1;
@@ -522,7 +524,7 @@
if ( !offset && maybe_zero )
continue;
- otl_anchor_validate( table + OTL_NEXT_USHORT( p ), valid );
+ otl_anchor_validate( table + offset, valid );
}
}