diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2005-11-17 06:28:54 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2005-11-17 06:28:54 +0000 |
commit | 6892423f42acfad94eefa4519f3a470c1cf9c461 (patch) | |
tree | 08165f9bf0a9267c2c16d8e8af793f31095917a3 | |
parent | e02efc9b767b6c8648b2b27555dca44e9d6cbf80 (diff) | |
download | pango-6892423f42acfad94eefa4519f3a470c1cf9c461.tar.gz |
Part of #101079:
2005-11-17 Behdad Esfahbod <behdad@gnome.org>
Part of #101079:
* pango/opentype/ftxopen.c (Load_Lookup): In extension subtables,
offset is relative to the extension subtable, not the original
table. (Greg Aumann)
* pango/opentype/ftxgpos.c (Load_BaseArray): When reading BaseAnchor,
skip offsets that are zero. Works around bug in Doulos SIL Regular.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | pango/opentype/ftxgpos.c | 6 | ||||
-rw-r--r-- | pango/opentype/ftxopen.c | 6 |
3 files changed, 21 insertions, 2 deletions
@@ -1,3 +1,14 @@ +2005-11-17 Behdad Esfahbod <behdad@gnome.org> + + Part of #101079: + + * pango/opentype/ftxopen.c (Load_Lookup): In extension subtables, + offset is relative to the extension subtable, not the original + table. (Greg Aumann) + + * pango/opentype/ftxgpos.c (Load_BaseArray): When reading BaseAnchor, + skip offsets that are zero. Works around bug in Doulos SIL Regular. + 2005-11-16 Behdad Esfahbod <behdad@gnome.org> * docs/pango_markup.sgml docs/tmpl/coverage-maps.sgml diff --git a/pango/opentype/ftxgpos.c b/pango/opentype/ftxgpos.c index a3d163ea..6359323e 100644 --- a/pango/opentype/ftxgpos.c +++ b/pango/opentype/ftxgpos.c @@ -2065,6 +2065,12 @@ FORGET_Frame(); + if (new_offset == base_offset) { + /* Doulos SIL Regular is buggy and has zer offsets here. Skip */ + ban[n].PosFormat = 0; + continue; + } + cur_offset = FILE_Pos(); if ( FILE_Seek( new_offset ) || ( error = Load_Anchor( &ban[n], stream ) ) != TT_Err_Ok ) diff --git a/pango/opentype/ftxopen.c b/pango/opentype/ftxopen.c index 75f66be5..c2f04850 100644 --- a/pango/opentype/ftxopen.c +++ b/pango/opentype/ftxopen.c @@ -631,9 +631,11 @@ if ( FILE_Seek( new_offset ) || ACCESS_Frame( 8L ) ) goto Fail; - (void)GET_UShort(); /* format should be 1 */ + if (GET_UShort() != 1) /* format should be 1 */ + goto Fail; + l->LookupType = GET_UShort(); - new_offset = GET_ULong() + base_offset; + new_offset += GET_ULong(); FORGET_Frame(); } |