Minor renaming
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 27 Oct 2010 20:57:01 +0000 (16:57 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 2 Nov 2010 23:12:58 +0000 (19:12 -0400)
src/hb-buffer-private.hh
src/hb-buffer.cc
src/hb-ot-layout-gsub-private.hh
src/hb-ot-shape.cc

index 97da610..2ad8212 100644 (file)
@@ -59,20 +59,20 @@ HB_INTERNAL void
 _hb_buffer_clear_output (hb_buffer_t *buffer);
 
 HB_INTERNAL void
-_hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
-                             unsigned int num_in,
-                             unsigned int num_out,
-                             const hb_codepoint_t *glyph_data);
+_hb_buffer_replace_glyphs (hb_buffer_t *buffer,
+                          unsigned int num_in,
+                          unsigned int num_out,
+                          const hb_codepoint_t *glyph_data);
 
 HB_INTERNAL void
-_hb_buffer_add_output_glyphs_be16 (hb_buffer_t *buffer,
-                                  unsigned int num_in,
-                                  unsigned int num_out,
-                                  const uint16_t *glyph_data_be);
+_hb_buffer_replace_glyphs_be16 (hb_buffer_t *buffer,
+                               unsigned int num_in,
+                               unsigned int num_out,
+                               const uint16_t *glyph_data_be);
 
 HB_INTERNAL void
-_hb_buffer_add_output_glyph (hb_buffer_t *buffer,
-                            hb_codepoint_t glyph_index);
+_hb_buffer_replace_glyph (hb_buffer_t *buffer,
+                         hb_codepoint_t glyph_index);
 
 HB_INTERNAL void
 _hb_buffer_next_glyph (hb_buffer_t *buffer);
@@ -128,17 +128,16 @@ struct _hb_buffer_t {
   inline void swap (void) { _hb_buffer_swap (this); }
   inline void clear_output (void) { _hb_buffer_clear_output (this); }
   inline void next_glyph (void) { _hb_buffer_next_glyph (this); }
-  inline void add_output_glyphs (unsigned int num_in,
-                                unsigned int num_out,
-                                const hb_codepoint_t *glyph_data)
-  { _hb_buffer_add_output_glyphs (this, num_in, num_out, glyph_data); }
-  inline void add_output_glyphs_be16 (unsigned int num_in,
-                                     unsigned int num_out,
-                                     const uint16_t *glyph_data_be)
-  { _hb_buffer_add_output_glyphs_be16 (this, num_in, num_out, glyph_data_be); }
-  inline void add_output_glyph (hb_codepoint_t glyph_index)
-  { _hb_buffer_add_output_glyph (this, glyph_index); }
-  inline void replace_glyph (hb_codepoint_t glyph_index) { add_output_glyph (glyph_index); }
+  inline void replace_glyphs (unsigned int num_in,
+                             unsigned int num_out,
+                             const hb_codepoint_t *glyph_data)
+  { _hb_buffer_replace_glyphs (this, num_in, num_out, glyph_data); }
+  inline void replace_glyphs_be16 (unsigned int num_in,
+                                  unsigned int num_out,
+                                  const uint16_t *glyph_data_be)
+  { _hb_buffer_replace_glyphs_be16 (this, num_in, num_out, glyph_data_be); }
+  inline void replace_glyph (hb_codepoint_t glyph_index)
+  { _hb_buffer_replace_glyph (this, glyph_index); }
 
   inline void reset_masks (hb_mask_t mask)
   {
index 7eb0370..7bdee9f 100644 (file)
@@ -311,10 +311,10 @@ _hb_buffer_swap (hb_buffer_t *buffer)
 }
 
 void
-_hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
-                             unsigned int num_in,
-                             unsigned int num_out,
-                             const hb_codepoint_t *glyph_data)
+_hb_buffer_replace_glyphs (hb_buffer_t *buffer,
+                          unsigned int num_in,
+                          unsigned int num_out,
+                          const hb_codepoint_t *glyph_data)
 {
   if (buffer->out_info != buffer->info ||
       buffer->out_len + num_out > buffer->i + num_in)
@@ -338,10 +338,10 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
 }
 
 void
