s/ot_complex_shaper/ot_shaper/g

This commit is contained in:
Behdad Esfahbod 2022-06-03 02:42:34 -06:00
parent e5161977a4
commit 44a7b3b773
13 changed files with 34 additions and 34 deletions

View File

@ -5,7 +5,7 @@
It creates ``_hb_preprocess_text_vowel_constraints``, which inserts dotted It creates ``_hb_preprocess_text_vowel_constraints``, which inserts dotted
circles into sequences prohibited by the USE script development spec. circles into sequences prohibited by the USE script development spec.
This function should be used as the ``preprocess_text`` of an 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 usage: ./gen-vowel-constraints.py ms-use/IndicShapingInvalidCluster.txt Scripts.txt

View File

@ -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, collect_features_arabic,
nullptr, /* override_features */ nullptr, /* override_features */

View File

@ -31,7 +31,7 @@
#include "hb-ot-shape-complex.hh" #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, /* collect_features */
nullptr, /* override_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. /* Same as default but no mark advance zeroing / fallback positioning.
* Dumbest shaper ever, basically. */ * 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, /* collect_features */
nullptr, /* override_features */ nullptr, /* override_features */

View File

@ -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, collect_features_hangul,
override_features_hangul, override_features_hangul,

View File

@ -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, /* collect_features */
nullptr, /* override_features */ nullptr, /* override_features */

View File

@ -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, collect_features_indic,
override_features_indic, override_features_indic,

View File

@ -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, collect_features_khmer,
override_features_khmer, override_features_khmer,

View File

@ -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, collect_features_myanmar,
nullptr, /* override_features */ nullptr, /* override_features */
@ -296,7 +296,7 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar =
/* Ugly Zawgyi encoding. /* Ugly Zawgyi encoding.
* Disable all auto processing. * Disable all auto processing.
* https://github.com/harfbuzz/harfbuzz/issues/1162 */ * 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, /* collect_features */
nullptr, /* override_features */ nullptr, /* override_features */

View File

@ -371,7 +371,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
do_thai_pua_shaping (plan, buffer, font); 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, /* collect_features */
nullptr, /* override_features */ nullptr, /* override_features */

View File

@ -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, collect_features_use,
nullptr, /* override_features */ nullptr, /* override_features */

View File

