--- old/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-thai.cc 2017-11-30 10:47:06.301458262 -0800 +++ new/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-thai.cc 2017-11-30 10:47:06.153458266 -0800 @@ -52,7 +52,7 @@ return RC; if (u == 0x0E0Eu || u == 0x0E0Fu) return DC; - if (hb_in_range (u, 0x0E01u, 0x0E2Eu)) + if (hb_in_range (u, 0x0E01u, 0x0E2Eu)) return NC; return NOT_CONSONANT; } @@ -70,12 +70,12 @@ static thai_mark_type_t get_mark_type (hb_codepoint_t u) { - if (u == 0x0E31u || hb_in_range (u, 0x0E34u, 0x0E37u) || - u == 0x0E47u || hb_in_range (u, 0x0E4Du, 0x0E4Eu)) + if (u == 0x0E31u || hb_in_range (u, 0x0E34u, 0x0E37u) || + u == 0x0E47u || hb_in_range (u, 0x0E4Du, 0x0E4Eu)) return AV; - if (hb_in_range (u, 0x0E38u, 0x0E3Au)) + if (hb_in_range (u, 0x0E38u, 0x0E3Au)) return BV; - if (hb_in_range (u, 0x0E48u, 0x0E4Cu)) + if (hb_in_range (u, 0x0E48u, 0x0E4Cu)) return T; return NOT_MARK; } @@ -97,7 +97,7 @@ hb_codepoint_t u; hb_codepoint_t win_pua; hb_codepoint_t mac_pua; - } const *pua_mappings = NULL; + } const *pua_mappings = nullptr; static const thai_pua_mapping_t SD_mappings[] = { {0x0E48u, 0xF70Au, 0xF88Bu}, /* MAI EK */ {0x0E49u, 0xF70Bu, 0xF88Eu}, /* MAI THO */ @@ -244,6 +244,7 @@ /* At least one of the above/below actions is NOP. */ thai_action_t action = above_edge.action != NOP ? above_edge.action : below_edge.action; + buffer->unsafe_to_break (base, i); if (action == RD) info[base].codepoint = thai_pua_shape (info[base].codepoint, action, font); else @@ -310,7 +311,7 @@ #define IS_SARA_AM(x) (((x) & ~0x0080u) == 0x0E33u) #define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0x0E33u + 0x0E4Du) #define SARA_AA_FROM_SARA_AM(x) ((x) - 1) -#define IS_TONE_MARK(x) (hb_in_ranges ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u)) +#define IS_TONE_MARK(x) (hb_in_ranges ((x) & ~0x0080u, 0x0E34u, 0x0E37u, 0x0E47u, 0x0E4Eu, 0x0E31u, 0x0E31u)) buffer->clear_output (); unsigned int count = buffer->len; @@ -365,18 +366,18 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_thai = { - "thai", - NULL, /* collect_features */ - NULL, /* override_features */ - NULL, /* data_create */ - NULL, /* data_destroy */ + nullptr, /* collect_features */ + nullptr, /* override_features */ + nullptr, /* data_create */ + nullptr, /* data_destroy */ preprocess_text_thai, - NULL, /* postprocess_glyphs */ + nullptr, /* postprocess_glyphs */ HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT, - NULL, /* decompose */ - NULL, /* compose */ - NULL, /* setup_masks */ - NULL, /* disable_otl */ + nullptr, /* decompose */ + nullptr, /* compose */ + nullptr, /* setup_masks */ + nullptr, /* disable_otl */ + nullptr, /* reorder_marks */ HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE, false,/* fallback_position */ };