[Thai] set the correct general category on Nikhahit when decomposing Sara-Am.

This commit is contained in:
Jonathan Kew 2014-06-10 13:10:02 +01:00 committed by Behdad Esfahbod
parent 1d634cbb4b
commit 80f7405a52
1 changed files with 4 additions and 1 deletions

View File

@ -330,8 +330,11 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
if (unlikely (buffer->in_error)) if (unlikely (buffer->in_error))
return; return;
/* Ok, let's see... */ /* Make Nikhahit be recognized as a mark when zeroing widths. */
unsigned int end = buffer->out_len; unsigned int end = buffer->out_len;
_hb_glyph_info_set_general_category (&buffer->out_info[end - 2], HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK);
/* Ok, let's see... */
unsigned int start = end - 2; unsigned int start = end - 2;
while (start > 0 && IS_TONE_MARK (buffer->out_info[start - 1].codepoint)) while (start > 0 && IS_TONE_MARK (buffer->out_info[start - 1].codepoint))
start--; start--;