-_hb_buffer_add_output_glyphs_be16 (hb_buffer_t *buffer,
-                                  unsigned int num_in,
-                                  unsigned int num_out,
-                                  const uint16_t *glyph_data_be)
+_hb_buffer_replace_glyphs_be16 (hb_buffer_t *buffer,
+                               unsigned int num_in,
+                               unsigned int num_out,
+                               const uint16_t *glyph_data_be)
 {
   if (buffer->out_info != buffer->info ||
       buffer->out_len + num_out > buffer->i + num_in)
@@ -365,8 +365,8 @@ _hb_buffer_add_output_glyphs_be16 (hb_buffer_t *buffer,
 }
 
 void
-_hb_buffer_add_output_glyph (hb_buffer_t *buffer,
-                            hb_codepoint_t glyph_index)
+_hb_buffer_replace_glyph (hb_buffer_t *buffer,
+                         hb_codepoint_t glyph_index)
 {
   hb_glyph_info_t *info;
 
index 829217c..7e37d51 100644 (file)
@@ -164,7 +164,7 @@ struct Sequence
     if (unlikely (!substitute.len))
       return false;
 
-    c->buffer->add_output_glyphs_be16 (1, substitute.len, (const uint16_t *) substitute.array);
+    c->buffer->replace_glyphs_be16 (1, substitute.len, (const uint16_t *) substitute.array);
 
     /* This is a guess only ... */
     if (_hb_ot_layout_has_new_glyph_classes (c->layout->face))
@@ -397,11 +397,11 @@ struct Ligature
 
     if (j == c->buffer->i + i) /* No input glyphs skipped */
     {
-      c->buffer->add_output_glyphs_be16 (i, 1, (const uint16_t *) &ligGlyph);
+      c->buffer->replace_glyphs_be16 (i, 1, (const uint16_t *) &ligGlyph);
     }
     else
     {
-      c->buffer->add_output_glyph (ligGlyph);
+      c->buffer->replace_glyph (ligGlyph);
 
       /* Now we must do a second loop to copy the skipped glyphs to
         `out' and assign component values to it.  We start with the
@@ -416,7 +416,7 @@ struct Ligature
        {
          c->buffer->info[c->buffer->i].component() = i;
          c->buffer->info[c->buffer->i].lig_id() = lig_id;
-         c->buffer->add_output_glyph (c->buffer->info[c->buffer->i].codepoint);
+         c->buffer->replace_glyph (c->buffer->info[c->buffer->i].codepoint);
        }
 
        /* Skip the base glyph */
index 5770cbf..64a1a3d 100644 (file)
@@ -198,14 +198,14 @@ hb_map_glyphs (hb_font_t    *font,
   unsigned int count = buffer->len - 1;
   for (buffer->i = 0; buffer->i < count;) {
     if (unlikely (is_variation_selector (buffer->info[buffer->i + 1].codepoint))) {
-      buffer->add_output_glyph (hb_font_get_glyph (font, face, buffer->info[buffer->i].codepoint, buffer->info[buffer->i + 1].codepoint));
+      buffer->replace_glyph (hb_font_get_glyph (font, face, buffer->info[buffer->i].codepoint, buffer->info[buffer->i + 1].codepoint));
       buffer->i++;
     } else {
-      buffer->add_output_glyph (hb_font_get_glyph (font, face, buffer->info[buffer->i].codepoint, 0));
+      buffer->replace_glyph (hb_font_get_glyph (font, face, buffer->info[buffer->i].codepoint, 0));
     }
   }
   if (likely (buffer->i < buffer->len))
-    buffer->add_output_glyph (hb_font_get_glyph (font, face, buffer->info[buffer->i].codepoint, 0));
+    buffer->replace_glyph (hb_font_get_glyph (font, face, buffer->info[buffer->i].codepoint, 0));
   buffer->swap ();
 }