Add buffer->allocate_lig_id()
This commit is contained in:
parent
1ce4dc95db
commit
8951fc2c82
|
@ -89,6 +89,8 @@ struct _hb_buffer_t {
|
|||
/* Other stuff */
|
||||
|
||||
unsigned int max_lig_id;
|
||||
|
||||
inline unsigned int allocate_lig_id (void) { return max_lig_id++; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -127,9 +129,6 @@ HB_INTERNAL void
|
|||
_hb_buffer_replace_glyph (hb_buffer_t *buffer,
|
||||
hb_codepoint_t glyph_index);
|
||||
|
||||
HB_INTERNAL unsigned short
|
||||
_hb_buffer_allocate_lig_id (hb_buffer_t *buffer);
|
||||
|
||||
|
||||
#ifndef BUFFER
|
||||
#define BUFFER buffer
|
||||
|
|
|
@ -450,12 +450,6 @@ _hb_buffer_replace_glyph (hb_buffer_t *buffer,
|
|||
_hb_buffer_add_output_glyph (buffer, glyph_index, 0xFFFF, 0xFFFF);
|
||||
}
|
||||
|
||||
unsigned short
|
||||
_hb_buffer_allocate_lig_id (hb_buffer_t *buffer)
|
||||
{
|
||||
return ++buffer->max_lig_id;
|
||||
}
|
||||
|
||||
|
||||
unsigned int
|
||||
hb_buffer_get_length (hb_buffer_t *buffer)
|
||||
|
|
|
@ -404,10 +404,10 @@ struct Ligature
|
|||
1, (const uint16_t *) &ligGlyph,
|
||||
0,
|
||||
IN_LIGID (context->buffer->in_pos) && !IN_COMPONENT (context->buffer->in_pos) ?
|
||||
0xFFFF : _hb_buffer_allocate_lig_id (context->buffer));
|
||||
0xFFFF : context->buffer->allocate_lig_id ());
|
||||
else
|
||||
{
|
||||
unsigned int lig_id = _hb_buffer_allocate_lig_id (context->buffer);
|
||||
unsigned int lig_id = context->buffer->allocate_lig_id ();
|
||||
_hb_buffer_add_output_glyph (context->buffer, ligGlyph, 0xFFFF, lig_id);
|
||||
|
||||
/* Now we must do a second loop to copy the skipped glyphs to
|
||||
|
|
Loading…
Reference in New Issue