summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-07-29 14:21:30 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-07-29 14:21:30 +0000
commit67ea594c165e95fabc18e14ec0bd76f02f8ad8c4 (patch)
tree9a6cdfd1044288cf60273990121d17246ca867ea
parentaea8c3f8d33fa11404518b91b7824da3fc615e2d (diff)
downloadpango-67ea594c165e95fabc18e14ec0bd76f02f8ad8c4.tar.gz
Rewrite handling of IGNORE_SPECIAL_MARKS to be properly "ignore marks of
Tue Jul 29 09:58:13 2003 Owen Taylor <otaylor@redhat.com> * pango/opentype/ftxgdef.c (Check_Property): Rewrite handling of IGNORE_SPECIAL_MARKS to be properly "ignore marks of attachment type different than specified. (#118456, Kailash C. Chowksey) Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com> * pango/opentype/ftxgsub.c (Lookup_LigatureSubst): Revert back out the FreeType patch preventing ligatures of not-originally adjacent glyphs; it doesn't work for all scripts. (#118472, Kailash C. Chowksey)
-rw-r--r--ChangeLog17
-rw-r--r--ChangeLog.pre-1-1017
-rw-r--r--ChangeLog.pre-1-417
-rw-r--r--ChangeLog.pre-1-617
-rw-r--r--ChangeLog.pre-1-817
-rw-r--r--pango/opentype/ftxgdef.c37
-rw-r--r--pango/opentype/ftxgsub.c31
7 files changed, 111 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index 59c50341..f395385c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Tue Jul 29 09:58:13 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c (Check_Property): Rewrite
+ handling of IGNORE_SPECIAL_MARKS to be properly
+ "ignore marks of attachment type different than
+ specified. (#118456, Kailash C. Chowksey)
+
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ Revert back out the FreeType patch preventing
+ ligatures of not-originally adjacent glyphs;
+ it doesn't work for all scripts. (#118472,
+ Kailash C. Chowksey)
+
2003-07-28 Tor Lillqvist <tml@iki.fi>
* pango/pangowin32-private.h
@@ -8,7 +23,7 @@ Sat Jul 26 22:30:59 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgsub.c (Lookup_ChainContextSubst{1,2,3}):
Check for lookahead glyphs in the right place. (Patch
- from #116860)
+ from Kailash C. Chowksey, #116860)
* pango/opentype/ftxgpos.c (Lookup_ChainContextPos{1,2,3}):
Same fix here.
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 59c50341..f395385c 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,18 @@
+Tue Jul 29 09:58:13 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c (Check_Property): Rewrite
+ handling of IGNORE_SPECIAL_MARKS to be properly
+ "ignore marks of attachment type different than
+ specified. (#118456, Kailash C. Chowksey)
+
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ Revert back out the FreeType patch preventing
+ ligatures of not-originally adjacent glyphs;
+ it doesn't work for all scripts. (#118472,
+ Kailash C. Chowksey)
+
2003-07-28 Tor Lillqvist <tml@iki.fi>
* pango/pangowin32-private.h
@@ -8,7 +23,7 @@ Sat Jul 26 22:30:59 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgsub.c (Lookup_ChainContextSubst{1,2,3}):
Check for lookahead glyphs in the right place. (Patch
- from #116860)
+ from Kailash C. Chowksey, #116860)
* pango/opentype/ftxgpos.c (Lookup_ChainContextPos{1,2,3}):
Same fix here.
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 59c50341..f395385c 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,18 @@
+Tue Jul 29 09:58:13 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c (Check_Property): Rewrite
+ handling of IGNORE_SPECIAL_MARKS to be properly
+ "ignore marks of attachment type different than
+ specified. (#118456, Kailash C. Chowksey)
+
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ Revert back out the FreeType patch preventing
+ ligatures of not-originally adjacent glyphs;
+ it doesn't work for all scripts. (#118472,
+ Kailash C. Chowksey)
+
2003-07-28 Tor Lillqvist <tml@iki.fi>
* pango/pangowin32-private.h
@@ -8,7 +23,7 @@ Sat Jul 26 22:30:59 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgsub.c (Lookup_ChainContextSubst{1,2,3}):
Check for lookahead glyphs in the right place. (Patch
- from #116860)
+ from Kailash C. Chowksey, #116860)
* pango/opentype/ftxgpos.c (Lookup_ChainContextPos{1,2,3}):
Same fix here.
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 59c50341..f395385c 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,18 @@
+Tue Jul 29 09:58:13 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c (Check_Property): Rewrite
+ handling of IGNORE_SPECIAL_MARKS to be properly
+ "ignore marks of attachment type different than
+ specified. (#118456, Kailash C. Chowksey)
+
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ Revert back out the FreeType patch preventing
+ ligatures of not-originally adjacent glyphs;
+ it doesn't work for all scripts. (#118472,
+ Kailash C. Chowksey)
+
2003-07-28 Tor Lillqvist <tml@iki.fi>
* pango/pangowin32-private.h
@@ -8,7 +23,7 @@ Sat Jul 26 22:30:59 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgsub.c (Lookup_ChainContextSubst{1,2,3}):
Check for lookahead glyphs in the right place. (Patch
- from #116860)
+ from Kailash C. Chowksey, #116860)
* pango/opentype/ftxgpos.c (Lookup_ChainContextPos{1,2,3}):
Same fix here.
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 59c50341..f395385c 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,18 @@
+Tue Jul 29 09:58:13 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgdef.c (Check_Property): Rewrite
+ handling of IGNORE_SPECIAL_MARKS to be properly
+ "ignore marks of attachment type different than
+ specified. (#118456, Kailash C. Chowksey)
+
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ Revert back out the FreeType patch preventing
+ ligatures of not-originally adjacent glyphs;
+ it doesn't work for all scripts. (#118472,
+ Kailash C. Chowksey)
+
2003-07-28 Tor Lillqvist <tml@iki.fi>
* pango/pangowin32-private.h
@@ -8,7 +23,7 @@ Sat Jul 26 22:30:59 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgsub.c (Lookup_ChainContextSubst{1,2,3}):
Check for lookahead glyphs in the right place. (Patch
- from #116860)
+ from Kailash C. Chowksey, #116860)
* pango/opentype/ftxgpos.c (Lookup_ChainContextPos{1,2,3}):
Same fix here.
diff --git a/pango/opentype/ftxgdef.c b/pango/opentype/ftxgdef.c
index e7e02f13..c1d5b797 100644
--- a/pango/opentype/ftxgdef.c
+++ b/pango/opentype/ftxgdef.c
@@ -1166,20 +1166,39 @@
if ( gdef )
{
+ FT_UShort basic_glyph_class;
+ FT_UShort desired_attachment_class;
+
error = TT_GDEF_Get_Glyph_Property( gdef, index, property );
if ( error )
return error;
- if ( flags & IGNORE_SPECIAL_MARKS )
+ /* If the glyph was found in the MarkAttachmentClass table,
+ * then that class value is the high byte of the result,
+ * otherwise the low byte contains the basic type of the glyph
+ * as defined by the GlyphClassDef table.
+ */
+ if ( *property & IGNORE_SPECIAL_MARKS )
+ basic_glyph_class = TTO_MARK;
+ else
+ basic_glyph_class = *property;
+
+ /* Return Not_Covered, if, for example, basic_glyph_class
+ * is TTO_LIGATURE and LookFlags includes IGNORE_LIGATURES
+ */
+ if ( flags & basic_glyph_class )
+ return TTO_Err_Not_Covered;
+
+ /* The high byte of LookupFlags has the meaning
+ * "ignore marks of attachment type different than
+ * the attachment type specified."
+ */
+ desired_attachment_class = flags & IGNORE_SPECIAL_MARKS;
+ if ( desired_attachment_class )
{
- /* This is OpenType 1.2 */
-
- if ( (flags & 0xFF00) != *property )
- return TTO_Err_Not_Covered;
- }
- else {
- if ( flags & *property )
- return TTO_Err_Not_Covered;
+ if ( basic_glyph_class == TTO_MARK &&
+ *property != desired_attachment_class )
+ return TTO_Err_Not_Covered;
}
}
diff --git a/pango/opentype/ftxgsub.c b/pango/opentype/ftxgsub.c
index e473ca95..d5850f31 100644
--- a/pango/opentype/ftxgsub.c
+++ b/pango/opentype/ftxgsub.c
@@ -1194,8 +1194,7 @@
FT_UShort index, property;
FT_Error error;
FT_UShort numlig, i, j, is_mark, first_is_mark = FALSE;
- FT_UShort first_ligID, first_comp;
- FT_UShort *s_in, *lig_in, *comp_in;
+ FT_UShort* s_in;
FT_UShort* c;
TTO_Ligature* lig;
@@ -1223,12 +1222,8 @@
if ( in->pos + lig->ComponentCount > in->length )
continue; /* Not enough glyphs in input */
- s_in = &in->string[in->pos];
- lig_in = &in->ligIDs[in->pos];
- comp_in = &in->components[in->pos];
- first_ligID = *lig_in;
- first_comp = *comp_in;
- c = lig->Component;
+ s_in = &in->string[in->pos];
+ c = lig->Component;
is_mark = first_is_mark;
@@ -1248,26 +1243,6 @@
break;
}
- /* don't apply a ligature lookup to glyphs with different
- ligature IDs. Example:
-
- '
- ^' ' ^
- f ^ l ' -> fl ^ ' -> fl but not fl ^ -> fl */
-
- if ( first_ligID != lig_in[j] )
- break;
-
- /* don't apply a ligature lookup to glyphs with different
- component values. Example:
-
- '
- ^' ' ^
- f ^ f ' l -> ffl ^ ' -> ffl but not ffl ^ -> ffl */
-
- if ( first_comp != comp_in[j] )
- break;
-
if ( !( property == TTO_MARK || property & IGNORE_SPECIAL_MARKS ) )
is_mark = FALSE;