[Indic] Recompose Bengali Ya,Nukta

This is a bunch of hacks for now.

Improves Bengali a bit.
This commit is contained in:
Behdad Esfahbod 2012-07-20 18:13:04 -04:00
parent e9c0f152a3
commit 4c450c703f
2 changed files with 10 additions and 2 deletions

View File

@ -407,7 +407,8 @@ hb_ot_shape_normalization_mode_t
_hb_ot_shape_complex_normalization_preference_indic (void)
{
/* We want split matras decomposed by the common shaping logic. */
return HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED;
/* XXX sort this out after adding per-shaper normalizers. */
return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS;
}
@ -549,7 +550,6 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
if (base < start)
base = start; /* Just in case... */
/* -> If the syllable starts with Ra + Halant (in a script that has Reph)
* and has more than one consonant, Ra is excluded from candidates for
* base consonants. */

View File

@ -258,6 +258,14 @@ hb_unicode_compose (hb_unicode_funcs_t *ufuncs,
hb_codepoint_t *ab)
{
*ab = 0;
/* XXX, this belongs to indic normalizer. */
if ((FLAG (hb_unicode_general_category (ufuncs, a)) &
(FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) |
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK))))
return false;
/* XXX, add composition-exclusion exceptions to Indic shaper. */
if (a == 0x09AF && b == 0x09BC) { *ab = 0x09DF; return true; }
return ufuncs->func.compose (ufuncs, a, b, ab, ufuncs->user_data.compose);
}