@ -64,7 +64,7 @@ enum hb_ot_shape_zero_width_marks_type_t {
/* ^--- Add new shapers here; keep sorted. */ /* ^--- Add new shapers here; keep sorted. */
struct hb_ot_complex_shaper_t struct hb_ot_shaper_t
{ {
/* collect_features() /* collect_features()
* Called during shape_plan(). * Called during shape_plan().
@ -168,18 +168,18 @@ struct hb_ot_complex_shaper_t
bool fallback_position; 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 HB_OT_SHAPERS_IMPLEMENT_SHAPERS
#undef HB_OT_SHAPER_IMPLEMENT #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) hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
{ {
switch ((hb_tag_t) planner->props.script) switch ((hb_tag_t) planner->props.script)
{ {
default: default:
return &_hb_ot_complex_shaper_default; return &_hb_ot_shaper_default;
/* Unicode-1.1 additions */ /* 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 || if ((planner->map.chosen_script[0] != HB_OT_TAG_DEFAULT_SCRIPT ||
planner->props.script == HB_SCRIPT_ARABIC) && planner->props.script == HB_SCRIPT_ARABIC) &&
HB_DIRECTION_IS_HORIZONTAL(planner->props.direction)) HB_DIRECTION_IS_HORIZONTAL(planner->props.direction))
return &_hb_ot_complex_shaper_arabic; return &_hb_ot_shaper_arabic;
else else
return &_hb_ot_complex_shaper_default; return &_hb_ot_shaper_default;
/* Unicode-1.1 additions */ /* Unicode-1.1 additions */
case HB_SCRIPT_THAI: case HB_SCRIPT_THAI:
case HB_SCRIPT_LAO: case HB_SCRIPT_LAO:
return &_hb_ot_complex_shaper_thai; return &_hb_ot_shaper_thai;
/* Unicode-1.1 additions */ /* Unicode-1.1 additions */
case HB_SCRIPT_HANGUL: case HB_SCRIPT_HANGUL:
return &_hb_ot_complex_shaper_hangul; return &_hb_ot_shaper_hangul;
/* Unicode-1.1 additions */ /* Unicode-1.1 additions */
case HB_SCRIPT_HEBREW: case HB_SCRIPT_HEBREW:
return &_hb_ot_complex_shaper_hebrew; return &_hb_ot_shaper_hebrew;
/* Unicode-1.1 additions */ /* 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 it's indy3 tag, send to USE. */
if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T') || 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 ('l','a','t','n'))
return &_hb_ot_complex_shaper_default; return &_hb_ot_shaper_default;
else if ((planner->map.chosen_script[0] & 0x000000FF) == '3') else if ((planner->map.chosen_script[0] & 0x000000FF) == '3')
return &_hb_ot_complex_shaper_use; return &_hb_ot_shaper_use;
else else
return &_hb_ot_complex_shaper_indic; return &_hb_ot_shaper_indic;
case HB_SCRIPT_KHMER: case HB_SCRIPT_KHMER:
return &_hb_ot_complex_shaper_khmer; return &_hb_ot_shaper_khmer;
case HB_SCRIPT_MYANMAR: case HB_SCRIPT_MYANMAR:
/* If the designer designed the font for the 'DFLT' script, /* 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') || 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 ('l','a','t','n') ||
planner->map.chosen_script[0] == HB_TAG ('m','y','m','r')) planner->map.chosen_script[0] == HB_TAG ('m','y','m','r'))
return &_hb_ot_complex_shaper_default; return &_hb_ot_shaper_default;
else 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')) #define HB_SCRIPT_MYANMAR_ZAWGYI ((hb_script_t) HB_TAG ('Q','a','a','g'))
case HB_SCRIPT_MYANMAR_ZAWGYI: case HB_SCRIPT_MYANMAR_ZAWGYI:
/* https://github.com/harfbuzz/harfbuzz/issues/1162 */ /* https://github.com/harfbuzz/harfbuzz/issues/1162 */
return &_hb_ot_complex_shaper_myanmar_zawgyi; return &_hb_ot_shaper_myanmar_zawgyi;
/* Unicode-2.0 additions */ /* 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! */ * GSUB/GPOS needed, so there may be no scripts found! */
if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T') || 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 ('l','a','t','n'))
return &_hb_ot_complex_shaper_default; return &_hb_ot_shaper_default;
else else
return &_hb_ot_complex_shaper_use; return &_hb_ot_shaper_use;
} }
} }

View File

@ -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; script_fallback_mark_positioning = shaper->fallback_position;
/* https://github.com/harfbuzz/harfbuzz/issues/1528 */ /* https://github.com/harfbuzz/harfbuzz/issues/1528 */
if (apply_morx && shaper != &_hb_ot_complex_shaper_default) if (apply_morx && shaper != &_hb_ot_shaper_default)
shaper = &_hb_ot_complex_shaper_dumber; shaper = &_hb_ot_shaper_dumber;
} }
void void

View File

@ -61,7 +61,7 @@ struct hb_shape_plan_key_t;
struct hb_ot_shape_plan_t struct hb_ot_shape_plan_t
{ {
hb_segment_properties_t props; 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_ot_map_t map;
hb_aat_map_t aat_map; hb_aat_map_t aat_map;
const void *data; const void *data;
@ -158,7 +158,7 @@ struct hb_ot_shape_planner_t
#endif #endif
bool script_zero_marks : 1; bool script_zero_marks : 1;
bool script_fallback_mark_positioning : 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, HB_INTERNAL hb_ot_shape_planner_t (hb_face_t *face,
const hb_segment_properties_t *props); const hb_segment_properties_t *props);