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 ();