Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buf = hb_buffer_create();
- hb_buffer_set_script(buf, HB_SCRIPT_LATIN);
- hb_buffer_set_direction(buf, HB_DIRECTION_LTR);
- hb_buffer_set_language(buf, hb_language_get_default());
- hb_feature_t *features = NULL;
- const hb_tag_t math_ssty_tag = HB_TAG('s', 's', 't', 'y');
- int num_features = 0;
- if (cur_style <= math_script_style) {
- features = malloc(sizeof(hb_feature_t));
- num_features = 1;
- features[0] = (hb_feature_t){ math_ssty_tag, 1, 0, UINT_MAX };
- }
- hb_buffer_add_utf32(buf, unicode_char, 1, 0, 1);
- hb_shape(font, buf, features, num_features);
- glyph_info = hb_buffer_get_glyph_infos(buf, &glyph_count);
- assert(glyph_count == 1);
- hb_codepoint_t glyph_code = glyph_info[0].codepoint;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement