summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-07-26 03:14:45 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-07-26 03:14:45 +0000
commit11d57ee7c13faabd210507545b6d4d23ae57febc (patch)
tree34211972ee6f4df6a86d37902a358623f40b9c60
parent9efede3457787f587603d76957e91aa989c210a2 (diff)
downloadpango-11d57ee7c13faabd210507545b6d4d23ae57febc.tar.gz
Update of GPOS and GSUB support to OpenType 1.3 (From FreeType, Werner
Fri Jul 25 23:07:06 2003 Owen Taylor <otaylor@redhat.com> Update of GPOS and GSUB support to OpenType 1.3 (From FreeType, Werner Lemberg, 2001-08-08) * pango/opentype/ftxopen.h: Add RIGHT_TO_LEFT LookupFlag * pango/opentype/ftxgpos.c (GPOS_Instance): Add 'first' member to mark the beginning of a chain of cursive connections. * pango/opentype/ftxgpos.c (Do_String_Lookup): If the RIGHT_TO_FLAG flag is set, shift cursive chain up so last glyph is on the baseline.
-rw-r--r--ChangeLog14
-rw-r--r--ChangeLog.pre-1-1014
-rw-r--r--ChangeLog.pre-1-414
-rw-r--r--ChangeLog.pre-1-614
-rw-r--r--ChangeLog.pre-1-814
-rw-r--r--pango/opentype/ftxgpos.c25
-rw-r--r--pango/opentype/ftxopen.h8
7 files changed, 100 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 40049240..462e670e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Fri Jul 25 23:07:06 2003 Owen Taylor <otaylor@redhat.com>
+
+ Update of GPOS and GSUB support to OpenType 1.3
+ (From FreeType, Werner Lemberg, 2001-08-08)
+
+ * pango/opentype/ftxopen.h: Add RIGHT_TO_LEFT LookupFlag
+
+ * pango/opentype/ftxgpos.c (GPOS_Instance): Add 'first'
+ member to mark the beginning of a chain of cursive connections.
+
+ * pango/opentype/ftxgpos.c (Do_String_Lookup): If the
+ RIGHT_TO_FLAG flag is set, shift cursive chain up so
+ last glyph is on the baseline.
+
Fri Jul 25 22:59:13 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftx{gpos,gsub}.h pango/opentype/ftxgdef.c:
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 40049240..462e670e 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,17 @@
+Fri Jul 25 23:07:06 2003 Owen Taylor <otaylor@redhat.com>
+
+ Update of GPOS and GSUB support to OpenType 1.3
+ (From FreeType, Werner Lemberg, 2001-08-08)
+
+ * pango/opentype/ftxopen.h: Add RIGHT_TO_LEFT LookupFlag
+
+ * pango/opentype/ftxgpos.c (GPOS_Instance): Add 'first'
+ member to mark the beginning of a chain of cursive connections.
+
+ * pango/opentype/ftxgpos.c (Do_String_Lookup): If the
+ RIGHT_TO_FLAG flag is set, shift cursive chain up so
+ last glyph is on the baseline.
+
Fri Jul 25 22:59:13 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftx{gpos,gsub}.h pango/opentype/ftxgdef.c:
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index 40049240..462e670e 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,17 @@
+Fri Jul 25 23:07:06 2003 Owen Taylor <otaylor@redhat.com>
+
+ Update of GPOS and GSUB support to OpenType 1.3
+ (From FreeType, Werner Lemberg, 2001-08-08)
+
+ * pango/opentype/ftxopen.h: Add RIGHT_TO_LEFT LookupFlag
+
+ * pango/opentype/ftxgpos.c (GPOS_Instance): Add 'first'
+ member to mark the beginning of a chain of cursive connections.
+
+ * pango/opentype/ftxgpos.c (Do_String_Lookup): If the
+ RIGHT_TO_FLAG flag is set, shift cursive chain up so
+ last glyph is on the baseline.
+
Fri Jul 25 22:59:13 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftx{gpos,gsub}.h pango/opentype/ftxgdef.c:
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 40049240..462e670e 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,17 @@
+Fri Jul 25 23:07:06 2003 Owen Taylor <otaylor@redhat.com>
+
+ Update of GPOS and GSUB support to OpenType 1.3
+ (From FreeType, Werner Lemberg, 2001-08-08)
+
+ * pango/opentype/ftxopen.h: Add RIGHT_TO_LEFT LookupFlag
+
+ * pango/opentype/ftxgpos.c (GPOS_Instance): Add 'first'
+ member to mark the beginning of a chain of cursive connections.
+
+ * pango/opentype/ftxgpos.c (Do_String_Lookup): If the
+ RIGHT_TO_FLAG flag is set, shift cursive chain up so
+ last glyph is on the baseline.
+
Fri Jul 25 22:59:13 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftx{gpos,gsub}.h pango/opentype/ftxgdef.c:
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 40049240..462e670e 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,17 @@
+Fri Jul 25 23:07:06 2003 Owen Taylor <otaylor@redhat.com>
+
+ Update of GPOS and GSUB support to OpenType 1.3
+ (From FreeType, Werner Lemberg, 2001-08-08)
+
+ * pango/opentype/ftxopen.h: Add RIGHT_TO_LEFT LookupFlag
+
+ * pango/opentype/ftxgpos.c (GPOS_Instance): Add 'first'
+ member to mark the beginning of a chain of cursive connections.
+
+ * pango/opentype/ftxgpos.c (Do_String_Lookup): If the
+ RIGHT_TO_FLAG flag is set, shift cursive chain up so
+ last glyph is on the baseline.
+
Fri Jul 25 22:59:13 2003 Owen Taylor <otaylor@redhat.com>
* pango/opentype/ftx{gpos,gsub}.h pango/opentype/ftxgdef.c:
diff --git a/pango/opentype/ftxgpos.c b/pango/opentype/ftxgpos.c
index 8a730ec2..a183a05c 100644
--- a/pango/opentype/ftxgpos.c
+++ b/pango/opentype/ftxgpos.c
@@ -43,6 +43,8 @@
FT_UShort load_flags; /* how the glyph should be loaded */
FT_Bool r2l;
+ FT_UShort first; /* the first glyph in a chain of
+ cursive connections */
FT_UShort last; /* the last valid glyph -- used
with cursive positioning */
FT_Pos anchor_x; /* the coordinates of the anchor point */
@@ -2089,6 +2091,8 @@
gpi->last = 0xFFFF;
else
{
+ if ( gpi->first == 0xFFFF )
+ gpi->first = in->pos;
gpi->last = in->pos;
gpi->anchor_x = exit_x;
gpi->anchor_y = exit_y;
@@ -6120,9 +6124,12 @@
FT_UShort* p_in = in->properties;
int nesting_level = 0;
+ UShort i;
+ TT_Pos offset;
- gpi->last = 0xFFFF; /* no last valid glyph for cursive pos. */
+ gpi->first = 0xFFFF;
+ gpi->last = 0xFFFF; /* no last valid glyph for cursive pos. */
in->pos = 0;
@@ -6153,6 +6160,22 @@
error = TTO_Err_Not_Covered;
}
+ /* test whether we have to adjust the offsets for cursive connections */
+
+ if ( gpi->first != 0xFFFF && gpi->last == 0xFFFF &&
+ gpos->LookupList.Lookup[lookup_index].LookupFlag & RIGHT_TO_LEFT )
+ {
+ offset = out[in->pos].y_pos;
+
+ /* no horizontal offsets (for vertical writing direction)
+ supported yet */
+
+ for ( i = gpi->first; i <= in->pos; i++ )
+ out[i].y_pos -= offset;
+
+ gpi->first = 0xFFFF;
+ }
+
if ( error == TTO_Err_Not_Covered )
(in->pos)++;
else
diff --git a/pango/opentype/ftxopen.h b/pango/opentype/ftxopen.h
index 052f25cc..84c85e76 100644
--- a/pango/opentype/ftxopen.h
+++ b/pango/opentype/ftxopen.h
@@ -155,9 +155,13 @@ extern "C" {
typedef struct TTO_LookupList_ TTO_LookupList;
-/* Possible LookupFlag bit masks. `IGNORE_SPECIAL_MARKS' comes from the
- OpenType 1.2 specification. */
+ /* Possible LookupFlag bit masks. `IGNORE_SPECIAL_MARKS' comes from the
+ OpenType 1.2 specification; RIGHT_TO_LEFT has been (re)introduced in
+ OpenType 1.3 -- if set, the last glyph in a cursive attachment
+ sequence has to be positioned on the baseline -- regardless of the
+ writing direction. */
+#define RIGHT_TO_LEFT 0x0001
#define IGNORE_BASE_GLYPHS 0x0002
#define IGNORE_LIGATURES 0x0004
#define IGNORE_MARKS 0x0008