diff options
author | Werner Lemberg <wl@gnu.org> | 2017-09-24 09:06:01 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2017-09-24 09:15:11 +0200 |
commit | 6d403d089d438f3a3f9a13c47e2c93528819f265 (patch) | |
tree | 468cf8b60818133b6b2164782be857b22bea9b64 /src/otvalid | |
parent | 0da0faf0fb14eda88cd0a14e41c6727f32e89ce9 (diff) | |
download | freetype2-6d403d089d438f3a3f9a13c47e2c93528819f265.tar.gz |
Fix handling of ValueRecords.
For GPOS pair positioning format 1 the description of ValueRecords
in the OpenType specification (1.8.2, from today) is wrong – the
offset has to be taken from the parent structure; in this case the
`PairSet' table.
* src/otvalid/otvgpos.c (otv_PairSet_validate): Set `extra3'.
(otv_PairPos_validate): Adjust.
Diffstat (limited to 'src/otvalid')
-rw-r--r-- | src/otvalid/otvgpos.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/otvalid/otvgpos.c b/src/otvalid/otvgpos.c index 8aede407d..f185b4a0b 100644 --- a/src/otvalid/otvgpos.c +++ b/src/otvalid/otvgpos.c @@ -218,10 +218,6 @@ OTV_LIMIT_CHECK( 2 ); OTV_OPTIONAL_OFFSET( device ); - /* XXX: this value is usually too small, especially if the current */ - /* ValueRecord is part of an array -- getting the correct table */ - /* size is probably not worth the trouble */ - table_size = p - otvalid->extra3; OTV_SIZE_CHECK( device ); @@ -426,6 +422,8 @@ /*************************************************************************/ /*************************************************************************/ + /* sets otvalid->extra3 (pointer to base table) */ + static void otv_PairSet_validate( FT_Bytes table, FT_UInt format1, @@ -438,6 +436,8 @@ OTV_NAME_ENTER( "PairSet" ); + otvalid->extra3 = table; + OTV_LIMIT_CHECK( 2 ); PairValueCount = FT_NEXT_USHORT( p ); @@ -483,8 +483,6 @@ OTV_TRACE(( " (format %d)\n", PosFormat )); - otvalid->extra3 = table; - switch ( PosFormat ) { case 1: /* PairPosFormat1 */ @@ -539,6 +537,8 @@ OTV_LIMIT_CHECK( ClassCount1 * ClassCount2 * ( len_value1 + len_value2 ) ); + otvalid->extra3 = table; + /* Class1Record */ for ( ; ClassCount1 > 0; ClassCount1-- ) { |