diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-04-03 22:45:29 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-04-03 22:45:29 +0000 |
commit | 25c1754de6393953940dbf1f165aa5ece3b62abb (patch) | |
tree | d4d3597c175edbb83d824908b6c696751ab1e887 /pango | |
parent | 64b08e2982bd6efb6b7f277da761efb7e600c269 (diff) | |
download | pango-25c1754de6393953940dbf1f165aa5ece3b62abb.tar.gz |
Copy fixes from harfbuzz stable branch. Includes a leak fix, a kerning
2007-04-03 Behdad Esfahbod <behdad@gnome.org>
* pango/opentype/harfbuzz-gdef.c (_HB_GDEF_Check_Property):
* pango/opentype/harfbuzz-gpos.c (HB_Done_GPOS_Table),
(Lookup_PairPos):
* pango/opentype/harfbuzz-open.c (Get_Class1):
Copy fixes from harfbuzz stable branch. Includes a leak fix,
a kerning fix, and an array out-of-bound access fix.
svn path=/trunk/; revision=2221
Diffstat (limited to 'pango')
-rw-r--r-- | pango/opentype/harfbuzz-gdef.c | 2 | ||||
-rw-r--r-- | pango/opentype/harfbuzz-gpos.c | 8 | ||||
-rw-r--r-- | pango/opentype/harfbuzz-open.c | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/pango/opentype/harfbuzz-gdef.c b/pango/opentype/harfbuzz-gdef.c index 5a649deb..7a30d8bd 100644 --- a/pango/opentype/harfbuzz-gdef.c +++ b/pango/opentype/harfbuzz-gdef.c @@ -1217,6 +1217,8 @@ FT_Error _HB_GDEF_Check_Property( HB_GDEFHeader* gdef, *property != desired_attachment_class ) return HB_Err_Not_Covered; } + } else { + *property = 0; } return FT_Err_Ok; diff --git a/pango/opentype/harfbuzz-gpos.c b/pango/opentype/harfbuzz-gpos.c index 3461279f..513f3fb5 100644 --- a/pango/opentype/harfbuzz-gpos.c +++ b/pango/opentype/harfbuzz-gpos.c @@ -193,6 +193,8 @@ FT_Error HB_Done_GPOS_Table( HB_GPOSHeader* gpos ) _HB_OPEN_Free_FeatureList( &gpos->FeatureList, memory ); _HB_OPEN_Free_ScriptList( &gpos->ScriptList, memory ); + FREE( gpos ); + return FT_Err_Ok; } @@ -1650,6 +1652,12 @@ static FT_Error Lookup_PairPos( GPOS_Instance* gpi, return HB_Err_Invalid_GPOS_SubTable_Format; } + /* if we don't have coverage for the second glyph don't skip it for + further lookups but reset in_pos back to the first_glyph and let + the caller in Do_String_Lookup increment in_pos */ + if ( error == HB_Err_Not_Covered ) + buffer->in_pos = first_pos; + /* adjusting the `next' glyph */ if ( pp->ValueFormat2 ) diff --git a/pango/opentype/harfbuzz-open.c b/pango/opentype/harfbuzz-open.c index e836df1e..fa540401 100644 --- a/pango/opentype/harfbuzz-open.c +++ b/pango/opentype/harfbuzz-open.c @@ -1191,7 +1191,7 @@ static FT_Error Get_Class1( HB_ClassDefFormat1* cdf1, *index = 0; if ( glyphID >= cdf1->StartGlyph && - glyphID <= cdf1->StartGlyph + cdf1->GlyphCount ) + glyphID < cdf1->StartGlyph + cdf1->GlyphCount ) { *class = cva[glyphID - cdf1->StartGlyph]; return FT_Err_Ok; |