From b7762c70680324fca0c1ae26ad3b7f432c0c990e Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Fri, 24 Jan 2020 21:20:07 +0330 Subject: [PATCH] Disable hb_ot_glyph_decompose in HB_TINY --- src/hb-config.hh | 1 + src/hb-ot-glyph.cc | 2 +- src/main.cc | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hb-config.hh b/src/hb-config.hh index 14c539595..6d704a82f 100644 --- a/src/hb-config.hh +++ b/src/hb-config.hh @@ -61,6 +61,7 @@ #define HB_NO_ERRNO #define HB_NO_FACE_COLLECT_UNICODES #define HB_NO_GETENV +#define HB_NO_GLYPH #define HB_NO_HINTING #define HB_NO_LANGUAGE_PRIVATE_SUBTAG #define HB_NO_LAYOUT_FEATURE_PARAMS diff --git a/src/hb-ot-glyph.cc b/src/hb-ot-glyph.cc index 0ef565a80..1ccf681de 100644 --- a/src/hb-ot-glyph.cc +++ b/src/hb-ot-glyph.cc @@ -24,7 +24,7 @@ #include "hb.hh" -#ifndef HB_NO_OT_GLYPH +#ifndef HB_NO_GLYPH #include "hb-ot.h" #include "hb-ot-glyf-table.hh" diff --git a/src/main.cc b/src/main.cc index dae32a360..0927a1c5a 100644 --- a/src/main.cc +++ b/src/main.cc @@ -37,6 +37,7 @@ #define hb_blob_create_from_file(x) hb_blob_get_empty () #endif +#if !defined(HB_NO_COLOR) && !defined(HB_NO_GLYPH) static void svg_dump (hb_face_t *face, unsigned face_index) { @@ -325,6 +326,7 @@ dump_glyphs (hb_blob_t *blob, const char *font_name) hb_ot_glyph_decompose_funcs_destroy (funcs); } +#endif /* Only this part of this mini app uses private API */ #include "hb-static.cc" @@ -485,6 +487,7 @@ print_layout_info_using_private_api (hb_blob_t *blob) } } } +/* end of private API use */ int main (int argc, char **argv) @@ -498,7 +501,9 @@ main (int argc, char **argv) hb_blob_t *blob = hb_blob_create_from_file (argv[1]); printf ("Opened font file %s: %d bytes long\n", argv[1], hb_blob_get_length (blob)); print_layout_info_using_private_api (blob); +#if !defined(HB_NO_COLOR) && !defined(HB_NO_GLYPH) dump_glyphs (blob, argv[1]); +#endif hb_blob_destroy (blob); return 0;