Minor renaming

This commit is contained in:
Behdad Esfahbod 2010-10-27 16:57:01 -04:00
parent fe263272a2
commit dd2ffd282c
4 changed files with 37 additions and 38 deletions

View File

@ -59,20 +59,20 @@ HB_INTERNAL void
_hb_buffer_clear_output (hb_buffer_t *buffer); _hb_buffer_clear_output (hb_buffer_t *buffer);
HB_INTERNAL void HB_INTERNAL void
_hb_buffer_add_output_glyphs (hb_buffer_t *buffer, _hb_buffer_replace_glyphs (hb_buffer_t *buffer,
unsigned int num_in, unsigned int num_in,
unsigned int num_out, unsigned int num_out,
const hb_codepoint_t *glyph_data); const hb_codepoint_t *glyph_data);
HB_INTERNAL void HB_INTERNAL void
_hb_buffer_add_output_glyphs_be16 (hb_buffer_t *buffer, _hb_buffer_replace_glyphs_be16 (hb_buffer_t *buffer,
unsigned int num_in, unsigned int num_in,
unsigned int num_out, unsigned int num_out,
const uint16_t *glyph_data_be); const uint16_t *glyph_data_be);
HB_INTERNAL void HB_INTERNAL void
_hb_buffer_add_output_glyph (hb_buffer_t *buffer, _hb_buffer_replace_glyph (hb_buffer_t *buffer,
hb_codepoint_t glyph_index); hb_codepoint_t glyph_index);
HB_INTERNAL void HB_INTERNAL void
_hb_buffer_next_glyph (hb_buffer_t *buffer); _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 swap (void) { _hb_buffer_swap (this); }
inline void clear_output (void) { _hb_buffer_clear_output (this); } inline void clear_output (void) { _hb_buffer_clear_output (this); }
inline void next_glyph (void) { _hb_buffer_next_glyph (this); } inline void next_glyph (void) { _hb_buffer_next_glyph (this); }
inline void add_output_glyphs (unsigned int num_in, inline void replace_glyphs (unsigned int num_in,
unsigned int num_out, unsigned int num_out,
const hb_codepoint_t *glyph_data) const hb_codepoint_t *glyph_data)
{ _hb_buffer_add_output_glyphs (this, num_in, num_out, glyph_data); } { _hb_buffer_replace_glyphs (this, num_in, num_out, glyph_data); }
inline void add_output_glyphs_be16 (unsigned int num_in, inline void replace_glyphs_be16 (unsigned int num_in,
unsigned int num_out, unsigned int num_out,
const uint16_t *glyph_data_be) const uint16_t *glyph_data_be)
{ _hb_buffer_add_output_glyphs_be16 (this, num_in, num_out, glyph_data_be); } { _hb_buffer_replace_glyphs_be16 (this, num_in, num_out, glyph_data_be); }
inline void add_output_glyph (hb_codepoint_t glyph_index) inline void replace_glyph (hb_codepoint_t glyph_index)
{ _hb_buffer_add_output_glyph (this, glyph_index); } { _hb_buffer_replace_glyph (this, glyph_index); }
inline void replace_glyph (hb_codepoint_t glyph_index) { add_output_glyph (glyph_index); }
inline void reset_masks (hb_mask_t mask) inline void reset_masks (hb_mask_t mask)
{ {

View File

@ -311,10 +311,10 @@ _hb_buffer_swap (hb_buffer_t *buffer)
} }
void void
_hb_buffer_add_output_glyphs (hb_buffer_t *buffer, _hb_buffer_replace_glyphs (hb_buffer_t *buffer,
unsigned int num_in, unsigned int num_in,
unsigned int num_out, unsigned int num_out,
const hb_codepoint_t *glyph_data) const hb_codepoint_t *glyph_data)
{ {
if (buffer->out_info != buffer->info || if (buffer->out_info != buffer->info ||
buffer->out_len + num_out > buffer->i + num_in) buffer->out_len + num_out > buffer->i + num_in)
@ -338,10 +338,10 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
} }
void void
_hb_buffer_add_output_glyphs_be16 (hb_buffer_t *buffer, _hb_buffer_replace_glyphs_be16 (hb_buffer_t *buffer,
unsigned int num_in, unsigned int num_in,
unsigned int num_out, unsigned int num_out,
const uint16_t *glyph_data_be) const uint16_t *glyph_data_be)
{ {
if (buffer->out_info != buffer->info || if (buffer->out_info != buffer->info ||
buffer->out_len + num_out > buffer->i + num_in) buffer->out_len + num_out > buffer->i + num_in)
@ -365,8 +365,8 @@ _hb_buffer_add_output_glyphs_be16 (hb_buffer_t *buffer,
} }
void void
_hb_buffer_add_output_glyph (hb_buffer_t *buffer, _hb_buffer_replace_glyph (hb_buffer_t *buffer,
hb_codepoint_t glyph_index) hb_codepoint_t glyph_index)
{ {
hb_glyph_info_t *info; hb_glyph_info_t *info;

View File

@ -164,7 +164,7 @@ struct Sequence
if (unlikely (!substitute.len)) if (unlikely (!substitute.len))
return false; 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 ... */ /* This is a guess only ... */
if (_hb_ot_layout_has_new_glyph_classes (c->layout->face)) 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 */ 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 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 /* Now we must do a second loop to copy the skipped glyphs to
`out' and assign component values to it. We start with the `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].component() = i;
c->buffer->info[c->buffer->i].lig_id() = lig_id; 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 */ /* Skip the base glyph */

View File

@ -198,14 +198,14 @@ hb_map_glyphs (hb_font_t *font,
unsigned int count = buffer->len - 1; unsigned int count = buffer->len - 1;
for (buffer->i = 0; buffer->i < count;) { for (buffer->i = 0; buffer->i < count;) {
if (unlikely (is_variation_selector (buffer->info[buffer->i + 1].codepoint))) { 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++; buffer->i++;
} else { } 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)) 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 (); buffer->swap ();
} }