summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-07-26 13:50:30 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-07-26 13:50:30 +0000
commitd5b6c7e7577038c865a9bfd92f6ea42670dfe947 (patch)
tree22c0db3b54b03948f900b2d96c2c730951e6128a
parent2376244be34d16225c1630b6febdb8635c23a604 (diff)
downloadpango-d5b6c7e7577038c865a9bfd92f6ea42670dfe947.tar.gz
If applying a ligature lookup makes adjacent two glyphs that were not
Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com> * pango/opentype/ftxgsub.c (Lookup_LigatureSubst): If applying a ligature lookup makes adjacent two glyphs that were not originally adjacent, avoid making subsequent ligatures between those glyphs. (From FreeType, Werner Lemberg, 2001-08-22, 2001-08-23)
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-1-1010
-rw-r--r--ChangeLog.pre-1-410
-rw-r--r--ChangeLog.pre-1-610
-rw-r--r--ChangeLog.pre-1-810
-rw-r--r--pango/opentype/ftxgsub.c31
6 files changed, 73 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 0fc1bedd..b65346ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,17 @@
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ If applying a ligature lookup makes adjacent two glyphs
+ that were not originally adjacent, avoid making
+ subsequent ligatures between those glyphs.
+ (From FreeType, Werner Lemberg, 2001-08-22, 2001-08-23)
+
Sat Jul 26 09:16:57 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgpos.c pango/opentype/ftxopen.c:
Fix some FreeType1 variable declarations that snuck
in from the last commits (Christophe Fergeau,
- 118363)
+ #118363)
Fri Jul 25 23:38:07 2003 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 0fc1bedd..b65346ad 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,9 +1,17 @@
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ If applying a ligature lookup makes adjacent two glyphs
+ that were not originally adjacent, avoid making
+ subsequent ligatures between those glyphs.
+ (From FreeType, Werner Lemberg, 2001-08-22, 2001-08-23)
+
Sat Jul 26 09:16:57 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgpos.c pango/opentype/ftxopen.c:
Fix some FreeType1 variable declarations that snuck
in from the last commits (Christophe Fergeau,
- 118363)
+ #118363)
Fri Jul 25 23:38:07 2003 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 0fc1bedd..b65346ad 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,9 +1,17 @@
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ If applying a ligature lookup makes adjacent two glyphs
+ that were not originally adjacent, avoid making
+ subsequent ligatures between those glyphs.
+ (From FreeType, Werner Lemberg, 2001-08-22, 2001-08-23)
+
Sat Jul 26 09:16:57 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgpos.c pango/opentype/ftxopen.c:
Fix some FreeType1 variable declarations that snuck
in from the last commits (Christophe Fergeau,
- 118363)
+ #118363)
Fri Jul 25 23:38:07 2003 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 0fc1bedd..b65346ad 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,9 +1,17 @@
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ If applying a ligature lookup makes adjacent two glyphs
+ that were not originally adjacent, avoid making
+ subsequent ligatures between those glyphs.
+ (From FreeType, Werner Lemberg, 2001-08-22, 2001-08-23)
+
Sat Jul 26 09:16:57 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgpos.c pango/opentype/ftxopen.c:
Fix some FreeType1 variable declarations that snuck
in from the last commits (Christophe Fergeau,
- 118363)
+ #118363)
Fri Jul 25 23:38:07 2003 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 0fc1bedd..b65346ad 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,9 +1,17 @@
+Sat Jul 26 09:41:22 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/opentype/ftxgsub.c (Lookup_LigatureSubst):
+ If applying a ligature lookup makes adjacent two glyphs
+ that were not originally adjacent, avoid making
+ subsequent ligatures between those glyphs.
+ (From FreeType, Werner Lemberg, 2001-08-22, 2001-08-23)
+
Sat Jul 26 09:16:57 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftxgpos.c pango/opentype/ftxopen.c:
Fix some FreeType1 variable declarations that snuck
in from the last commits (Christophe Fergeau,
- 118363)
+ #118363)
Fri Jul 25 23:38:07 2003 Owen Taylor <otaylor@redhat.com>
diff --git a/pango/opentype/ftxgsub.c b/pango/opentype/ftxgsub.c
index f56ae6f1..5ab95588 100644
--- a/pango/opentype/ftxgsub.c
+++ b/pango/opentype/ftxgsub.c
@@ -1194,7 +1194,8 @@
FT_UShort index, property;
FT_Error error;
FT_UShort numlig, i, j, is_mark, first_is_mark = FALSE;
- FT_UShort* s_in;
+ FT_UShort first_ligID, first_comp;
+ FT_UShort *s_in, *lig_in, *comp_in;
FT_UShort* c;
TTO_Ligature* lig;
@@ -1222,8 +1223,12 @@
if ( in->pos + lig->ComponentCount > in->length )
continue; /* Not enough glyphs in input */
- s_in = &in->string[in->pos];
- c = lig->Component;
+ 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;
is_mark = first_is_mark;
@@ -1243,6 +1248,26 @@
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;