summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2011-07-31 11:10:14 -0400
committerBehdad Esfahbod <behdad@behdad.org>2011-07-31 11:10:14 -0400
commit9ee27a928a989c71923cef82a9e9828f8e9ca051 (patch)
tree0875c9fdde8af8f8709db486ebb585927c48073c
parent8354e004e553856d7d743e0f0b4de4668484026a (diff)
downloadvideo-player-9ee27a928a989c71923cef82a9e9828f8e9ca051.tar.gz
video-player-9ee27a928a989c71923cef82a9e9828f8e9ca051.tar.bz2
video-player-9ee27a928a989c71923cef82a9e9828f8e9ca051.zip
[Indic] Suppress reph formation upon joiners
-rw-r--r--src/hb-ot-shape-complex-indic.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 3e69b0f..8adcffc 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -282,6 +282,11 @@ is_ra (hb_codepoint_t u)
compare_codepoint);
}
+static bool
+is_joiner (hb_glyph_info_t *info)
+{
+ return info->indic_category() == OT_ZWJ || info->indic_category() == OT_ZWNJ;
+}
static const struct {
hb_tag_t tag;
@@ -501,7 +506,8 @@ found_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t
/* Handle beginning Ra */
if (start + 2 <= end &&
info[start].indic_category() == OT_Ra &&
- info[start + 1].indic_category() == OT_H)
+ info[start + 1].indic_category() == OT_H &&
+ (start + 2 == end || !is_joiner (&info[start])))
{
info[start].indic_position() = POS_POST;
info[start].mask = mask_array[RPHF];