[pango/harfbuzz-ng: 21/57] [OT] Match struct with HB's



commit 019d335ec7710eea286ed0294cda69aace4ebb96
Author: Behdad Esfahbod <behdad behdad org>
Date:   Sat Aug 1 22:25:04 2009 -0400

    [OT] Match struct with HB's

 pango/opentype/hb-buffer.c     |    6 +++---
 pango/opentype/hb-buffer.h     |    2 +-
 pango/opentype/hb-ot-layout.cc |   12 ++++++------
 pango/pango-ot.h               |    5 +++--
 4 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/pango/opentype/hb-buffer.c b/pango/opentype/hb-buffer.c
index a4b92d7..30ce2e8 100644
--- a/pango/opentype/hb-buffer.c
+++ b/pango/opentype/hb-buffer.c
@@ -172,7 +172,7 @@ hb_buffer_add_glyph (hb_buffer_t    *buffer,
   glyph->cluster = cluster;
   glyph->component = 0;
   glyph->ligID = 0;
-  glyph->gproperty = HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN;
+  glyph->internal = HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN;
 
   buffer->in_length++;
 }
@@ -285,7 +285,7 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
     info->cluster = cluster;
     info->component = component;
     info->ligID = ligID;
-    info->gproperty = HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN;
+    info->internal = HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN;
   }
 
   buffer->in_pos  += num_in;
@@ -316,7 +316,7 @@ _hb_buffer_add_output_glyph (hb_buffer_t *buffer,
     info->component = component;
   if (ligID != 0xFFFF)
     info->ligID = ligID;
-  info->gproperty = HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN;
+  info->internal = HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN;
 
   buffer->in_pos++;
   buffer->out_pos++;
diff --git a/pango/opentype/hb-buffer.h b/pango/opentype/hb-buffer.h
index 26879bf..4a37cdb 100644
--- a/pango/opentype/hb-buffer.h
+++ b/pango/opentype/hb-buffer.h
@@ -49,7 +49,7 @@ typedef struct _hb_glyph_info_t {
   unsigned int   cluster;
   unsigned short component;
   unsigned short ligID;
-  unsigned short gproperty;
+  unsigned int   internal;
 } hb_glyph_info_t;
 
 typedef struct _hb_glyph_position_t {
diff --git a/pango/opentype/hb-ot-layout.cc b/pango/opentype/hb-ot-layout.cc
index d101340..9e73737 100644
--- a/pango/opentype/hb-ot-layout.cc
+++ b/pango/opentype/hb-ot-layout.cc
@@ -182,9 +182,9 @@ _hb_ot_layout_check_glyph_property (hb_ot_layout_t  *layout,
 {
   unsigned int property;
 
-  if (ginfo->gproperty == HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN)
-    ginfo->gproperty = _hb_ot_layout_get_glyph_property (layout, ginfo->gindex);
-  property = ginfo->gproperty;
+  if (ginfo->internal == HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN)
+    ginfo->internal = _hb_ot_layout_get_glyph_property (layout, ginfo->gindex);
+  property = ginfo->internal;
   if (property_out)
     *property_out = property;
 
@@ -221,9 +221,9 @@ _hb_ot_layout_skip_mark (hb_ot_layout_t  *layout,
 {
   unsigned int property;
 
-  if (ginfo->gproperty == HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN)
-    ginfo->gproperty = _hb_ot_layout_get_glyph_property (layout, ginfo->gindex);
-  property = ginfo->gproperty;
+  if (ginfo->internal == HB_BUFFER_GLYPH_PROPERTIES_UNKNOWN)
+    ginfo->internal = _hb_ot_layout_get_glyph_property (layout, ginfo->gindex);
+  property = ginfo->internal;
   if (property_out)
     *property_out = property;
 
diff --git a/pango/pango-ot.h b/pango/pango-ot.h
index 8b9d0a2..6a436fc 100644
--- a/pango/pango-ot.h
+++ b/pango/pango-ot.h
@@ -64,12 +64,13 @@ typedef enum
 /* Note that this must match hb_glyph_info_t */
 struct _PangoOTGlyph
 {
-  guint    glyph;
+  guint32  glyph;
   guint    properties;
   guint    cluster;
   gushort  component;
   gushort  ligID;
-  gushort  property_cache;    /* Internal */
+
+  guint    internal;
 };
 
 struct _PangoOTFeatureMap



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]