--- old/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-use.cc 2017-11-30 10:47:08.185458210 -0800 +++ new/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-use.cc 2017-11-30 10:47:08.041458214 -0800 @@ -144,7 +144,7 @@ /* "Topographical features" */ for (unsigned int i = 0; i < ARRAY_LENGTH (arabic_features); i++) map->add_feature (arabic_features[i], 1, F_NONE); - map->add_gsub_pause (NULL); + map->add_gsub_pause (nullptr); /* "Standard typographic presentation" and "Positional feature application" */ for (unsigned int i = 0; i < ARRAY_LENGTH (other_features); i++) @@ -199,7 +199,7 @@ { use_shape_plan_t *use_plan = (use_shape_plan_t *) calloc (1, sizeof (use_shape_plan_t)); if (unlikely (!use_plan)) - return NULL; + return nullptr; use_plan->rphf_mask = plan->map.get_1_mask (HB_TAG('r','p','h','f')); @@ -209,7 +209,7 @@ if (unlikely (!use_plan->arabic_plan)) { free (use_plan); - return NULL; + return nullptr; } } @@ -292,7 +292,7 @@ if (use_plan->arabic_plan) return; - ASSERT_STATIC (INIT < 4 && ISOL < 4 && MEDI < 4 && FINA < 4); + static_assert ((INIT < 4 && ISOL < 4 && MEDI < 4 && FINA < 4), ""); hb_mask_t masks[4], all_masks = 0; for (unsigned int i = 0; i < 4; i++) { @@ -354,6 +354,8 @@ hb_buffer_t *buffer) { find_syllables (buffer); + foreach_syllable (buffer, start, end) + buffer->unsafe_to_break (start, end); setup_rphf_mask (plan, buffer); setup_topographical_masks (plan, buffer); } @@ -422,7 +424,7 @@ { syllable_type_t syllable_type = (syllable_type_t) (buffer->info[start].syllable() & 0x0F); /* Only a few syllable types need reordering. */ - if (unlikely (!(FLAG_SAFE (syllable_type) & + if (unlikely (!(FLAG_UNSAFE (syllable_type) & (FLAG (virama_terminated_cluster) | FLAG (standard_cluster) | FLAG (broken_cluster) | @@ -572,28 +574,6 @@ */ case 0x1112Eu : *a = 0x11127u; *b= 0x11131u; return true; case 0x1112Fu : *a = 0x11127u; *b= 0x11132u; return true; - - /* - * Decompose split matras that don't have Unicode decompositions. - */ - - /* Limbu */ - case 0x1925u : *a = 0x1920u; *b= 0x1923u; return true; - case 0x1926u : *a = 0x1920u; *b= 0x1924u; return true; - - /* Balinese */ - case 0x1B3Cu : *a = 0x1B42u; *b= 0x1B3Cu; return true; - -#if 0 - /* Lepcha */ - case 0x1C29u : *a = no decomp, -> LEFT; return true; - - /* Javanese */ - case 0xA9C0u : *a = no decomp, -> RIGHT; return true; - - /* Sharada */ - case 0x111BFu : *a = no decomp, -> ABOVE; return true; -#endif } return (bool) c->unicode->decompose (ab, a, b); @@ -615,18 +595,18 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_use = { - "use", collect_features_use, - NULL, /* override_features */ + nullptr, /* override_features */ data_create_use, data_destroy_use, - NULL, /* preprocess_text */ - NULL, /* postprocess_glyphs */ + nullptr, /* preprocess_text */ + nullptr, /* postprocess_glyphs */ HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT, decompose_use, compose_use, setup_masks_use, - NULL, /* disable_otl */ + nullptr, /* disable_otl */ + nullptr, /* reorder_marks */ HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY, false, /* fallback_position */ };