Improve clustering

This commit is contained in:
Behdad Esfahbod 2012-04-23 22:20:14 -04:00
parent 8e3715f8a1
commit a4385f0b0a
1 changed files with 2 additions and 3 deletions

View File

@ -193,7 +193,7 @@ hb_form_clusters (hb_buffer_t *buffer)
(FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))) FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
buffer->info[i].cluster = buffer->info[i - 1].cluster; buffer->info[i].cluster = buffer->info[i - 1].cluster; /* XXX do the min() here */
} }
static void static void
@ -251,8 +251,7 @@ hb_map_glyphs (hb_font_t *font,
for (buffer->idx = 0; buffer->idx < count;) { for (buffer->idx = 0; buffer->idx < count;) {
if (unlikely (_hb_unicode_is_variation_selector (buffer->info[buffer->idx + 1].codepoint))) { if (unlikely (_hb_unicode_is_variation_selector (buffer->info[buffer->idx + 1].codepoint))) {
hb_font_get_glyph (font, buffer->info[buffer->idx].codepoint, buffer->info[buffer->idx + 1].codepoint, &glyph); hb_font_get_glyph (font, buffer->info[buffer->idx].codepoint, buffer->info[buffer->idx + 1].codepoint, &glyph);
buffer->replace_glyph (glyph); buffer->replace_glyphs (2, 1, &glyph);
buffer->skip_glyph ();
} else { } else {
hb_font_get_glyph (font, buffer->info[buffer->idx].codepoint, 0, &glyph); hb_font_get_glyph (font, buffer->info[buffer->idx].codepoint, 0, &glyph);
buffer->replace_glyph (glyph); buffer->replace_glyph (glyph);