| Index: third_party/harfbuzz-ng/src/hb-ot-shape-complex-private.hh
|
| ===================================================================
|
| --- third_party/harfbuzz-ng/src/hb-ot-shape-complex-private.hh (리비전 189447)
|
| +++ third_party/harfbuzz-ng/src/hb-ot-shape-complex-private.hh (작업 사본)
|
| @@ -39,12 +39,20 @@
|
| #define complex_var_u8_1() var2.u8[3]
|
|
|
|
|
| +enum hb_ot_shape_zero_width_marks_type_t {
|
| + HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
|
| + HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE,
|
| + HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF
|
| +};
|
|
|
| +
|
| /* Master OT shaper list */
|
| #define HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS \
|
| HB_COMPLEX_SHAPER_IMPLEMENT (default) /* should be first */ \
|
| HB_COMPLEX_SHAPER_IMPLEMENT (arabic) \
|
| HB_COMPLEX_SHAPER_IMPLEMENT (indic) \
|
| + HB_COMPLEX_SHAPER_IMPLEMENT (myanmar) \
|
| + HB_COMPLEX_SHAPER_IMPLEMENT (sea) \
|
| HB_COMPLEX_SHAPER_IMPLEMENT (thai) \
|
| /* ^--- Add new shapers here */
|
|
|
| @@ -130,7 +138,8 @@
|
| hb_buffer_t *buffer,
|
| hb_font_t *font);
|
|
|
| - bool zero_width_attached_marks;
|
| + hb_ot_shape_zero_width_marks_type_t zero_width_marks;
|
| +
|
| bool fallback_position;
|
| };
|
|
|
| @@ -254,13 +263,11 @@
|
|
|
| /* Unicode-4.1 additions */
|
| case HB_SCRIPT_BUGINESE:
|
| - case HB_SCRIPT_NEW_TAI_LUE:
|
|
|
| /* Unicode-5.0 additions */
|
| case HB_SCRIPT_BALINESE:
|
|
|
| /* Unicode-5.1 additions */
|
| - case HB_SCRIPT_CHAM:
|
| case HB_SCRIPT_LEPCHA:
|
| case HB_SCRIPT_REJANG:
|
| case HB_SCRIPT_SUNDANESE:
|
| @@ -269,19 +276,22 @@
|
| case HB_SCRIPT_JAVANESE:
|
| case HB_SCRIPT_KAITHI:
|
| case HB_SCRIPT_MEETEI_MAYEK:
|
| - case HB_SCRIPT_TAI_THAM:
|
|
|
| + /* Unicode-6.0 additions */
|
|
|
| /* Unicode-6.1 additions */
|
| case HB_SCRIPT_CHAKMA:
|
| case HB_SCRIPT_SHARADA:
|
| case HB_SCRIPT_TAKRI:
|
|
|
| - /* Only use Indic shaper if the font has Indic tables. */
|
| - if (planner->map.found_script[0])
|
| + /* If the designer designed the font for the 'DFLT' script,
|
| + * use the default shaper. Otherwise, use the Indic shaper.
|
| + * Note that for some simple scripts, there may not be *any*
|
| + * GSUB/GPOS needed, so there may be no scripts found! */
|
| + if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T'))
|
| + return &_hb_ot_complex_shaper_default;
|
| + else
|
| return &_hb_ot_complex_shaper_indic;
|
| - else
|
| - return &_hb_ot_complex_shaper_default;
|
|
|
| case HB_SCRIPT_KHMER:
|
| /* A number of Khmer fonts in the wild don't have a 'pref' feature,
|
| @@ -300,12 +310,30 @@
|
| return &_hb_ot_complex_shaper_default;
|
|
|
| case HB_SCRIPT_MYANMAR:
|
| - /* For Myanmar, we only want to use the Indic shaper if the "new" script
|
| + /* For Myanmar, we only want to use the Myanmar shaper if the "new" script
|
| * tag is found. For "old" script tag we want to use the default shaper. */
|
| if (planner->map.chosen_script[0] == HB_TAG ('m','y','m','2'))
|
| - return &_hb_ot_complex_shaper_indic;
|
| + return &_hb_ot_complex_shaper_myanmar;
|
| else
|
| return &_hb_ot_complex_shaper_default;
|
| +
|
| + /* Unicode-4.1 additions */
|
| + case HB_SCRIPT_NEW_TAI_LUE:
|
| +
|
| + /* Unicode-5.1 additions */
|
| + case HB_SCRIPT_CHAM:
|
| +
|
| + /* Unicode-5.2 additions */
|
| + case HB_SCRIPT_TAI_THAM:
|
| +
|
| + /* If the designer designed the font for the 'DFLT' script,
|
| + * use the default shaper. Otherwise, use the Indic shaper.
|
| + * Note that for some simple scripts, there may not be *any*
|
| + * GSUB/GPOS needed, so there may be no scripts found! */
|
| + if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T'))
|
| + return &_hb_ot_complex_shaper_default;
|
| + else
|
| + return &_hb_ot_complex_shaper_sea;
|
| }
|
| }
|
|
|
|
|