diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2013-12-16 08:49:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-19 05:49:27 +0100 |
commit | 260fe985255c46fd2eb0aff378da8dccb5f2703f (patch) | |
tree | 11691b16243276c1b88c23d470cdb48e5f3fa1a2 /src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc | |
parent | 4b2c73b4767bcb512cbc17f65186eac5d004db07 (diff) |
Update bundled HarfBuzz sources up to 0.9.25
Most important changes:
- Myanmar, Indic, Javanese / Buginese shaper improvements
- More aggressive shape-plan caching
- Additional OpenType language tags
Change-Id: I54ed62cfe936c06c18589d09ac119a0f5881a235
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc')
-rw-r--r-- | src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc index 29f29bb556..25ba7264ca 100644 --- a/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc +++ b/src/3rdparty/harfbuzz-ng/src/hb-ot-shape-complex-myanmar.cc @@ -60,6 +60,16 @@ other_features[] = HB_TAG('p','s','t','s'), /* Positioning features, though we don't care about the types. */ HB_TAG('d','i','s','t'), + /* Pre-release version of Windows 8 Myanmar font had abvm,blwm + * features. The released Windows 8 version of the font (as well + * as the released spec) used 'mark' instead. The Windows 8 + * shaper however didn't apply 'mark' but did apply 'mkmk'. + * Perhaps it applied abvm/blwm. This was fixed in a Windows 8 + * update, so now it applies mark/mkmk. We are guessing that + * it still applies abvm/blwm too. + */ + HB_TAG('a','b','v','m'), + HB_TAG('b','l','w','m'), }; static void @@ -109,6 +119,7 @@ override_features_myanmar (hb_ot_shape_planner_t *plan) enum syllable_type_t { consonant_syllable, + punctuation_cluster, broken_cluster, non_myanmar_cluster, }; @@ -133,7 +144,8 @@ enum myanmar_category_t { OT_VBlw = 27, OT_VPre = 28, OT_VPst = 29, - OT_VS = 30 /* Variation selectors */ + OT_VS = 30, /* Variation selectors */ + OT_P = 31 /* Punctuation */ }; @@ -141,7 +153,7 @@ static inline bool is_one_of (const hb_glyph_info_t &info, unsigned int flags) { /* If it ligated, all bets are off. */ - if (is_a_ligature (info)) return false; + if (_hb_glyph_info_ligated (&info)) return false; return !!(FLAG (info.myanmar_category()) & flags); } @@ -176,6 +188,10 @@ set_myanmar_properties (hb_glyph_info_t &info) switch (u) { + case 0x104E: + cat = (indic_category_t) OT_C; /* The spec says C, IndicSyllableCategory doesn't have. */ + break; + case 0x002D: case 0x00A0: case 0x00D7: case 0x2012: case 0x2013: case 0x2014: case 0x2015: case 0x2022: case 0x25CC: case 0x25FB: case 0x25FC: case 0x25FD: @@ -233,6 +249,10 @@ set_myanmar_properties (hb_glyph_info_t &info) case 0x108F: case 0x109A: case 0x109B: case 0x109C: cat = (indic_category_t) OT_SM; break; + + case 0x104A: case 0x104B: + cat = (indic_category_t) OT_P; + break; } if (cat == OT_M) @@ -396,6 +416,16 @@ initial_reordering_broken_cluster (const hb_ot_shape_plan_t *plan, } static void +initial_reordering_punctuation_cluster (const hb_ot_shape_plan_t *plan HB_UNUSED, + hb_face_t *face HB_UNUSED, + hb_buffer_t *buffer HB_UNUSED, + unsigned int start HB_UNUSED, unsigned int end HB_UNUSED) +{ + /* Nothing to do right now. If we ever switch to using the output + * buffer in the reordering process, we'd need to next_glyph() here. */ +} + +static void initial_reordering_non_myanmar_cluster (const hb_ot_shape_plan_t *plan HB_UNUSED, hb_face_t *face HB_UNUSED, hb_buffer_t *buffer HB_UNUSED, @@ -415,6 +445,7 @@ initial_reordering_syllable (const hb_ot_shape_plan_t *plan, syllable_type_t syllable_type = (syllable_type_t) (buffer->info[start].syllable() & 0x0F); switch (syllable_type) { case consonant_syllable: initial_reordering_consonant_syllable (plan, face, buffer, start, end); return; + case punctuation_cluster: initial_reordering_punctuation_cluster (plan, face, buffer, start, end); return; case broken_cluster: initial_reordering_broken_cluster (plan, face, buffer, start, end); return; case non_myanmar_cluster: initial_reordering_non_myanmar_cluster (plan, face, buffer, start, end); return; } |