diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-08 13:30:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-08 13:30:26 +0100 |
commit | 02f9ccf3488eada0a624841376ccf5e6e10cd612 (patch) | |
tree | d79358f4ee29b88a99b2245b224906cbb58ee8d0 /thirdparty/harfbuzz/src/hb-ot-shape.cc | |
parent | 6c8a1683a559042e8499b8037168749d8086aa63 (diff) | |
parent | da8aedfc171843388a1743b107dea5a98a6ab6eb (diff) |
Merge pull request #54586 from bruvzg/hb310
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-ot-shape.cc')
-rw-r--r-- | thirdparty/harfbuzz/src/hb-ot-shape.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape.cc b/thirdparty/harfbuzz/src/hb-ot-shape.cc index 0e215c24f7..4e8a4bc3d1 100644 --- a/thirdparty/harfbuzz/src/hb-ot-shape.cc +++ b/thirdparty/harfbuzz/src/hb-ot-shape.cc @@ -150,23 +150,25 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan, */ #ifndef HB_NO_AAT_SHAPE - bool has_gsub = hb_ot_layout_has_substitution (face); + bool has_kerx = hb_aat_layout_has_positioning (face); + bool has_gsub = !apply_morx && hb_ot_layout_has_substitution (face); #endif bool has_gpos = !disable_gpos && hb_ot_layout_has_positioning (face); if (false) ; #ifndef HB_NO_AAT_SHAPE - else if (hb_aat_layout_has_positioning (face) && !(has_gsub && has_gpos)) + /* Prefer GPOS over kerx if GSUB is present; + * https://github.com/harfbuzz/harfbuzz/issues/3008 */ + else if (has_kerx && !(has_gsub && has_gpos)) plan.apply_kerx = true; #endif - else if (!apply_morx && has_gpos) + else if (has_gpos) plan.apply_gpos = true; if (!plan.apply_kerx && (!has_gpos_kern || !plan.apply_gpos)) { - /* Apparently Apple applies kerx if GPOS kern was not applied. */ #ifndef HB_NO_AAT_SHAPE - if (hb_aat_layout_has_positioning (face)) + if (has_kerx) plan.apply_kerx = true; else #endif |