mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 17:44:06 +01:00
Merge pull request #5609 from harfbuzz/most-shapers-disable-kern-table
[shape] Disable `kern` table in most shapers
This commit is contained in:
3 files changed
+5
-5
No files matched your search
+3
-3
@@ -93,7 +93,7 @@ hb_ot_shape_planner_t::hb_ot_shape_planner_t (hb_face_t *fac
|
||||
shaper = hb_ot_shaper_categorize (props.script, props.direction, map.chosen_script[0]);
|
||||
|
||||
script_zero_marks = shaper->zero_width_marks != HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE;
|
||||
script_fallback_mark_positioning = shaper->fallback_position;
|
||||
script_fallback_position = shaper->fallback_position;
|
||||
|
||||
#ifndef HB_NO_AAT_SHAPE
|
||||
/* https://github.com/harfbuzz/harfbuzz/issues/1528 */
|
||||
@@ -179,7 +179,7 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
|
||||
#endif
|
||||
#ifndef HB_NO_OT_KERN
|
||||
else if (hb_ot_layout_has_kerning (face))
|
||||
plan.apply_kern = true;
|
||||
plan.apply_kern = script_fallback_position; // Not all shapers apply legacy `kern`
|
||||
#endif
|
||||
else {}
|
||||
}
|
||||
@@ -204,7 +204,7 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
|
||||
);
|
||||
|
||||
plan.fallback_mark_positioning = plan.adjust_mark_positioning_when_zeroing &&
|
||||
script_fallback_mark_positioning;
|
||||
script_fallback_position;
|
||||
|
||||
#ifndef HB_NO_AAT_SHAPE
|
||||
/* If we're using morx shaping, we cancel mark position adjustment because
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ struct hb_ot_shape_planner_t
|
||||
static constexpr bool apply_morx = false;
|
||||
#endif
|
||||
bool script_zero_marks : 1;
|
||||
bool script_fallback_mark_positioning : 1;
|
||||
bool script_fallback_position : 1;
|
||||
const struct hb_ot_shaper_t *shaper;
|
||||
|
||||
HB_INTERNAL hb_ot_shape_planner_t (hb_face_t *face,
|
||||
|
||||
@@ -427,7 +427,7 @@ const hb_ot_shaper_t _hb_ot_shaper_hangul =
|
||||
HB_TAG_NONE, /* gpos_tag */
|
||||
HB_OT_SHAPE_NORMALIZATION_MODE_NONE,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
|
||||
false, /* fallback_position */
|
||||
true, /* fallback_position */
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user