summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--ChangeLog.pre-1-1012
-rw-r--r--ChangeLog.pre-1-612
-rw-r--r--ChangeLog.pre-1-812
-rw-r--r--pango/opentype/ftxgdef.c16
-rw-r--r--pango/opentype/ftxgpos.c52
-rw-r--r--pango/opentype/ftxgsub.c54
-rw-r--r--pango/opentype/ftxopenf.h2
-rw-r--r--pango/opentype/otlbuffer.c21
-rw-r--r--pango/opentype/otlbuffer.h6
10 files changed, 139 insertions, 60 deletions
diff --git a/ChangeLog b/ChangeLog
index 29dbdb19..293df95b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Mon Jul 26 14:49:22 2004 Owen Taylor <otaylor@redhat.com>
+
+ * ftxgdef.[ch] otlbuffer.[ch]: Make Check_Property() take a
+ OTL_GlyphItem, add a gproperties field to OTLGlyphItem,
+ and use that to cache the properties for a glyph.
+
+ * ftxgsub.c ftxgdef.c: Adapt to Check_Property() changes.
+
+ * otlbuffer.[ch] ftxgsub.c: Add otl_buffer_copy_output_glyph()
+ to use when we are copying an unmodified glyph from input
+ to output that preserves the cached properties.
+
2004-07-23 Morten Welinder <terra@gnome.org>
* examples/renderdemo.c (parse_ellipsis): Fix C99ism. I am clearly
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index 29dbdb19..293df95b 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,15 @@
+Mon Jul 26 14:49:22 2004 Owen Taylor <otaylor@redhat.com>
+
+ * ftxgdef.[ch] otlbuffer.[ch]: Make Check_Property() take a
+ OTL_GlyphItem, add a gproperties field to OTLGlyphItem,
+ and use that to cache the properties for a glyph.
+
+ * ftxgsub.c ftxgdef.c: Adapt to Check_Property() changes.
+
+ * otlbuffer.[ch] ftxgsub.c: Add otl_buffer_copy_output_glyph()
+ to use when we are copying an unmodified glyph from input
+ to output that preserves the cached properties.
+
2004-07-23 Morten Welinder <terra@gnome.org>
* examples/renderdemo.c (parse_ellipsis): Fix C99ism. I am clearly
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index 29dbdb19..293df95b 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,15 @@
+Mon Jul 26 14:49:22 2004 Owen Taylor <otaylor@redhat.com>
+
+ * ftxgdef.[ch] otlbuffer.[ch]: Make Check_Property() take a
+ OTL_GlyphItem, add a gproperties field to OTLGlyphItem,
+ and use that to cache the properties for a glyph.
+
+ * ftxgsub.c ftxgdef.c: Adapt to Check_Property() changes.
+
+ * otlbuffer.[ch] ftxgsub.c: Add otl_buffer_copy_output_glyph()
+ to use when we are copying an unmodified glyph from input
+ to output that preserves the cached properties.
+
2004-07-23 Morten Welinder <terra@gnome.org>
* examples/renderdemo.c (parse_ellipsis): Fix C99ism. I am clearly
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index 29dbdb19..293df95b 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,15 @@
+Mon Jul 26 14:49:22 2004 Owen Taylor <otaylor@redhat.com>
+
+ * ftxgdef.[ch] otlbuffer.[ch]: Make Check_Property() take a
+ OTL_GlyphItem, add a gproperties field to OTLGlyphItem,
+ and use that to cache the properties for a glyph.
+
+ * ftxgsub.c ftxgdef.c: Adapt to Check_Property() changes.
+
+ * otlbuffer.[ch] ftxgsub.c: Add otl_buffer_copy_output_glyph()
+ to use when we are copying an unmodified glyph from input
+ to output that preserves the cached properties.
+
2004-07-23 Morten Welinder <terra@gnome.org>
* examples/renderdemo.c (parse_ellipsis): Fix C99ism. I am clearly
diff --git a/pango/opentype/ftxgdef.c b/pango/opentype/ftxgdef.c
index 9077490b..a31bcc84 100644
--- a/pango/opentype/ftxgdef.c
+++ b/pango/opentype/ftxgdef.c
@@ -1161,21 +1161,25 @@
FT_Error Check_Property( TTO_GDEFHeader* gdef,
- FT_UShort index,
+ OTL_GlyphItem gitem,
FT_UShort flags,
FT_UShort* property )
{
FT_Error error;
-
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 ( gitem->gproperties == OTL_GLYPH_PROPERTIES_UNKNOWN )
+ {
+ error = TT_GDEF_Get_Glyph_Property( gdef, gitem->gindex, &gitem->gproperties );
+ if ( error )
+ return error;
+ }
+
+ *property = gitem->gproperties;
/* If the glyph was found in the MarkAttachmentClass table,
* then that class value is the high byte of the result,
diff --git a/pango/opentype/ftxgpos.c b/pango/opentype/ftxgpos.c
index 27c38a33..72dc60d7 100644
--- a/pango/opentype/ftxgpos.c
+++ b/pango/opentype/ftxgpos.c
@@ -59,7 +59,9 @@
#define IN_GLYPH( pos ) (buffer->in_string[(pos)].gindex)
+#define IN_ITEM( pos ) (&buffer->in_string[(pos)])
#define IN_CURGLYPH( pos ) (buffer->in_string[(pos) + buffer->in_pos].gindex)
+#define IN_CURITEM( pos ) (&buffer->in_string[(pos) + buffer->in_pos])
#define IN_PROPERTIES( pos ) (buffer->in_string[(pos)].properties)
#define IN_LIGID( pos ) (buffer->in_string[(pos)].ligID)
#define IN_COMPONENT( pos ) (buffer->in_string[(pos)].component)
@@ -1045,7 +1047,7 @@
if ( context_length != 0xFFFF && context_length < 1 )
return TTO_Err_Not_Covered;
- if ( CHECK_Property( gpos->gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &sp->Coverage, IN_CURGLYPH( 0 ), &index );
@@ -1607,7 +1609,7 @@
if ( context_length != 0xFFFF && context_length < 2 )
return TTO_Err_Not_Covered;
- if ( CHECK_Property( gpos->gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &pp->Coverage, IN_CURGLYPH( 0 ), &index );
@@ -1619,7 +1621,7 @@
first_pos = buffer->in_pos;
(buffer->in_pos)++;
- while ( CHECK_Property( gpos->gdef, IN_CURGLYPH( 0 ),
+ while ( CHECK_Property( gpos->gdef, IN_CURITEM( 0 ),
flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
@@ -1820,7 +1822,7 @@
/* Glyphs not having the right GDEF properties will be ignored, i.e.,
gpi->last won't be reset (contrary to user defined properties). */
- if ( CHECK_Property( gpos->gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
/* We don't handle mark glyphs here. According to Andrei, this isn't
@@ -2247,7 +2249,7 @@
if ( flags & IGNORE_BASE_GLYPHS )
return TTO_Err_Not_Covered;
- if ( CHECK_Property( gpos->gdef, IN_CURGLYPH( 0 ),
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM( 0 ),
flags, &property ) )
return error;
@@ -2659,7 +2661,7 @@
mark_glyph = IN_CURGLYPH( 0 );
- if ( CHECK_Property( gpos->gdef, mark_glyph, flags, &property ) )
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &mlp->MarkCoverage, mark_glyph, &mark_index );
@@ -2994,7 +2996,7 @@
if ( flags & IGNORE_MARKS )
return TTO_Err_Not_Covered;
- if ( CHECK_Property( gpos->gdef, IN_CURGLYPH( 0 ),
+ if ( CHECK_Property( gpos->gdef, IN_CURITEM( 0 ),
flags, &property ) )
return error;
@@ -3850,7 +3852,7 @@
gdef = gpos->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &cpf1->Coverage, IN_CURGLYPH( 0 ), &index );
@@ -3870,7 +3872,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < pr[k].GlyphCount; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -3920,7 +3922,7 @@
gdef = gpos->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
/* Note: The coverage table in format 2 doesn't give an index into
@@ -3963,7 +3965,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < pr->GlyphCount; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
goto End;
@@ -4022,7 +4024,7 @@
gdef = gpos->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
if ( context_length != 0xFFFF && context_length < cpf3->GlyphCount )
@@ -4035,7 +4037,7 @@
for ( i = 1, j = 1; i < cpf3->GlyphCount; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -5122,7 +5124,7 @@
gdef = gpos->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &ccpf1->Coverage, IN_CURGLYPH( 0 ), &index );
@@ -5154,7 +5156,7 @@
for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -5183,7 +5185,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -5202,7 +5204,7 @@
for ( i = 0; i < lgc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -5263,7 +5265,7 @@
gdef = gpos->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
/* Note: The coverage table in format 2 doesn't give an index into
@@ -5323,7 +5325,7 @@
for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
goto End1;
@@ -5355,7 +5357,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
goto End1;
@@ -5385,7 +5387,7 @@
for ( i = 0; i < lgc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
goto End1;
@@ -5454,7 +5456,7 @@
gdef = gpos->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
bgc = ccpf3->BacktrackGlyphCount;
@@ -5478,7 +5480,7 @@
for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -5499,7 +5501,7 @@
for ( i = 0, j = buffer->in_pos; i < igc; i++, j++ )
{
/* We already called CHECK_Property for IN_GLYPH ( buffer->in_pos ) */
- while ( j > buffer->in_pos && CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( j > buffer->in_pos && CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -5521,7 +5523,7 @@
for ( i = 0; i < lgc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
diff --git a/pango/opentype/ftxgsub.c b/pango/opentype/ftxgsub.c
index 4ca70d13..8da8ff47 100644
--- a/pango/opentype/ftxgsub.c
+++ b/pango/opentype/ftxgsub.c
@@ -39,7 +39,9 @@
#define IN_GLYPH( pos ) buffer->in_string[(pos)].gindex
+#define IN_ITEM( pos ) (&buffer->in_string[(pos)])
#define IN_CURGLYPH( pos ) buffer->in_string[(pos) + buffer->in_pos].gindex
+#define IN_CURITEM( pos ) (&buffer->in_string[(pos) + buffer->in_pos])
#define IN_PROPERTIES( pos ) buffer->in_string[(pos)].properties
#define IN_LIGID( pos ) buffer->in_string[(pos)].ligID
@@ -326,7 +328,7 @@
if ( context_length != 0xFFFF && context_length < 1 )
return TTO_Err_Not_Covered;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &ss->Coverage, IN_CURGLYPH( 0 ), &index );
@@ -530,7 +532,7 @@
if ( context_length != 0xFFFF && context_length < 1 )
return TTO_Err_Not_Covered;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &ms->Coverage, IN_CURGLYPH( 0 ), &index );
@@ -728,7 +730,7 @@
if ( context_length != 0xFFFF && context_length < 1 )
return TTO_Err_Not_Covered;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &as->Coverage, IN_CURGLYPH( 0 ), &index );
@@ -1006,7 +1008,7 @@
TTO_Ligature* lig;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
if ( property == TTO_MARK || property & IGNORE_SPECIAL_MARKS )
@@ -1037,7 +1039,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < lig->ComponentCount; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -1099,7 +1101,7 @@
for ( i = 0; i < lig->ComponentCount - 1; i++ )
{
- while ( CHECK_Property( gdef, IN_CURGLYPH( 0 ),
+ while ( CHECK_Property( gdef, IN_CURITEM( 0 ),
flags, &property ) )
if ( ADD_Glyph( buffer, IN_CURGLYPH( 0 ),
i, ligID ) )
@@ -1907,7 +1909,7 @@
gdef = gsub->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &csf1->Coverage, IN_CURGLYPH( 0 ), &index );
@@ -1927,7 +1929,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < sr[k].GlyphCount; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -1976,7 +1978,7 @@
gdef = gsub->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
/* Note: The coverage table in format 2 doesn't give an index into
@@ -2019,7 +2021,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < sr->GlyphCount; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
goto End;
@@ -2078,7 +2080,7 @@
gdef = gsub->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
if ( context_length != 0xFFFF && context_length < csf3->GlyphCount )
@@ -2091,7 +2093,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < csf3->GlyphCount; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -3183,7 +3185,7 @@
gdef = gsub->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
error = Coverage_Index( &ccsf1->Coverage, IN_CURGLYPH( 0 ), &index );
@@ -3215,7 +3217,7 @@
for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -3244,7 +3246,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -3263,7 +3265,7 @@
for ( i = 0; i < lgc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -3324,7 +3326,7 @@
gdef = gsub->gdef;
memory = gsub->memory;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
/* Note: The coverage table in format 2 doesn't give an index into
@@ -3384,7 +3386,7 @@
for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
goto End1;
@@ -3416,7 +3418,7 @@
for ( i = 1, j = buffer->in_pos + 1; i < igc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
goto End1;
@@ -3446,7 +3448,7 @@
for ( i = 0; i < lgc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
goto End1;
@@ -3514,7 +3516,7 @@
gdef = gsub->gdef;
- if ( CHECK_Property( gdef, IN_CURGLYPH( 0 ), flags, &property ) )
+ if ( CHECK_Property( gdef, IN_CURITEM( 0 ), flags, &property ) )
return error;
bgc = ccsf3->BacktrackGlyphCount;
@@ -3538,7 +3540,7 @@
for ( i = 0, j = buffer->in_pos - 1; i < bgc; i++, j-- )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -3559,7 +3561,7 @@
for ( i = 0, j = buffer->in_pos; i < igc; i++, j++ )
{
/* We already called CHECK_Property for IN_GLYPH( buffer->in_pos ) */
- while ( j > buffer->in_pos && CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( j > buffer->in_pos && CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -3581,7 +3583,7 @@
for ( i = 0; i < lgc; i++, j++ )
{
- while ( CHECK_Property( gdef, IN_GLYPH( j ), flags, &property ) )
+ while ( CHECK_Property( gdef, IN_ITEM( j ), flags, &property ) )
{
if ( error && error != TTO_Err_Not_Covered )
return error;
@@ -4039,8 +4041,8 @@
else
error = TTO_Err_Not_Covered;
- if ( error == TTO_Err_Not_Covered )
- if ( ADD_Glyph( buffer, IN_CURGLYPH( 0 ), 0xFFFF, 0xFFFF ) )
+ if ( error == TTO_Err_Not_Covered )
+ if ( otl_buffer_copy_output_glyph ( buffer ) )
return error;
}
diff --git a/pango/opentype/ftxopenf.h b/pango/opentype/ftxopenf.h
index 0c4db8b8..4c5998ef 100644
--- a/pango/opentype/ftxopenf.h
+++ b/pango/opentype/ftxopenf.h
@@ -145,7 +145,7 @@ extern "C" {
FT_UShort property );
FT_Error Check_Property( TTO_GDEFHeader* gdef,
- FT_UShort index,
+ OTL_GlyphItem item,
FT_UShort flags,
FT_UShort* property );
diff --git a/pango/opentype/otlbuffer.c b/pango/opentype/otlbuffer.c
index 6c9c0365..9849fd5a 100644
--- a/pango/opentype/otlbuffer.c
+++ b/pango/opentype/otlbuffer.c
@@ -133,6 +133,7 @@
glyph->cluster = cluster;
glyph->component = 0;
glyph->ligID = 0;
+ glyph->gproperties = OTL_GLYPH_PROPERTIES_UNKNOWN;
buffer->in_length++;
@@ -191,6 +192,7 @@
item->cluster = cluster;
item->component = component;
item->ligID = ligID;
+ item->gproperties = OTL_GLYPH_PROPERTIES_UNKNOWN;
}
buffer->in_pos += num_in;
@@ -202,8 +204,8 @@
}
FT_Error
- otl_buffer_add_output_glyph( OTL_Buffer buffer,
- FT_UInt glyph_index,
+ otl_buffer_add_output_glyph( OTL_Buffer buffer,
+ FT_UInt glyph_index,
FT_UShort component,
FT_UShort ligID )
{
@@ -213,6 +215,21 @@
&glyph_data, component, ligID );
}
+ FT_Error
+ otl_buffer_copy_output_glyph ( OTL_Buffer buffer )
+ {
+ FT_Error error;
+
+ error = otl_buffer_ensure( buffer, buffer->out_pos + 1 );
+ if ( error )
+ return error;
+
+ buffer->out_string[buffer->out_pos++] = buffer->out_string[buffer->in_pos++];
+ buffer->out_length = buffer->out_pos;
+
+ return FT_Err_Ok;
+ }
+
FT_UShort
otl_buffer_allocate_ligid( OTL_Buffer buffer )
{
diff --git a/pango/opentype/otlbuffer.h b/pango/opentype/otlbuffer.h
index 426b4473..bcb4e3e1 100644
--- a/pango/opentype/otlbuffer.h
+++ b/pango/opentype/otlbuffer.h
@@ -18,12 +18,15 @@
G_BEGIN_DECLS
+#define OTL_GLYPH_PROPERTIES_UNKNOWN 0xFFFF
+
typedef struct OTL_GlyphItemRec_ {
FT_UInt gindex;
FT_UInt properties;
FT_UInt cluster;
FT_UShort component;
FT_UShort ligID;
+ FT_UShort gproperties;
} OTL_GlyphItemRec, *OTL_GlyphItem;
typedef struct OTL_PositionRec_ {
@@ -91,6 +94,9 @@ G_BEGIN_DECLS
FT_UShort component,
FT_UShort ligID );
+ FT_Error
+ otl_buffer_copy_output_glyph ( OTL_Buffer buffer );
+
FT_UShort
otl_buffer_allocate_ligid( OTL_Buffer buffer );