From 91c2f098d09b36c25e4e849bf65483aa030c3f22 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 Feb 2023 14:15:16 -0700 Subject: [PATCH] [cubic-glyf] Add HB_NO_CUBIC_GLYF --- src/OT/glyf/path-builder.hh | 4 ++++ src/hb-config.hh | 1 + 2 files changed, 5 insertions(+) diff --git a/src/OT/glyf/path-builder.hh b/src/OT/glyf/path-builder.hh index 0b2b913c1..553c3d381 100644 --- a/src/OT/glyf/path-builder.hh +++ b/src/OT/glyf/path-builder.hh @@ -42,7 +42,11 @@ struct path_builder_t void consume_point (const contour_point_t &point) { bool is_on_curve = point.flag & glyf_impl::SimpleGlyph::FLAG_ON_CURVE; +#ifdef HB_NO_CUBIC_GLYF + bool is_cubic = false; +#else bool is_cubic = !is_on_curve && (point.flag & glyf_impl::SimpleGlyph::FLAG_CUBIC); +#endif optional_point_t p (font->em_fscalef_x (point.x), font->em_fscalef_y (point.y)); if (!first_oncurve) { diff --git a/src/hb-config.hh b/src/hb-config.hh index 0ff1f1c24..047518b87 100644 --- a/src/hb-config.hh +++ b/src/hb-config.hh @@ -37,6 +37,7 @@ #ifndef HB_EXPERIMENTAL_API #define HB_NO_BEYOND_64K +#define HB_NO_CUBIC_GLYF #define HB_NO_VAR_COMPOSITES #endif