diff --git a/src/gen-vowel-constraints.py b/src/gen-vowel-constraints.py index 42afd281e..3c19b46da 100755 --- a/src/gen-vowel-constraints.py +++ b/src/gen-vowel-constraints.py @@ -5,7 +5,7 @@ It creates ``_hb_preprocess_text_vowel_constraints``, which inserts dotted circles into sequences prohibited by the USE script development spec. This function should be used as the ``preprocess_text`` of an -``hb_ot_complex_shaper_t``. +``hb_ot_shaper_t``. usage: ./gen-vowel-constraints.py ms-use/IndicShapingInvalidCluster.txt Scripts.txt diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index 224f8b842..a7763497b 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -720,7 +720,7 @@ reorder_marks_arabic (const hb_ot_shape_plan_t *plan HB_UNUSED, } } -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_arabic = +const hb_ot_shaper_t _hb_ot_shaper_arabic = { collect_features_arabic, nullptr, /* override_features */ diff --git a/src/hb-ot-shape-complex-default.cc b/src/hb-ot-shape-complex-default.cc index a755aea09..aa089ed33 100644 --- a/src/hb-ot-shape-complex-default.cc +++ b/src/hb-ot-shape-complex-default.cc @@ -31,7 +31,7 @@ #include "hb-ot-shape-complex.hh" -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_default = +const hb_ot_shaper_t _hb_ot_shaper_default = { nullptr, /* collect_features */ nullptr, /* override_features */ @@ -51,7 +51,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_default = /* Same as default but no mark advance zeroing / fallback positioning. * Dumbest shaper ever, basically. */ -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_dumber = +const hb_ot_shaper_t _hb_ot_shaper_dumber = { nullptr, /* collect_features */ nullptr, /* override_features */ diff --git a/src/hb-ot-shape-complex-hangul.cc b/src/hb-ot-shape-complex-hangul.cc index 3bc9e9b96..2981ba33c 100644 --- a/src/hb-ot-shape-complex-hangul.cc +++ b/src/hb-ot-shape-complex-hangul.cc @@ -414,7 +414,7 @@ setup_masks_hangul (const hb_ot_shape_plan_t *plan, } -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hangul = +const hb_ot_shaper_t _hb_ot_shaper_hangul = { collect_features_hangul, override_features_hangul, diff --git a/src/hb-ot-shape-complex-hebrew.cc b/src/hb-ot-shape-complex-hebrew.cc index 334d3ded8..e6bf6731b 100644 --- a/src/hb-ot-shape-complex-hebrew.cc +++ b/src/hb-ot-shape-complex-hebrew.cc @@ -163,7 +163,7 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c, } -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew = +const hb_ot_shaper_t _hb_ot_shaper_hebrew = { nullptr, /* collect_features */ nullptr, /* override_features */ diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index c80f7df6a..eb9e0da58 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -1548,7 +1548,7 @@ compose_indic (const hb_ot_shape_normalize_context_t *c, } -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_indic = +const hb_ot_shaper_t _hb_ot_shaper_indic = { collect_features_indic, override_features_indic, diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index a7d5bf574..0f58d3bc2 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -349,7 +349,7 @@ compose_khmer (const hb_ot_shape_normalize_context_t *c, } -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_khmer = +const hb_ot_shaper_t _hb_ot_shaper_khmer = { collect_features_khmer, override_features_khmer, diff --git a/src/hb-ot-shape-complex-myanmar.cc b/src/hb-ot-shape-complex-myanmar.cc index 13beaf4d4..e0e46be3c 100644 --- a/src/hb-ot-shape-complex-myanmar.cc +++ b/src/hb-ot-shape-complex-myanmar.cc @@ -274,7 +274,7 @@ reorder_myanmar (const hb_ot_shape_plan_t *plan, } -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar = +const hb_ot_shaper_t _hb_ot_shaper_myanmar = { collect_features_myanmar, nullptr, /* override_features */ @@ -296,7 +296,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar = /* Ugly Zawgyi encoding. * Disable all auto processing. * https://github.com/harfbuzz/harfbuzz/issues/1162 */ -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar_zawgyi = +const hb_ot_shaper_t _hb_ot_shaper_myanmar_zawgyi = { nullptr, /* collect_features */ nullptr, /* override_features */ diff --git a/src/hb-ot-shape-complex-thai.cc b/src/hb-ot-shape-complex-thai.cc index a1e27a83b..1c778bf11 100644 --- a/src/hb-ot-shape-complex-thai.cc +++ b/src/hb-ot-shape-complex-thai.cc @@ -371,7 +371,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan, do_thai_pua_shaping (plan, buffer, font); } -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_thai = +const hb_ot_shaper_t _hb_ot_shaper_thai = { nullptr, /* collect_features */ nullptr, /* override_features */ diff --git a/src/hb-ot-shape-complex-use.cc b/src/hb-ot-shape-complex-use.cc index 1d13c8a12..5f800d93a 100644 --- a/src/hb-ot-shape-complex-use.cc +++ b/src/hb-ot-shape-complex-use.cc @@ -480,7 +480,7 @@ compose_use (const hb_ot_shape_normalize_context_t *c, } -const hb_ot_complex_shaper_t _hb_ot_complex_shaper_use = +const hb_ot_shaper_t _hb_ot_shaper_use = { collect_features_use, nullptr, /* override_features */ diff --git a/src/hb-ot-shape-complex.hh b/src/hb-ot-shape-complex.hh index 4dfd71403..06ccb5f64 100644 --- a/src/hb-ot-shape-complex.hh +++ b/src/hb-ot-shape-complex.hh @@ -64,7 +64,7 @@ enum hb_ot_shape_zero_width_marks_type_t { /* ^--- Add new shapers here; keep sorted. */ -struct hb_ot_complex_shaper_t +struct hb_ot_shaper_t { /* collect_features() * Called during shape_plan(). @@ -168,18 +168,18 @@ struct hb_ot_complex_shaper_t bool fallback_position; }; -#define HB_OT_SHAPER_IMPLEMENT(name) extern HB_INTERNAL const hb_ot_complex_shaper_t _hb_ot_complex_shaper_##name; +#define HB_OT_SHAPER_IMPLEMENT(name) extern HB_INTERNAL const hb_ot_shaper_t _hb_ot_shaper_##name; HB_OT_SHAPERS_IMPLEMENT_SHAPERS #undef HB_OT_SHAPER_IMPLEMENT -static inline const hb_ot_complex_shaper_t * +static inline const hb_ot_shaper_t * hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) { switch ((hb_tag_t) planner->props.script) { default: - return &_hb_ot_complex_shaper_default; + return &_hb_ot_shaper_default; /* Unicode-1.1 additions */ @@ -195,28 +195,28 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) if ((planner->map.chosen_script[0] != HB_OT_TAG_DEFAULT_SCRIPT || planner->props.script == HB_SCRIPT_ARABIC) && HB_DIRECTION_IS_HORIZONTAL(planner->props.direction)) - return &_hb_ot_complex_shaper_arabic; + return &_hb_ot_shaper_arabic; else - return &_hb_ot_complex_shaper_default; + return &_hb_ot_shaper_default; /* Unicode-1.1 additions */ case HB_SCRIPT_THAI: case HB_SCRIPT_LAO: - return &_hb_ot_complex_shaper_thai; + return &_hb_ot_shaper_thai; /* Unicode-1.1 additions */ case HB_SCRIPT_HANGUL: - return &_hb_ot_complex_shaper_hangul; + return &_hb_ot_shaper_hangul; /* Unicode-1.1 additions */ case HB_SCRIPT_HEBREW: - return &_hb_ot_complex_shaper_hebrew; + return &_hb_ot_shaper_hebrew; /* Unicode-1.1 additions */ @@ -240,14 +240,14 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) * If it's indy3 tag, send to USE. */ if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T') || planner->map.chosen_script[0] == HB_TAG ('l','a','t','n')) - return &_hb_ot_complex_shaper_default; + return &_hb_ot_shaper_default; else if ((planner->map.chosen_script[0] & 0x000000FF) == '3') - return &_hb_ot_complex_shaper_use; + return &_hb_ot_shaper_use; else - return &_hb_ot_complex_shaper_indic; + return &_hb_ot_shaper_indic; case HB_SCRIPT_KHMER: - return &_hb_ot_complex_shaper_khmer; + return &_hb_ot_shaper_khmer; case HB_SCRIPT_MYANMAR: /* If the designer designed the font for the 'DFLT' script, @@ -260,16 +260,16 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T') || planner->map.chosen_script[0] == HB_TAG ('l','a','t','n') || planner->map.chosen_script[0] == HB_TAG ('m','y','m','r')) - return &_hb_ot_complex_shaper_default; + return &_hb_ot_shaper_default; else - return &_hb_ot_complex_shaper_myanmar; + return &_hb_ot_shaper_myanmar; #define HB_SCRIPT_MYANMAR_ZAWGYI ((hb_script_t) HB_TAG ('Q','a','a','g')) case HB_SCRIPT_MYANMAR_ZAWGYI: /* https://github.com/harfbuzz/harfbuzz/issues/1162 */ - return &_hb_ot_complex_shaper_myanmar_zawgyi; + return &_hb_ot_shaper_myanmar_zawgyi; /* Unicode-2.0 additions */ @@ -390,9 +390,9 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner) * GSUB/GPOS needed, so there may be no scripts found! */ if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T') || planner->map.chosen_script[0] == HB_TAG ('l','a','t','n')) - return &_hb_ot_complex_shaper_default; + return &_hb_ot_shaper_default; else - return &_hb_ot_complex_shaper_use; + return &_hb_ot_shaper_use; } } diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index aa07c5914..a381cf3ec 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -92,8 +92,8 @@ hb_ot_shape_planner_t::hb_ot_shape_planner_t (hb_face_t *fac script_fallback_mark_positioning = shaper->fallback_position; /* https://github.com/harfbuzz/harfbuzz/issues/1528 */ - if (apply_morx && shaper != &_hb_ot_complex_shaper_default) - shaper = &_hb_ot_complex_shaper_dumber; + if (apply_morx && shaper != &_hb_ot_shaper_default) + shaper = &_hb_ot_shaper_dumber; } void diff --git a/src/hb-ot-shape.hh b/src/hb-ot-shape.hh index e8c81015c..17fa58b33 100644 --- a/src/hb-ot-shape.hh +++ b/src/hb-ot-shape.hh @@ -61,7 +61,7 @@ struct hb_shape_plan_key_t; struct hb_ot_shape_plan_t { hb_segment_properties_t props; - const struct hb_ot_complex_shaper_t *shaper; + const struct hb_ot_shaper_t *shaper; hb_ot_map_t map; hb_aat_map_t aat_map; const void *data; @@ -158,7 +158,7 @@ struct hb_ot_shape_planner_t #endif bool script_zero_marks : 1; bool script_fallback_mark_positioning : 1; - const struct hb_ot_complex_shaper_t *shaper; + const struct hb_ot_shaper_t *shaper; HB_INTERNAL hb_ot_shape_planner_t (hb_face_t *face, const hb_segment_properties_t *props);