HB_INTERNAL void
_hb_buffer_next_glyph (hb_buffer_t *buffer);
-HB_INTERNAL void
-_hb_buffer_replace_glyph (hb_buffer_t *buffer,
- hb_codepoint_t glyph_index);
-
struct _hb_buffer_t {
/* Methods */
inline unsigned int allocate_lig_id (void) { return max_lig_id++; }
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_glyph (hb_codepoint_t glyph_index,
+ unsigned short component = 0xFFFF,
+ unsigned short ligID = 0xFFFF)
+ { _hb_buffer_add_output_glyph (this, glyph_index, component, ligID); }
+ inline void replace_glyph (hb_codepoint_t glyph_index) { add_output_glyph (glyph_index); }
};
buffer->in_pos++;
}
-void
-_hb_buffer_replace_glyph (hb_buffer_t *buffer,
- hb_codepoint_t glyph_index)
-{
- _hb_buffer_add_output_glyph (buffer, glyph_index, 0xFFFF, 0xFFFF);
-}
-
unsigned int
hb_buffer_get_length (hb_buffer_t *buffer)
return false;
glyph_id += deltaGlyphID;
- _hb_buffer_replace_glyph (context->buffer, glyph_id);
+ context->buffer->replace_glyph (glyph_id);
/* We inherit the old glyph class to the substituted glyph */
if (_hb_ot_layout_has_new_glyph_classes (context->layout->face))
return false;
glyph_id = substitute[index];
- _hb_buffer_replace_glyph (context->buffer, glyph_id);
+ context->buffer->replace_glyph (glyph_id);
/* We inherit the old glyph class to the substituted glyph */
if (_hb_ot_layout_has_new_glyph_classes (context->layout->face))
glyph_id = alt_set[alt_index];
- _hb_buffer_replace_glyph (context->buffer, glyph_id);
+ context->buffer->replace_glyph (glyph_id);
/* We inherit the old glyph class to the substituted glyph */
if (_hb_ot_layout_has_new_glyph_classes (context->layout->face))
if (likely (!is_reverse ()))
{
/* in/out forward substitution */
- _hb_buffer_clear_output (buffer);
+ buffer->clear_output ();
buffer->in_pos = 0;
while (buffer->in_pos < buffer->in_length)
{
apply_once (layout, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
ret = true;
else
- _hb_buffer_next_glyph (buffer);
+ buffer->next_glyph ();
}
if (ret)
if (unlikely (context->buffer->in_pos == end))
return true;
/* No lookup applied for this index */
- _hb_buffer_next_glyph (context->buffer);
+ context->buffer->next_glyph ();
}
if (lookupCount && i == lookupRecord->sequenceIndex)
{
not_applied:
/* No lookup applied for this index */
- _hb_buffer_next_glyph (context->buffer);
+ context->buffer->next_glyph ();
i++;
}
}