diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-07-26 03:03:21 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-07-26 03:03:21 +0000 |
commit | 9efede3457787f587603d76957e91aa989c210a2 (patch) | |
tree | 97d9a9d6d74a829bd88df1ddd3f050bb33fa013f /pango/opentype/ftxopen.c | |
parent | d0563f12a799db1c26d775438146e77ba8343613 (diff) | |
download | pango-9efede3457787f587603d76957e91aa989c210a2.tar.gz |
Add GPOS_LOOKUP_EXTENSION, GSUB_LOOKUP_EXTENSION, which allow lookup
Fri Jul 25 22:59:13 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftx{gpos,gsub}.h pango/opentype/ftxgdef.c:
Add GPOS_LOOKUP_EXTENSION, GSUB_LOOKUP_EXTENSION, which
allow lookup information to be stored at 32-bit offets
via a double indirection. (From FreeType, Werner Lemberg,
2001-08-08)
Diffstat (limited to 'pango/opentype/ftxopen.c')
-rw-r--r-- | pango/opentype/ftxopen.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pango/opentype/ftxopen.c b/pango/opentype/ftxopen.c index ba605bd7..5d9cfad3 100644 --- a/pango/opentype/ftxopen.c +++ b/pango/opentype/ftxopen.c @@ -584,6 +584,8 @@ TTO_SubTable* st; + Bool is_extension = FALSE; + base_offset = FILE_Pos(); @@ -603,6 +605,10 @@ st = l->SubTable; + if ( ( type == GSUB && l->LookupType == GSUB_LOOKUP_EXTENSION ) || + ( type == GPOS && l->LookupType == GPOS_LOOKUP_EXTENSION ) ) + is_extension = TRUE; + for ( n = 0; n < count; n++ ) { if ( ACCESS_Frame( 2L ) ) @@ -613,6 +619,19 @@ FORGET_Frame(); cur_offset = FILE_Pos(); + + if ( is_extension ) + { + if ( FILE_Seek( new_offset ) || ACCESS_Frame( 8L ) ) + goto Fail; + + (void)GET_UShort(); /* format should be 1 */ + l->LookupType = GET_UShort(); + new_offset = GET_ULong() + base_offset; + + FORGET_Frame(); + } + if ( FILE_Seek( new_offset ) || ( error = Load_SubTable( &st[n], stream, type, l->LookupType ) ) != TT_Err_Ok ) |