提交 a913b024 编写于 作者: B Behdad Esfahbod

[Indic] Apply 'init' feature for Bengali

Error down from 20% to 7%.
上级 eed903b1
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
*/ */
#include "hb-ot-shape-complex-indic-private.hh" #include "hb-ot-shape-complex-indic-private.hh"
#include "hb-ot-shape-private.hh"
static const struct indic_options_t static const struct indic_options_t
{ {
...@@ -738,6 +739,20 @@ final_reordering_syllable (hb_buffer_t *buffer, hb_mask_t *mask_array, ...@@ -738,6 +739,20 @@ final_reordering_syllable (hb_buffer_t *buffer, hb_mask_t *mask_array,
/* Apply 'init' to the Left Matra if it's a word start. */
if (info[start].indic_position () == POS_LEFT_MATRA &&
(!start ||
!(FLAG (_hb_glyph_info_get_general_category (&buffer->info[start - 1])) &
(FLAG (HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))))
info[start].mask |= mask_array[INIT];
/* Finish off the clusters and go home! */ /* Finish off the clusters and go home! */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册