diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 68c512c7d..e21886182 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -149,13 +149,15 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan, * Decide who does positioning. GPOS, kerx, kern, or fallback. */ + bool has_gsub = hb_ot_layout_has_substitution (face); + bool has_gpos = !disable_gpos && hb_ot_layout_has_positioning (face); if (0) ; #ifndef HB_NO_AAT_SHAPE - else if (hb_aat_layout_has_positioning (face)) + else if (hb_aat_layout_has_positioning (face) && !(has_gsub && has_gpos)) plan.apply_kerx = true; #endif - else if (!apply_morx && !disable_gpos && hb_ot_layout_has_positioning (face)) + else if (!apply_morx && has_gpos) plan.apply_gpos = true; if (!plan.apply_kerx && (!has_gpos_kern || !plan.apply_gpos)) diff --git a/test/shaping/data/in-house/tests/macos.tests b/test/shaping/data/in-house/tests/macos.tests index 38c0ac789..92d806281 100644 --- a/test/shaping/data/in-house/tests/macos.tests +++ b/test/shaping/data/in-house/tests/macos.tests @@ -1,3 +1,6 @@ +# https://github.com/harfbuzz/harfbuzz/issues/3008 +/System/Library/Fonts/ヒラギノ丸ゴ\ ProN\ W4.ttc:--features=palt:U+FF11:[gid781=0@-78,0+842] + # https://github.com/harfbuzz/harfbuzz/pull/2871 /System/Library/Fonts/LucidaGrande.ttc:--font-funcs ot --show-flags:U+0041,U+0042,U+0043,U+0044:[A=0+1413|B=1+1178|C=2+1417|D=3+1534]