Always allocate new ligature id

No practical point in reusing ligature ids.
pull/1/head
Behdad Esfahbod 15 years ago
parent bf07d5a29c
commit 2e2b2480c0
  1. 5
      src/hb-ot-layout-gsub-private.hh

@ -393,13 +393,10 @@ struct Ligature
: HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE); : HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE);
if (j == c->buffer->i + i) /* No input glyphs skipped */ if (j == c->buffer->i + i) /* No input glyphs skipped */
/* We don't use a new ligature ID if there are no skipped
glyphs and the ligature already has an ID. */
c->buffer->add_output_glyphs_be16 (i, c->buffer->add_output_glyphs_be16 (i,
1, (const uint16_t *) &ligGlyph, 1, (const uint16_t *) &ligGlyph,
0, 0,
c->buffer->info[c->buffer->i].lig_id() && !c->buffer->info[c->buffer->i].component() ? c->buffer->allocate_lig_id ());
0xFFFF : c->buffer->allocate_lig_id ());
else else
{ {
unsigned int lig_id = c->buffer->allocate_lig_id (); unsigned int lig_id = c->buffer->allocate_lig_id ();

Loading…
Cancel
Save