From: Behdad Esfahbod Date: Tue, 24 Jul 2012 06:22:18 +0000 (-0400) Subject: [Indic] Recategorize Khmer various signs as top matras X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6824a7194e01b77eddb95bd95a9b32e219140912;p=platform%2Fupstream%2FlibHarfBuzzSharp.git [Indic] Recategorize Khmer various signs as top matras Khmer failures down from 39 to 31 (0.0103636%). --- diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 20a2ad0..a061d7b 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -236,13 +236,14 @@ set_indic_properties (hb_glyph_info_t &info, hb_ot_map_t *map, hb_font_t *font) { hb_codepoint_t u = info.codepoint; unsigned int type = get_indic_categories (u); + indic_category_t cat = (indic_category_t) (type & 0x0F); + indic_position_t pos = (indic_position_t) (type >> 4); /* - * Assign category + * Re-assign category */ - indic_category_t cat = (indic_category_t) (type & 0x0F); /* The spec says U+0952 is OT_A. However, testing shows that Uniscribe * treats U+0951..U+0952 all as OT_VD. @@ -256,8 +257,12 @@ set_indic_properties (hb_glyph_info_t &info, hb_ot_map_t *map, hb_font_t *font) cat = OT_VD; if (cat == OT_X && - unlikely (hb_in_range (u, 0x17CB, 0x17D2))) /* Khmer Various signs */ - cat = OT_N; + unlikely (hb_in_range (u, 0x17CB, 0x17D3))) /* Khmer Various signs */ + { + /* These are like Top Matras. */ + cat = OT_M; + pos = POS_ABOVE_C; + } if (u == 0x17C6) /* Khmer Bindu doesn't like to be repositioned. */ cat = OT_N; @@ -280,13 +285,10 @@ set_indic_properties (hb_glyph_info_t &info, hb_ot_map_t *map, hb_font_t *font) - /* - * Assign position. + * Re-assign position. */ - indic_position_t pos = (indic_position_t) (type >> 4); - if ((FLAG (cat) & CONSONANT_FLAGS)) { pos = consonant_position (u, map, font); @@ -304,11 +306,6 @@ set_indic_properties (hb_glyph_info_t &info, hb_ot_map_t *map, hb_font_t *font) if (unlikely (u == 0x0B01)) pos = POS_BEFORE_SUB; /* Oriya Bindu is BeforeSub in the spec. */ - if (u == 0x17CE) /* U+17CE is not in Indic files. Likes to be treated like Top Matra */ - { - cat = OT_M; - pos = POS_AFTER_SUB; - } info.indic_category() = cat;