Add _hb_buffer_output_glyph() and _hb_buffer_skip_glyph()
This commit is contained in:
parent
655586fe5e
commit
9111b21ef9
|
@ -65,6 +65,13 @@ HB_INTERNAL void
|
||||||
_hb_buffer_replace_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_buffer_output_glyph (hb_buffer_t *buffer,
|
||||||
|
hb_codepoint_t glyph_index);
|
||||||
|
|
||||||
|
HB_INTERNAL void
|
||||||
|
_hb_buffer_skip_glyph (hb_buffer_t *buffer);
|
||||||
|
|
||||||
HB_INTERNAL void
|
HB_INTERNAL void
|
||||||
_hb_buffer_next_glyph (hb_buffer_t *buffer);
|
_hb_buffer_next_glyph (hb_buffer_t *buffer);
|
||||||
|
|
||||||
|
@ -125,6 +132,9 @@ struct _hb_buffer_t {
|
||||||
{ _hb_buffer_replace_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 replace_glyph (hb_codepoint_t glyph_index)
|
inline void replace_glyph (hb_codepoint_t glyph_index)
|
||||||
{ _hb_buffer_replace_glyph (this, glyph_index); }
|
{ _hb_buffer_replace_glyph (this, glyph_index); }
|
||||||
|
inline void output_glyph (hb_codepoint_t glyph_index)
|
||||||
|
{ _hb_buffer_output_glyph (this, glyph_index); }
|
||||||
|
inline void skip_glyph (void) { _hb_buffer_skip_glyph (this); }
|
||||||
|
|
||||||
inline void reset_masks (hb_mask_t mask)
|
inline void reset_masks (hb_mask_t mask)
|
||||||
{
|
{
|
||||||
|
|
|
@ -404,7 +404,7 @@ _hb_buffer_replace_glyphs_be16 (hb_buffer_t *buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_hb_buffer_replace_glyph (hb_buffer_t *buffer,
|
_hb_buffer_output_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;
|
||||||
|
@ -420,10 +420,23 @@ _hb_buffer_replace_glyph (hb_buffer_t *buffer,
|
||||||
info = &buffer->out_info[buffer->out_len];
|
info = &buffer->out_info[buffer->out_len];
|
||||||
info->codepoint = glyph_index;
|
info->codepoint = glyph_index;
|
||||||
|
|
||||||
buffer->i++;
|
|
||||||
buffer->out_len++;
|
buffer->out_len++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_hb_buffer_replace_glyph (hb_buffer_t *buffer,
|
||||||
|
hb_codepoint_t glyph_index)
|
||||||
|
{
|
||||||
|
_hb_buffer_output_glyph (buffer, glyph_index);
|
||||||
|
_hb_buffer_skip_glyph (buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_hb_buffer_skip_glyph (hb_buffer_t *buffer)
|
||||||
|
{
|
||||||
|
buffer->i++;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_hb_buffer_next_glyph (hb_buffer_t *buffer)
|
_hb_buffer_next_glyph (hb_buffer_t *buffer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -264,7 +264,7 @@ hb_map_glyphs (hb_font_t *font,
|
||||||
if (unlikely (is_variation_selector (buffer->info[buffer->i + 1].codepoint))) {
|
if (unlikely (is_variation_selector (buffer->info[buffer->i + 1].codepoint))) {
|
||||||
hb_font_get_glyph (font, buffer->info[buffer->i].codepoint, buffer->info[buffer->i + 1].codepoint, &glyph);
|
hb_font_get_glyph (font, buffer->info[buffer->i].codepoint, buffer->info[buffer->i + 1].codepoint, &glyph);
|
||||||
buffer->replace_glyph (glyph);
|
buffer->replace_glyph (glyph);
|
||||||
buffer->i++;
|
buffer->skip_glyph ();
|
||||||
} else {
|
} else {
|
||||||
hb_font_get_glyph (font, buffer->info[buffer->i].codepoint, 0, &glyph);
|
hb_font_get_glyph (font, buffer->info[buffer->i].codepoint, 0, &glyph);
|
||||||
buffer->replace_glyph (glyph);
|
buffer->replace_glyph (glyph);
|
||||||
|
|
Loading…
Reference in New Issue