From 9d5b5348c7ca1e39faa9e197fdebfb8f5d3aeece Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 26 Jun 2019 13:58:40 -0700 Subject: [PATCH] [config] Add HB_NO_SHAPER Don't know who would want when why. But makes sense to have. --- src/hb-shaper-list.hh | 6 ++++++ src/hb-shaper.cc | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/hb-shaper-list.hh b/src/hb-shaper-list.hh index c864af6ec..0d63933a7 100644 --- a/src/hb-shaper-list.hh +++ b/src/hb-shaper-list.hh @@ -28,6 +28,9 @@ #define HB_SHAPER_LIST_HH #endif /* HB_SHAPER_LIST_HH */ /* Dummy header guards */ +#ifndef HB_NO_SHAPER + + /* v--- Add new shapers in the right place here. */ #ifdef HAVE_GRAPHITE2 @@ -52,3 +55,6 @@ HB_SHAPER_IMPLEMENT (coretext) #ifndef HB_NO_FALLBACK_SHAPE HB_SHAPER_IMPLEMENT (fallback) /* <--- This should be last. */ #endif + + +#endif diff --git a/src/hb-shaper.cc b/src/hb-shaper.cc index 4858a6a9c..0ea68ad1f 100644 --- a/src/hb-shaper.cc +++ b/src/hb-shaper.cc @@ -34,7 +34,9 @@ static const hb_shaper_entry_t all_shapers[] = { #include "hb-shaper-list.hh" #undef HB_SHAPER_IMPLEMENT }; +#ifndef HB_NO_SHAPER static_assert (0 != ARRAY_LENGTH_CONST (all_shapers), "No shaper enabled."); +#endif #if HB_USE_ATEXIT static void free_static_shapers ();