From 7dcf8e126ecf52c67f59745e04d21df68b1a6992 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 26 Jun 2019 13:44:10 -0700 Subject: [PATCH] [config] Fix build with HB_NO_OT_LAYOUT --- src/hb-ot-face-table-list.hh | 2 ++ src/hb-ot-layout-gpos-table.hh | 3 ++- src/hb-ot-layout-gsub-table.hh | 5 +++-- src/hb-ot-layout-gsubgpos.hh | 8 +++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-face-table-list.hh b/src/hb-ot-face-table-list.hh index d07f53c..ac70527 100644 --- a/src/hb-ot-face-table-list.hh +++ b/src/hb-ot-face-table-list.hh @@ -88,11 +88,13 @@ HB_OT_TABLE (OT, kern) #endif /* OpenType shaping. */ +#ifndef HB_NO_OT_LAYOUT HB_OT_ACCELERATOR (OT, GDEF) HB_OT_ACCELERATOR (OT, GSUB) HB_OT_ACCELERATOR (OT, GPOS) //HB_OT_TABLE (OT, BASE) //HB_OT_TABLE (OT, JSTF) +#endif /* AAT shaping. */ #ifndef HB_NO_AAT diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index d371c4b..f4be42c 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -1737,13 +1737,13 @@ struct GPOS_accelerator_t : GPOS::accelerator_t {}; /* Out-of-class implementation for methods recursing */ +#ifndef HB_NO_OT_LAYOUT template /*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index) { const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index); return l.dispatch (c); } - /*static*/ inline bool PosLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index) { const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index); @@ -1756,6 +1756,7 @@ template c->set_lookup_props (saved_lookup_props); return ret; } +#endif } /* namespace OT */ diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index f532f9d..a6cc1a2 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -1409,6 +1409,7 @@ struct GSUB_accelerator_t : GSUB::accelerator_t {}; /* Out-of-class implementation for methods recursing */ +#ifndef HB_NO_OT_LAYOUT /*static*/ inline bool ExtensionSubst::is_reverse () const { unsigned int type = get_type (); @@ -1416,14 +1417,12 @@ struct GSUB_accelerator_t : GSUB::accelerator_t {}; return CastR (get_subtable()).is_reverse (); return SubstLookup::lookup_type_is_reverse (type); } - template /*static*/ inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index) { const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index); return l.dispatch (c); } - /*static*/ inline bool SubstLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index) { const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index); @@ -1436,6 +1435,8 @@ template c->set_lookup_props (saved_lookup_props); return ret; } +#endif + } /* namespace OT */ diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 9a82a4d..c6e6ac9 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -483,7 +483,13 @@ struct hb_ot_apply_context_t : iter_input (), iter_context (), font (font_), face (font->face), buffer (buffer_), recurse_func (nullptr), - gdef (*face->table.GDEF->table), + gdef ( +#ifndef HB_NO_OT_LAYOUT + *face->table.GDEF->table +#else + Null(GDEF) +#endif + ), var_store (gdef.get_var_store ()), direction (buffer_->props.direction), lookup_mask (1), -- 2.7.4