summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-05-31 07:26:19 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-05-31 07:26:19 +0000
commit609b20078ee911d6cedc02009fc4703a6ee19a60 (patch)
tree70012953fb21a9fd40d9cf897ff426c6579d3c24
parent1668f1ca023fd0b227185b67a15fb0f639b4060e (diff)
downloadpango-609b20078ee911d6cedc02009fc4703a6ee19a60.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/ftxgpos.c (Lookup_MarkMarkPos): Ignore marks of non-matchin attachment type.
-rw-r--r--ChangeLog9
-rw-r--r--pango/opentype/ftxgpos.c38
2 files changed, 33 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e45270c..40568a90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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/ftxgpos.c (Lookup_MarkMarkPos): Ignore marks
+ of non-matchin attachment type.
+
2006-05-30 Behdad Esfahbod <behdad@gnome.org>
Bug 125378 – Better underline thickness handling
diff --git a/pango/opentype/ftxgpos.c b/pango/opentype/ftxgpos.c
index a7b933ba..0970a505 100644
--- a/pango/opentype/ftxgpos.c
+++ b/pango/opentype/ftxgpos.c
@@ -3001,7 +3001,7 @@
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;
@@ -3032,27 +3032,37 @@
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 TTO_Err_Not_Covered;
+ i = 1;
j = buffer->in_pos - 1;
- error = TT_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ),
- &property );
- if ( error )
- return error;
- if ( flags & IGNORE_SPECIAL_MARKS )
- {
- if ( property != (flags & 0xFF00) )
- return TTO_Err_Not_Covered;
- }
- else
+ while ( i <= buffer->in_pos )
{
- if ( property != TTO_MARK )
+ error = TT_GDEF_Get_Glyph_Property( gpos->gdef, IN_GLYPH( j ),
+ &property );
+ if ( error )
+ return error;
+
+ if ( !( property == TTO_MARK || property & IGNORE_SPECIAL_MARKS ) )
return TTO_Err_Not_Covered;
+ else
+ {
+ if ( flags & IGNORE_SPECIAL_MARKS )
+ {
+ if ( property == (flags & 0xFF00) )
+ break;
+ }
+ else
+ break;
+ }
+
+ i++;
+ j--;
}
error = Coverage_Index( &mmp->Mark2Coverage, IN_GLYPH( j ),