+ buffer->clear_output ();
+ count = buffer->len;
+ unsigned int starter = 0;
+ buffer->next_glyph ();
+ while (buffer->idx < count)
+ {
+ if (buffer->info[buffer->idx].combining_class() == 0) {
+ starter = buffer->out_len;
+ buffer->next_glyph ();
+ continue;
+ }
+
+ hb_codepoint_t composed, glyph;
+ if ((buffer->out_info[buffer->out_len - 1].combining_class() >=
+ buffer->info[buffer->idx].combining_class()) ||
+ !hb_unicode_compose (c->buffer->unicode,
+ buffer->out_info[starter].codepoint,
+ buffer->info[buffer->idx].codepoint,
+ &composed) ||
+ !hb_font_get_glyph (c->font, composed, 0, &glyph))
+ {
+ /* Blocked, or doesn't compose. */
+ buffer->next_glyph ();
+ continue;
+ }
+
+ /* Composes. Modify starter and carry on. */
+ buffer->out_info[starter].codepoint = composed;
+ hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer->unicode);