diff --git a/src/hb-config.hh b/src/hb-config.hh index e02694bef..381146c55 100644 --- a/src/hb-config.hh +++ b/src/hb-config.hh @@ -58,6 +58,7 @@ #define HB_NO_CFF #define HB_NO_COLOR #define HB_NO_GETENV +#define HB_NO_LANGUAGE_PRIVATE_SUBTAG #define HB_NO_LAYOUT_UNUSED #define HB_NO_MATH #define HB_NO_MMAP diff --git a/src/hb-ot-tag.cc b/src/hb-ot-tag.cc index e3d1aa732..e63045894 100644 --- a/src/hb-ot-tag.cc +++ b/src/hb-ot-tag.cc @@ -305,6 +305,10 @@ parse_private_use_subtag (const char *private_use_subtag, const char *prefix, unsigned char (*normalize) (unsigned char)) { +#ifdef HB_NO_LANGUAGE_PRIVATE_SUBTAG + return false; +#endif + if (!(private_use_subtag && count && tags && *count)) return false; const char *s = strstr (private_use_subtag, prefix);