From 27de7c44fe80e69c527578c99c26280ba9f26c15 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 19 Jun 2019 20:07:02 -0700 Subject: [PATCH] [config] Add HB_NO_FACE_COLLECT_UNICODES Part of https://github.com/harfbuzz/harfbuzz/issues/1652 --- src/hb-config.hh | 1 + src/hb-face.cc | 5 ++--- src/hb-ot-face-table-list.hh | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hb-config.hh b/src/hb-config.hh index d7ecf7d4c..92f0d5594 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 375ef9293..1098adb33 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -531,6 +531,7 @@ hb_face_get_table_tags (const hb_face_t *face, */ +#ifndef HB_NO_FACE_COLLECT_UNICODES /** * hb_face_collect_unicodes: * @face: font face. @@ -544,7 +545,6 @@ hb_face_collect_unicodes (hb_face_t *face, { face->table.cmap->collect_unicodes (out); } - /** * hb_face_collect_variation_selectors: * @face: font face. @@ -560,7 +560,6 @@ hb_face_collect_variation_selectors (hb_face_t *face, { face->table.cmap->collect_variation_selectors (out); } - /** * hb_face_collect_variation_unicodes: * @face: font face. @@ -577,7 +576,7 @@ hb_face_collect_variation_unicodes (hb_face_t *face, { 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 e4ed6b07d..d07f53c2b 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