[config] Add HB_NO_FACE_COLLECT_UNICODES
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
diff --git a/src/hb-config.hh b/src/hb-config.hh
index d7ecf7d..92f0d55 100644
--- a/src/hb-config.hh
+++ b/src/hb-config.hh
@@ -57,6 +57,7 @@
#define HB_NO_BITMAP
#define HB_NO_CFF
#define HB_NO_COLOR
+#define HB_NO_FACE_COLLECT_UNICODES
#define HB_NO_GETENV
#define HB_NO_HINTING
#define HB_NO_LANGUAGE_PRIVATE_SUBTAG
diff --git a/src/hb-face.cc b/src/hb-face.cc
index 375ef92..1098adb 100644
--- a/src/hb-face.cc
+++ b/src/hb-face.cc
@@ -531,6 +531,7 @@
*/
+#ifndef HB_NO_FACE_COLLECT_UNICODES
/**
* hb_face_collect_unicodes:
* @face: font face.
@@ -544,7 +545,6 @@
{
face->table.cmap->collect_unicodes (out);
}
-
/**
* hb_face_collect_variation_selectors:
* @face: font face.
@@ -560,7 +560,6 @@
{
face->table.cmap->collect_variation_selectors (out);
}
-
/**
* hb_face_collect_variation_unicodes:
* @face: font face.
@@ -577,7 +576,7 @@
{
face->table.cmap->collect_variation_unicodes (variation_selector, out);
}
-
+#endif
/*
diff --git a/src/hb-ot-face-table-list.hh b/src/hb-ot-face-table-list.hh
index e4ed6b0..d07f53c 100644
--- a/src/hb-ot-face-table-list.hh
+++ b/src/hb-ot-face-table-list.hh
@@ -47,7 +47,9 @@
/* OpenType fundamentals. */
HB_OT_TABLE (OT, head)
+#if !defined(HB_NO_FACE_COLLECT_UNICODES) || !defined(HB_NO_OT_FONT)
HB_OT_ACCELERATOR (OT, cmap)
+#endif
HB_OT_ACCELERATOR (OT, hmtx)
HB_OT_TABLE (OT, OS2)
#ifndef HB_NO_OT_FONT_GLYPH_NAMES