Home | History | Annotate | Download | only in src

Lines Matching refs:clusters

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