#include <graphite2/Segment.h>
-#include "hb-ot-tag.h"
-
HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, face)
HB_SHAPER_DATA_ENSURE_DECLARE(graphite2, font)
hb_graphite2_shaper_face_data_t *data = (hb_graphite2_shaper_face_data_t *) calloc (1, sizeof (hb_graphite2_shaper_face_data_t));
if (unlikely (!data))
- hb_blob_destroy (silf_blob);
+ return NULL;
data->face = face;
data->grface = gr_make_face (data, &hb_graphite2_get_table, gr_face_preloadAll);
unsigned int num_chars;
unsigned int base_glyph;
unsigned int num_glyphs;
+ unsigned int cluster;
};
hb_bool_t
memset (clusters, 0, sizeof (clusters[0]) * buffer->len);
hb_codepoint_t *pg = gids;
+ clusters[0].cluster = buffer->info[0].cluster;
for (is = gr_seg_first_slot (seg), ic = 0; is; is = gr_slot_next_in_segment (is), ic++)
{
unsigned int before = gr_slot_before (is);
{
hb_graphite2_cluster_t *c = clusters + ci + 1;
c->base_char = clusters[ci].base_char + clusters[ci].num_chars;
+ c->cluster = buffer->info[c->base_char].cluster;
c->num_chars = before - c->base_char;
c->base_glyph = ic;
c->num_glyphs = 0;
{
hb_glyph_info_t *info = &buffer->info[clusters[i].base_glyph + j];
info->codepoint = gids[clusters[i].base_glyph + j];
- info->cluster = gr_cinfo_base(gr_seg_cinfo(seg, clusters[i].base_char));
+ info->cluster = clusters[i].cluster;
}
}
buffer->len = glyph_count;