Prefer GPOS over kerx, if GSUB was applied
Fixes https://github.com/harfbuzz/harfbuzz/issues/3008
This commit is contained in:
parent
13c6ad980f
commit
5bc05ba155
|
@ -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.
|
* 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)
|
if (0)
|
||||||
;
|
;
|
||||||
#ifndef HB_NO_AAT_SHAPE
|
#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;
|
plan.apply_kerx = true;
|
||||||
#endif
|
#endif
|
||||||
else if (!apply_morx && !disable_gpos && hb_ot_layout_has_positioning (face))
|
else if (!apply_morx && has_gpos)
|
||||||
plan.apply_gpos = true;
|
plan.apply_gpos = true;
|
||||||
|
|
||||||
if (!plan.apply_kerx && (!has_gpos_kern || !plan.apply_gpos))
|
if (!plan.apply_kerx && (!has_gpos_kern || !plan.apply_gpos))
|
||||||
|
|
|
@ -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
|
# 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]
|
/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]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue