Lines Matching refs:clusters
305 ALLOCATE_ARRAY (hb_graphite2_cluster_t, clusters, buffer->len); in _hb_graphite2_shape()
310 memset (clusters, 0, sizeof (clusters[0]) * buffer->len); in _hb_graphite2_shape()
313 clusters[0].cluster = buffer->info[0].cluster; in _hb_graphite2_shape()
318 clusters[0].advance = gr_seg_advance_X(seg) - curradv; in _hb_graphite2_shape()
326 while (clusters[ci].base_char > before && ci) in _hb_graphite2_shape()
328 clusters[ci-1].num_chars += clusters[ci].num_chars; in _hb_graphite2_shape()
329 clusters[ci-1].num_glyphs += clusters[ci].num_glyphs; in _hb_graphite2_shape()
330 clusters[ci-1].advance += clusters[ci].advance; in _hb_graphite2_shape()
334 …if (gr_slot_can_insert_before (is) && clusters[ci].num_chars && before >= clusters[ci].base_char +… in _hb_graphite2_shape()
336 hb_graphite2_cluster_t *c = clusters + ci + 1; in _hb_graphite2_shape()
337 c->base_char = clusters[ci].base_char + clusters[ci].num_chars; in _hb_graphite2_shape()
345 clusters[ci].advance = curradv - gr_slot_origin_X(is); in _hb_graphite2_shape()
347 clusters[ci].advance = gr_slot_origin_X(is) - curradv; in _hb_graphite2_shape()
352 clusters[ci].num_glyphs++; in _hb_graphite2_shape()
354 if (clusters[ci].base_char + clusters[ci].num_chars < after + 1) in _hb_graphite2_shape()
355 clusters[ci].num_chars = after + 1 - clusters[ci].base_char; in _hb_graphite2_shape()
359 clusters[ci].advance = gr_seg_advance_X(seg) - curradv; in _hb_graphite2_shape()
364 for (unsigned int j = 0; j < clusters[i].num_glyphs; ++j) in _hb_graphite2_shape()
366 hb_glyph_info_t *info = &buffer->info[clusters[i].base_glyph + j]; in _hb_graphite2_shape()
367 info->codepoint = gids[clusters[i].base_glyph + j]; in _hb_graphite2_shape()
368 info->cluster = clusters[i].cluster; in _hb_graphite2_shape()
369 info->var1.i32 = clusters[i].advance; // all glyphs in the cluster get the same advance in _hb_graphite2_shape()