[shape] Fix syntax error under some configs

Fixes https://github.com/harfbuzz/harfbuzz/issues/4635
This commit is contained in:
Behdad Esfahbod 2024-03-22 10:37:39 -06:00
parent 3c8d448fa1
commit 3d86b36054

View file

@ -155,7 +155,7 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
#endif
bool has_gpos = !disable_gpos && hb_ot_layout_has_positioning (face);
if (false)
;
{}
#ifndef HB_NO_AAT_SHAPE
/* Prefer GPOS over kerx if GSUB is present;
* https://github.com/harfbuzz/harfbuzz/issues/3008 */
@ -167,15 +167,16 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
if (!plan.apply_kerx && (!has_gpos_kern || !plan.apply_gpos))
{
if (false) {}
#ifndef HB_NO_AAT_SHAPE
if (has_kerx)
else if (has_kerx)
plan.apply_kerx = true;
else
#endif
#ifndef HB_NO_OT_KERN
if (hb_ot_layout_has_kerning (face))
else if (hb_ot_layout_has_kerning (face))
plan.apply_kern = true;
#endif
else {}
}
plan.apply_fallback_kern = !(plan.apply_gpos || plan.apply_kerx || plan.apply_kern);