summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-05-31 07:23:02 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-05-31 07:23:02 +0000
commit60d2705f65297bf95def0a433d6830861e3d5e86 (patch)
treeb291273462a929b0e6c67c687b6cd0d689db0d13
parent3e123fae81c1980cf96543d5b341afc869208143 (diff)
downloadpango-60d2705f65297bf95def0a433d6830861e3d5e86.tar.gz
Bug 336153 – Mark to mark positioning (Lookup Type 6) isn't correct when
2006-05-31 Behdad Esfahbod <behdad@gnome.org> Bug 336153 – Mark to mark positioning (Lookup Type 6) isn't correct when using MarkAttchmentType Patch from Tin Myo Htet. * pango/opentype/harfbuzz-gpos.c (Lookup_MarkMarkPos): Ignore marks of non-matchin attachment type.
-rw-r--r--ChangeLog9
-rw-r--r--pango/opentype/harfbuzz-gpos.c37
2 files changed, 31 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 8fde0b04..f95373ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2006-05-31 Behdad Esfahbod <behdad@gnome.org>
+ Bug 336153 – Mark to mark positioning (Lookup Type 6) isn't correct
+ when using MarkAttchmentType
+ Patch from Tin Myo Htet.
+
+ * pango/opentype/harfbuzz-gpos.c (Lookup_MarkMarkPos): Ignore marks
+ of non-matchin attachment type.
+
+2006-05-31 Behdad Esfahbod <behdad@gnome.org>
+
* pango/pangocairo-font.c (_pango_cairo_font_get_hex_box_info): Set
absolute_size, since we are using describe_with_absolute_size now...
diff --git a/pango/opentype/harfbuzz-gpos.c b/pango/opentype/harfbuzz-gpos.c
index a8e158ab..3461279f 100644
--- a/pango/opentype/harfbuzz-gpos.c
+++ b/pango/opentype/harfbuzz-gpos.c
@@ -3006,7 +3006,7 @@ static FT_Error Lookup_MarkMarkPos( GPOS_Instance* gpi,
FT_UShort context_length,
int nesting_level )
{
- FT_UShort j, mark1_index, mark2_index, property, class;
+ FT_UShort i, j, mark1_index, mark2_index, property, class;
FT_Pos x_mark1_value, y_mark1_value,
x_mark2_value, y_mark2_value;
FT_Error error;
@@ -3038,27 +3038,34 @@ static FT_Error Lookup_MarkMarkPos( GPOS_Instance* gpi,
if ( error )
return error;
- /* now we check the preceding glyph whether it is a suitable
- mark glyph */
+ /* now we search backwards for a suitable mark glyph until a non-mark
+ glyph */
if ( buffer->in_pos == 0 )
return HB_Err_Not_Covered;
+ i = 1;
j = buffer->in_pos - 1;
- error = HB_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ),
- &property );
- if ( error )
- return error;
-
- if ( flags & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS )
- {
- if ( property != (flags & 0xFF00) )
- return HB_Err_Not_Covered;
- }
- else
+ while ( i <= buffer->in_pos )
{
- if ( property != HB_GDEF_MARK )
+ error = HB_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ),
+ &property );
+ if ( error )
+ return error;
+
+ if ( !( property == HB_GDEF_MARK || property & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS ) )
return HB_Err_Not_Covered;
+
+ if ( flags & HB_LOOKUP_FLAG_IGNORE_SPECIAL_MARKS )
+ {
+ if ( property == (flags & 0xFF00) )
+ break;
+ }
+ else
+ break;
+
+ i++;
+ j--;
}
error = _HB_OPEN_Coverage_Index( &mmp->Mark2Coverage, IN_GLYPH( j ),