From 4d5fb233e3fb45bb6ebdaab15029f571db4f6ccb Mon Sep 17 00:00:00 2001 From: Qunxin Liu Date: Fri, 26 Jan 2024 16:00:58 -0800 Subject: [PATCH] fix build --- src/hb-ot-var-common.hh | 10 +++++----- src/hb-subset-plan.cc | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/hb-ot-var-common.hh b/src/hb-ot-var-common.hh index 754d1bb37..97128f211 100644 --- a/src/hb-ot-var-common.hh +++ b/src/hb-ot-var-common.hh @@ -1567,7 +1567,7 @@ struct tuple_delta_t bool force = false; if (c1 == c2) { - if (fabsf (d1 - d2) > tolerance && fabsf (dj) > tolerance) + if (abs (d1 - d2) > tolerance && abs (dj) > tolerance) force = true; } else if (c1 <= cj && cj <= c2) @@ -1582,15 +1582,15 @@ struct tuple_delta_t { if (cj < c1) { - if (fabsf (dj) > tolerance && - fabsf (dj - d1) > tolerance && + if (abs (dj) > tolerance && + abs (dj - d1) > tolerance && ((dj - tolerance < d1) != (d1 < d2))) force = true; } else { - if (fabsf (dj) > tolerance && - fabsf (dj - d2) > tolerance && + if (abs (dj) > tolerance && + abs (dj - d2) > tolerance && ((d2 < dj + tolerance) != (d1 < d2))) force = true; } diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc index d3ee81090..536c98a49 100644 --- a/src/hb-subset-plan.cc +++ b/src/hb-subset-plan.cc @@ -1098,9 +1098,11 @@ _get_instance_glyphs_contour_points (hb_subset_plan_t *plan) if (unlikely (!plan->new_gid_contour_points_map.set (new_gid, all_points))) return false; +#ifdef HB_EXPERIMENTAL_API /* composite new gids are only needed by iup delta optimization */ if ((plan->flags & HB_SUBSET_FLAGS_IUP_DELTA_OPT) && glyph.is_composite ()) plan->composite_new_gids.add (new_gid); +#endif } return true; }